Stream: implementers
Topic: Validation of Condition
Andreas (Nov 20 2018 at 07:38):
Hi, I'm trying to use the validator in HAPI to validate my resources, but I'm running into some problems with Condition. The problem is when the condition has an abatementDate; which results in the validation failing on con-4. Here is a small test that fails for me: https://pastecode.xyz/view/09509652.
The validation fails because of the SchematronBaseValidator (have tried commenting out DefaultProfileValidationSupport and SchemaBaseValidator).
The error-message that is returned from the validator is : "[error] in /:Condition[namespace-uri()='http://hl7.org/fhir'][1] @ Condition con-4: If condition is abated, then clinicalStatus must be either inactive, resolved, or remission Test=not(f:abatementBoolean/@value=true() or (not(exists(f:abatementBoolean)) and exists([starts-with(local-name(.), 'abatement')])) or f:clinicalStatus/@value=('resolved', 'remission', 'inactive'))"
Lloyd McKenzie (Nov 20 2018 at 15:49):
Is this an issue with R3 or R4?
Grahame Grieve (Nov 21 2018 at 05:13):
what's the status?
Andreas (Nov 21 2018 at 06:31):
This is R3 and I'm using HAPI 3.4. So I'm trying to set clinicalStatus to inactive, and the abatementDate to a date in the future, but the validation always fails on con-4.
Grahame Grieve (Nov 21 2018 at 06:35):
hmm, send me an example and I'll test it out
Andreas (Nov 21 2018 at 06:52):
Here is the example class: https://pastecode.xyz/view/c4476478 and I'm using this pom: https://github.com/FirelyTeam/fhirstarters/blob/master/java/hapi-fhirstarters-model-and-parser-examples/pom.xml
Grahame Grieve (Nov 22 2018 at 22:17):
so this works in the latest validator. @James Agnew what's the right way to get the last validator in the context of HAPI?
Last updated: Apr 12 2022 at 19:14 UTC