Fix issue with broken NullFlavor binding in R4

This commit is contained in:
Grahame Grieve 2023-06-18 13:02:21 +10:00
parent dfb4404ce6
commit 297313b30a
1 changed files with 13 additions and 0 deletions

View File

@ -34,6 +34,19 @@ public class PackageHackerR5 {
r.hack("http://terminology.hl7.org/CodeSystem/v2-0360-2.3.1", "2.3.1");
}
if ("http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor".equals(r.getUrl()) && "4.0.1".equals(r.getVersion())) {
StructureDefinition sd = (StructureDefinition) r.getResource();
for (ElementDefinition ed : sd.getSnapshot().getElement()) {
if (ed.hasBinding() && "http://terminology.hl7.org/ValueSet/v3-NullFlavor|4.0.1".equals(ed.getBinding().getValueSet())) {
ed.getBinding().setValueSet("http://terminology.hl7.org/ValueSet/v3-NullFlavor");
}
}
for (ElementDefinition ed : sd.getDifferential().getElement()) {
if (ed.hasBinding() && "http://terminology.hl7.org/ValueSet/v3-NullFlavor|4.0.1".equals(ed.getBinding().getValueSet())) {
ed.getBinding().setValueSet("http://terminology.hl7.org/ValueSet/v3-NullFlavor");
}
}
}
if ("http://hl7.org/fhir/StructureDefinition/DeviceUseStatement".equals(r.getUrl()) && "4.0.1".equals(r.getVersion())) {
StructureDefinition sd = (StructureDefinition) r.getResource();
for (ElementDefinition ed : sd.getSnapshot().getElement()) {