Stream: hapi
Topic: Primitive validation with HAPI FHIR 5.X
Roman Rodnin (Apr 07 2020 at 16:04):
Hi,
I am using snapshot version of hapi-fhir library and trying to validate observation with body height profile (http://hl7.org/fhir/StructureDefinition/bodyheight)
Also i use https://r4.ontoserver.csiro.au/fhir terminology service with RemoteTerminologyServiceValidationSupport
When the library tries to validate valueQuantity of observation, it fails with 400 http status code and message: If the code parameter is provided, the system parameter must also be provided.
Could you please check this issue, thx
Dion McMurtrie (Apr 07 2020 at 22:25):
@Roman Rodnin can you post an example resource you're trying to validate?
Michael Lawley (Apr 08 2020 at 00:18):
Note, the error mentioned means $validate-code is being called with a code parameter but no system parameter.
This is kinda strange given that the bodyheight profile has a mandatory fixed value for system
James Agnew (Apr 08 2020 at 13:58):
I'm going to assume @Roman Rodnin that you're using the new RemoteTerminologyServiceValidationSupport in 5.0.0-SNAPSHOT?
I have the same questions as the others, but I'm also just intertested to see this used in the wild already. :)
Roman Rodnin (Apr 08 2020 at 16:37):
yes, you are right.
resource that i am trying to validate:
{
"resourceType": "Observation",
"id": "body-height",
"meta": {
"profile": [
"http://hl7.org/fhir/StructureDefinition/vitalsigns"
]
},
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: body-height</p><p><b>meta</b>: </p><p><b>status</b>: final</p><p><b>category</b>: Vital Signs <span>(Details : {http://terminology.hl7.org/CodeSystem/observation-category code 'vital-signs' = 'Vital Signs', given as 'Vital Signs'})</span></p><p><b>code</b>: Body height <span>(Details : {LOINC code '8302-2' = 'Body height', given as 'Body height'})</span></p><p><b>subject</b>: <a>Patient/example</a></p><p><b>effective</b>: 02/07/1999</p><p><b>value</b>: 66.899999999999991 in<span> (Details: UCUM code [in_i] = 'in_i')</span></p></div>"
},
"status": "final",
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "vital-signs",
"display": "Vital Signs"
}
],
"text": "Vital Signs"
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "8302-2",
"display": "Body height"
}
],
"text": "Body height"
},
"subject": {
"reference": "Patient/example"
},
"effectiveDateTime": "1999-07-02",
"valueQuantity": {
"value": 66.899999999999991,
"unit": "in",
"system": "http://unitsofmeasure.org",
"code": "[in_i]"
}
}
I spent some time debugging this problem, but it's really hard to understand what's going on in InstanceValidator
I just found that in VersionSpecificWorkerContextWrapper line 450 there's codeSystem parameter is set to null
Last updated: Apr 12 2022 at 19:14 UTC