Check for both "value" and "value[x]"

This commit is contained in:
Lloyd McKenzie 2024-12-11 21:43:31 -07:00
parent 0b28b021a2
commit 2d2ebda065
2 changed files with 10 additions and 4 deletions

View File

@ -479,8 +479,11 @@ public class ValueSet40_50 {
ConceptPropertyComponent prop = tgt.addProperty();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(t, prop, "code", "value[x]");
prop.setCode(t.getExtensionString("code"));
prop.setValue(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(t.getExtensionByUrl("value[x]").getValue()));
if (t.hasExtension("value")) {
prop.setValue(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(t.getExtensionByUrl("value").getValue()));
} else if (t.hasExtension("value[x]")) {
prop.setValue(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(t.getExtensionByUrl("value[x]").getValue()));
}
}
}
for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains())

View File

@ -478,8 +478,11 @@ public class ValueSet43_50 {
ValueSet.ConceptPropertyComponent prop = tgt.addProperty();
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(t, prop, "code", "value[x]");
prop.setCode(t.getExtensionString("code"));
prop.setValue(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(t.getExtensionByUrl("value[x]").getValue()));
if (t.hasExtension("value")) {
prop.setValue(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(t.getExtensionByUrl("value").getValue()));
} else if (t.hasExtension("value[x]")) {
prop.setValue(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(t.getExtensionByUrl("value[x]").getValue()));
}
}
}
for (org.hl7.fhir.r4b.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains())