Stream: hapi
Topic: validation of ucum code
Erik Nielsen (Jul 30 2019 at 14:26):
Validation against ValueSet seems to be depending on the availability of the used CodeSystem.
For the ValueSet ucum-common listed in (and read from) hapi-fhir-validation-resources-dstu3/src/main/resources/org/hl7/fhir/dstu3/model/valueset/valuesets.xml, the validation-code request fails:
http://hapi.fhir.org/baseDstu3/ValueSet/$validate-code?url=http://hl7.org/fhir/ValueSet/ucum-common&system=http://unitsofmeasure.org&code=percent&display=percent
results in error with diagnostics "unable to find code system http://unitsofmeasure.org".
Attempting a similar request for a ValueSet (also in valuesets.xml) where the CodeSystem is defined in v3-codesystems.xml succeeds:
http://hapi.fhir.org/baseDstu3/ValueSet/$validate-code?url=http://hl7.org/fhir/ValueSet/probability-distribution-type&system=http://hl7.org/fhir/v3/ProbabilityDistributionType&code=B
results in validation succeeded.
Should the request be constructed differently to make validation against ucum-common succeed?
Grahame Grieve (Aug 02 2019 at 01:39):
getting back to this; this is tricky. The terminology service doesn't believe the value set that a code is valid; it goes and checks that the code is actually valid before accepting that the value set actually contains it (it's not unusual to find value sets containing unusable / invalid codes). In this case, it hasn't got UCUM. I don't know what the HAPI arrangements are for UCUM
Erik Nielsen (Aug 02 2019 at 09:40):
that makes sense given the occurrence of unusable/invalid codes. The UCUM being a compositional code system, a corresponding CodeSystem would quickly explode in number of permutations (as would the ValueSet) if completeness was aspired. Is a select/pragmatic subset a common approach?
Grahame Grieve (Aug 02 2019 at 09:48):
well, my terminology server has an internal API to a code system, and an implementation of the API for UCUM so that it's fully supported
Last updated: Apr 12 2022 at 19:14 UTC