Open rprobinson opened 2 years ago
I'm using the staging server https://ontology.nhs.uk/staging/fhir which I'm informed does have the CodeSystem
Yes, I get a positive result for GET https://ontology.nhs.uk/staging/fhir/CodeSystem/$lookup?code=h&system=http://unitsofmeasure.org
This isn't the call to validate is it?
https://ontology.nhs.uk/staging/fhir/CodeSystem/$validate-code?code=h&url=http://unitsofmeasure.org
This works and what I would have expected for the validation request (if it is making just the one call). Which returns
{ "resourceType": "Parameters", "parameter": [ { "name": "result", "valueBoolean": true }, { "name": "display", "valueString": "h" } ] }
Yes I think it is the the call that the RemoteTerminologyServiceValidationSupport should be making but doesn't
Environment
HAPI FHIR Version: 5.4.0 FHIR version: R4 OS: Ubuntu 18
Problem
I work for NHS Digital and develop a tool which suppliers use for testing their systems. It uses the HAPI FHIR Validation library to validate incoming requests and I am expanding its functionality to use the remote NHS UK FHIR terminology Server. I am experiencing an issue with the HAPI FHIR Validation library whereby the periodUnit value="h" fails validation. The example message used is from the NHS Digital examples for Interoperability Medicines:
When I use the following Validation Support Modules: DefaultProfileValidationSupport PrePopulatedValidationSupport InMemoryTerminologyServerValidationSupport CommonCodeSystemsTerminologyService SnapshotGeneratingValidationSupport
The validation succeeds with no issues.
However when I add the RemoteTerminologyServiceValidationSupport module (using the NHS UK FHIR Terminology Server) the validation of the periodUnit fails with:
On the Remote Terminology Server, all the Snomed and medication dispense status codes otherwise pass.
Evidence
I have been in discussion with those who run the UK FHIR Terminology Server who have provided server-side evidence for this issue (also in viewing my HTTP traffic locally):
For each snomed code the RemoteTerminologyServiceValidationSupport module makes 3 outbound requests made to the remote terminology server:
However for the units-of-measure it makes just one:
Is it relevant that the unitsofmeasure CodeSystem doesn’t have an implicit ValueSet specified as part of the resource (it is valid to not specify one)...
Is the order of adding the validation support modules to the ValidationSupportChain significant? (I have followed the recipes on the documentation but it seems that the remote terminology support module is called before the CommonCode systems module irrespective of order)
Best regards Richard Robinson