hapifhir / org.hl7.fhir.core

Apache License 2.0
156 stars 164 forks source link

Request CDA namespace prefix be added to support Australian CDA transformations #1613

Closed robeastwood-agency closed 3 months ago

robeastwood-agency commented 7 months ago

The Australian Digital Health Agency is commencing an exploration of transforming FHIR content (ie document bundles) into CDA content, specifically making use of Australian CDA extensions [1]. A working CDA logical model, adapted from the HL7 International CDA Logical Model Specification, is being used to represent the AU CDA extensions as the basis for successful transforms from FHIR Bundles to CDA instances. Transforms are being performed by the Matchbox server as well as the FHIR Validator.

Generated CDA instances however are populated with the namespace prefix ns0 instead of the defined prefix ext; as such:

<ClinicalDocument xmlns="urn:hl7-org:v3"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:ns0="http://ns.electronichealth.net.au/Ci/Cda/Extensions/3.0"">
  ...
  <ns0:completionCode code="F" codeSystem="1.2.36.1.2001.1001.101.104.20104" displayName="Final"/>
  ...

@oliveregger has indicated that the namespace prefix is controlled by this repo, specifically these lines.

Therefore, this request is to add the following content to support the auto-generation of the Australian namespace extension prefix ext:

if (ns.equals("http://ns.electronichealth.net.au/Ci/Cda/Extensions/3.0"))
      return "ext:";

In support of this, I will shortly submit a PR for the above changes.

Thank you

Notes [1] - https://developer.digitalhealth.gov.au/resources/australian-digital-health-agency-cda-schema-extension-3-0-cda-schema-v20201203

grahamegrieve commented 3 months ago

did a PR for this happen?

robeastwood-agency commented 3 months ago

ahh no it hasn't - I'll put one up later today; thank you!

robeastwood-agency commented 3 months ago

PR has been submitted