Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress choice group element 'item' from being generated in CDA instances #1583

Closed
robeastwood-agency opened this issue Mar 27, 2024 · 1 comment

Comments

@robeastwood-agency
Copy link

The CDA Logical Model IG, v2.0.0-sd-snapshot1 introduced a choice group to a number of CDA datatypes, like AD and PN. See commit here.

This item element has an extension http:https://hl7.org/fhir/tools/StructureDefinition/xml-choice-group with its value set to true (see this for AD). And the definition of the extension states that

If true, marks that this element is a choice group that doesn’t literally appear in the XML

However, when generating a CDA instance via either the FHIR validator (using -transform of a FHIR Bundle against a StructureMap, with a target of the above CDA logical model) or being processed by the FHIR IG Publisher, in an IG derived from the CDA logical model, the item element appears in the generated CDA instance. This results in the instance failing schema validation. For example, an address appears as such:

<addr>
    <item>
        <country>Australia</country>
        <state>NSW</state>
        <city>Townsville</city>
        <postalCode>5555</postalCode>
        <streetAddressLine>1 Normal Street</streetAddressLine>
    </item>
</addr>

This was raised in zulip https://chat.fhir.org/#narrow/stream/246127-CDA-IG-Publisher/topic/CDA.20Logical.20Model.20-.20Choice.20Group.20.60item.60.20is.20not.20suppressed

With @grahamegrieve responding

I think I forgot to suppress it in the transform code, so feel free to make a bug report for that

Thank you

oliveregger added a commit to ahdis/org.hl7.fhir.core that referenced this issue Mar 27, 2024
oliveregger added a commit to ahdis/fhir-test-cases that referenced this issue Jul 8, 2024
oliveregger added a commit to ahdis/org.hl7.fhir.core that referenced this issue Jul 8, 2024
oliveregger added a commit to ahdis/org.hl7.fhir.core that referenced this issue Jul 8, 2024
grahamegrieve added a commit that referenced this issue Jul 9, 2024
#1583 do not serialize choice group
markiantorno added a commit that referenced this issue Jul 12, 2024
## Validator Changes

* Add clearer message for errors around unable to validate because unknown code system
* Fix problem with fhirVersion cardinality validating IG resources

## WHO I18n Project

* Remove Questionnaire.item.linkId from translatable content

## Other code changes

* Further revisions to rendering framework for id uniqueness, main spec rendering, and various reported issues
* Improve doco for R4/R4B renderers
* Introduce backwards compatible constructor in ValidationEngineBuilder and fix useEcosystem
* Use v2 of PublishCodeCoverageResults (#1665)
* #1583 do not serialize choice group + add testcase
***NO_CI***
@robeastwood-agency
Copy link
Author

I can confirm this as fixed with the latest release v6.3.16

Thank you @oliveregger , @grahamegrieve and @markiantorno

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant