Fix for R2B Resource.id cardinality problem

This commit is contained in:
Grahame Grieve 2024-07-16 06:15:57 +08:00
parent 2a37fb9351
commit 37006946cd
2 changed files with 10 additions and 1 deletions

View File

@ -828,7 +828,6 @@ public class DataRenderer extends Renderer implements CodeResolver {
x.tx(context.formatPhrase(RenderingContext.DATA_REND_BASE64, length));
} else {
x.code(type.primitiveValue());
}
break;
default:

View File

@ -78,6 +78,16 @@ public class PackageHackerR5 {
}
}
}
// work around an r2b issue
if (packageInfo.getId().equals("hl7.fhir.r2b.core") && r.getType().equals("StructureDefinition")) {
StructureDefinition sd = (StructureDefinition) r.getResource();
for (ElementDefinition ed : sd.getSnapshot().getElement()) {
if (ed.getPath().equals(sd.getType()+".id")) {
ed.getBase().setMax("1");
}
}
}
// work around a r4 version of extension pack issue
if (packageInfo.getId().equals("hl7.fhir.uv.extensions.r4") && r.getType().equals("StructureDefinition")) {
StructureDefinition sd = (StructureDefinition) r.getResource();