diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/profilemodel/PEBuilder.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/profilemodel/PEBuilder.java index 9ed4efc4b..e1d150df9 100644 --- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/profilemodel/PEBuilder.java +++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/profilemodel/PEBuilder.java @@ -581,20 +581,42 @@ public class PEBuilder { throw new DefinitionException("The discriminator type 'type' is not supported by the PEBuilder"); case VALUE: String path = d.getPath(); - if (path.contains(".")) { - throw new DefinitionException("The discriminator path '"+path+"' is not supported by the PEBuilder"); - } ElementDefinition ed = getChildElement(profile, definition, path); if (ed == null) { throw new DefinitionException("The discriminator path '"+path+"' could not be resolved by the PEBuilder"); } - if (!ed.hasFixed()) { - throw new DefinitionException("The discriminator path '"+path+"' has no fixed value - this is not supported by the PEBuilder"); + // three things possible: + // fixed, pattern, or binding + if (ed.hasFixed()) { + if (!ed.getFixed().isPrimitive()) { + throw new DefinitionException("The discriminator path '"+path+"' has a fixed value that is not a primitive ("+ed.getFixed().fhirType()+") - this is not supported by the PEBuilder"); + } + b.append(path+" = '"+ed.getFixed().primitiveValue()+"'"); + } else if (ed.hasPattern()) { + throw new DefinitionException("The discriminator path '"+path+"' has a pattern on the element '"+ed.getId()+"' - this is not supported by the PEBuilder"); + } else if (ed.hasBinding()) { + if (ed.getBinding().getStrength() != BindingStrength.REQUIRED) { + throw new DefinitionException("The discriminator path '"+path+"' has a binding on the element '"+ed.getId()+"' but the strength is not required - this is not supported by the PEBuilder"); + } else { + ValueSet vs = context.findTxResource(ValueSet.class, ed.getBinding().getValueSet()); + if (vs == null) { + throw new DefinitionException("The discriminator path '"+path+"' has a binding on the element '"+ed.getId()+"' but the valueSet '"+ed.getBinding().getValueSet()+"' is not known - this is not supported by the PEBuilder"); + } + ValueSetExpansionOutcome exp = context.expandVS(vs, true, false); + if (exp.isOk()) { + CommaSeparatedStringBuilder bs = new CommaSeparatedStringBuilder(" | "); + for (ValueSetExpansionContainsComponent cc : exp.getValueset().getExpansion().getContains()) { + bs.append("'"+cc.getCode()+"'"); + } + b.append(path+" in ("+bs.toString()+")"); + } else { + throw new DefinitionException("The discriminator path '"+path+"' has a binding on the element '"+ed.getId()+"' but the valueSet '"+ed.getBinding().getValueSet()+"' could not be expanded: "+exp.getError()); + } + } + } else { + throw new DefinitionException("The discriminator path '"+path+"' has no fixed or pattern value or a binding on the element '"+ed.getId()+"' - this is not supported by the PEBuilder"); + } - if (!ed.getFixed().isPrimitive()) { - throw new DefinitionException("The discriminator path '"+path+"' has a fixed value that is not a primitive ("+ed.getFixed().fhirType()+") - this is not supported by the PEBuilder"); - } - b.append(path+" = '"+ed.getFixed().primitiveValue()+"'"); break; case NULL: throw new DefinitionException("The discriminator type 'null' is not supported by the PEBuilder"); @@ -606,13 +628,26 @@ public class PEBuilder { } private ElementDefinition getChildElement(StructureDefinition profile, ElementDefinition definition, String path) { - List elements = pu.getChildList(profile, definition); - if (elements.size() == 0) { - profile = definition.getTypeFirstRep().hasProfile() ? context.fetchResource(StructureDefinition.class, definition.getTypeFirstRep().getProfile().get(0).asStringValue()) : - context.fetchTypeDefinition(definition.getTypeFirstRep().getWorkingCode()); - elements = pu.getChildList(profile, profile.getSnapshot().getElementFirstRep()); - } - return getByName(elements, path); + String head = path.contains(".") ? path.substring(0, path.indexOf(".")) : path; + String tail = path.contains(".") ? path.substring(path.indexOf(".")+1) : null; + ElementDefinition focus = definition; + + do { + List elements = pu.getChildList(profile, focus); + if (elements.size() == 0) { + profile = focus.getTypeFirstRep().hasProfile() ? context.fetchResource(StructureDefinition.class, focus.getTypeFirstRep().getProfile().get(0).asStringValue()) : + context.fetchTypeDefinition(focus.getTypeFirstRep().getWorkingCode()); + elements = pu.getChildList(profile, profile.getSnapshot().getElementFirstRep()); + } + focus = getByName(elements, head); + if (tail != null) { + head = tail.contains(".") ? tail.substring(0, tail.indexOf(".")) : tail; + tail = tail.contains(".") ? tail.substring(tail.indexOf(".")+1) : null; + } else { + head = null; + } + } while (head != null && focus != null); + return focus; } public List exec(Resource resource, Base data, String fhirpath) { diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/profilemodel/gen/PECodeGenerator.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/profilemodel/gen/PECodeGenerator.java index d8e2027bd..0432b3d37 100644 --- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/profilemodel/gen/PECodeGenerator.java +++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/profilemodel/gen/PECodeGenerator.java @@ -119,9 +119,9 @@ public class PECodeGenerator { public void genId() { if (isResource) { genField(true, "id", "String", "id", "", false, "", 0, 1, null); - genAccessors(true, false, "id", "String", "", "String", "String", "Id", "Ids", false, "", false, false, null); - genLoad(true, false, "id", "id", "IdType", "", "String", "String", "Id", "Ids", false, false, null, false); - genSave(true, false, "id", "id", "IdType", "", "String", "String", "Id", "Ids", false, false, false, null, false); + genAccessors(true, false, "id", "id", "String", "", "String", "String", "Id", "Ids", false, "", false, false, null); + genLoad(true, false, "id", "id", "id", "IdType", "", "String", "String", "Id", "Ids", false, false, null, false); + genSave(true, false, "id", "id", "id", "IdType", "", "String", "String", "Id", "Ids", false, false, false, null, false); genClear(false, "id", "String"); } } @@ -382,9 +382,9 @@ public class PECodeGenerator { if (isPrim && field.hasFixedValue()) { genFixed(name, ptype, field.getFixedValue()); } - genAccessors(isPrim, isAbstract, name, type, init, ptype, ltype, cname, csname, field.isList(), field.documentation(), field.hasFixedValue(), isEnum, field.definition()); - genLoad(isPrim, isAbstract, name, sname, type, init, ptype, ltype, cname, csname, field.isList(), field.hasFixedValue(), field.types().get(0), isEnum); - genSave(isPrim, isAbstract, name, sname, type, init, ptype, ltype, cname, csname, field.isList(), field.hasFixedValue(), isExtension, field.types().get(0), isEnum); + genAccessors(isPrim, isAbstract, name, field.name(), type, init, ptype, ltype, cname, csname, field.isList(), field.documentation(), field.hasFixedValue(), isEnum, field.definition()); + genLoad(isPrim, isAbstract, name, sname, field.name(), type, init, ptype, ltype, cname, csname, field.isList(), field.hasFixedValue(), field.types().get(0), isEnum); + genSave(isPrim, isAbstract, name, sname, field.name(), type, init, ptype, ltype, cname, csname, field.isList(), field.hasFixedValue(), isExtension, field.types().get(0), isEnum); genClear(field.isList(), name, ptype); } } else { @@ -404,9 +404,9 @@ public class PECodeGenerator { } } - private void genLoad(boolean isPrim, boolean isAbstract, String name, String sname, String type, String init, String ptype, String ltype, String cname, String csname, boolean isList, boolean isFixed, PEType typeInfo, boolean isEnum) { + private void genLoad(boolean isPrim, boolean isAbstract, String name, String sname, String fname, String type, String init, String ptype, String ltype, String cname, String csname, boolean isList, boolean isFixed, PEType typeInfo, boolean isEnum) { if (isList) { - w(load, " for (PEInstance item : src.children(\""+sname+"\")) {"); + w(load, " for (PEInstance item : src.children(\""+fname+"\")) {"); if ("BackboneElement".equals(type)) { w(load, " "+name+".add(("+type+") item.asElement());"); } else { @@ -414,59 +414,59 @@ public class PECodeGenerator { } w(load, " }"); } else if (isEnum) { - w(load, " if (src.hasChild(\""+name+"\")) {"); + w(load, " if (src.hasChild(\""+fname+"\")) {"); if ("CodeableConcept".equals(typeInfo.getName())) { - w(load, " "+name+" = "+type+".fromCodeableConcept((CodeableConcept) src.child(\""+name+"\").asDataType());"); + w(load, " "+name+" = "+type+".fromCodeableConcept((CodeableConcept) src.child(\""+fname+"\").asDataType());"); } else if ("Coding".equals(typeInfo.getName())) { - w(load, " "+name+" = "+type+".fromCoding((Coding) src.child(\""+name+"\").asDataType());"); + w(load, " "+name+" = "+type+".fromCoding((Coding) src.child(\""+fname+"\").asDataType());"); } else { - w(load, " "+name+" = "+type+".fromCode(src.child(\""+name+"\").asDataType().primitiveValue());"); + w(load, " "+name+" = "+type+".fromCode(src.child(\""+fname+"\").asDataType().primitiveValue());"); } w(load, " }"); } else if (isPrim) { - w(load, " if (src.hasChild(\""+name+"\")) {"); + w(load, " if (src.hasChild(\""+fname+"\")) {"); if ("CodeType".equals(type)) { // might be code or enum - w(load, " "+name+" = src.child(\""+name+"\").asDataType().primitiveValue();"); + w(load, " "+name+" = src.child(\""+fname+"\").asDataType().primitiveValue();"); } else { - w(load, " "+name+" = (("+type+") src.child(\""+name+"\").asDataType()).getValue();"); + w(load, " "+name+" = (("+type+") src.child(\""+fname+"\").asDataType()).getValue();"); } w(load, " }"); } else if (typeInfo != null && typeInfo.getUrl() != null && !typeInfo.getUrl().startsWith("http://hl7.org/fhir/StructureDefinition")) { - w(load, " if (src.hasChild(\""+name+"\")) {"); - w(load, " "+name+" = "+type+".fromSource(src.child(\""+name+"\"));"); + w(load, " if (src.hasChild(\""+fname+"\")) {"); + w(load, " "+name+" = "+type+".fromSource(src.child(\""+fname+"\"));"); w(load, " }"); } else { - w(load, " if (src.hasChild(\""+name+"\")) {"); + w(load, " if (src.hasChild(\""+fname+"\")) {"); if ("BackboneElement".equals(type)) { - w(load, " "+name+" = ("+type+") src.child(\""+name+"\").asElement();"); + w(load, " "+name+" = ("+type+") src.child(\""+fname+"\").asElement();"); } else if (Utilities.existsInList(type, workerContext.getResourceNames())) { - w(load, " "+name+" = ("+type+") src.child(\""+name+"\").asResource();"); + w(load, " "+name+" = ("+type+") src.child(\""+fname+"\").asResource();"); } else { - w(load, " "+name+" = ("+type+") src.child(\""+name+"\").asDataType();"); + w(load, " "+name+" = ("+type+") src.child(\""+fname+"\").asDataType();"); } w(load, " }"); } } - private void genSave(boolean isPrim, boolean isAbstract, String name, String sname, String type, String init, String ptype, String ltype, String cname, String csname, boolean isList, boolean isFixed, boolean isExtension, PEType typeInfo, boolean isEnum) { - w(save, " tgt.clear(\""+sname+"\");"); + private void genSave(boolean isPrim, boolean isAbstract, String name, String sname, String fname, String type, String init, String ptype, String ltype, String cname, String csname, boolean isList, boolean isFixed, boolean isExtension, PEType typeInfo, boolean isEnum) { + w(save, " tgt.clear(\""+fname+"\");"); if (isList) { w(save, " for ("+type+" item : "+name+") {"); if (isExtension) { - w(save, " tgt.makeChild(\""+sname+"\").data().setProperty(\"value[x]\", item);"); + w(save, " tgt.makeChild(\""+fname+"\").data().setProperty(\"value[x]\", item);"); } else { - w(save, " tgt.addChild(\""+sname+"\", item);"); + w(save, " tgt.addChild(\""+fname+"\", item);"); } w(save, " }"); } else if (isEnum) { w(save, " if ("+name+" != null) {"); if ("CodeableConcept".equals(typeInfo.getName())) { - w(save, " tgt.addChild(\""+sname+"\", "+name+".toCodeableConcept());"); + w(save, " tgt.addChild(\""+fname+"\", "+name+".toCodeableConcept());"); } else if ("Coding".equals(typeInfo.getName())) { - w(save, " tgt.addChild(\""+sname+"\", "+name+".toCoding());"); + w(save, " tgt.addChild(\""+fname+"\", "+name+".toCoding());"); } else { - w(save, " tgt.addChild(\""+sname+"\", "+name+".toCode());"); + w(save, " tgt.addChild(\""+fname+"\", "+name+".toCode());"); } w(save, " }"); } else if (isPrim) { @@ -478,29 +478,29 @@ public class PECodeGenerator { w(save, " if ("+name+" != null) {"); } if (isExtension) { - w(save, " tgt.makeChild(\""+sname+"\").data().setProperty(\"value[x]\", new "+type+"("+name+"));"); + w(save, " tgt.makeChild(\""+fname+"\").data().setProperty(\"value[x]\", new "+type+"("+name+"));"); } else if (Utilities.existsInList(type, "DateType", "InstantType", "DateTimeType")) { - w(save, " tgt.addChild(\""+sname+"\", new "+type+"("+name+"));"); + w(save, " tgt.addChild(\""+fname+"\", new "+type+"("+name+"));"); } else { - w(save, " tgt.makeChild(\""+sname+"\").data().setProperty(\"value\", new "+type+"("+name+"));"); + w(save, " tgt.makeChild(\""+fname+"\").data().setProperty(\"value\", new "+type+"("+name+"));"); } w(save, " }"); } else if (typeInfo != null && typeInfo.getUrl() != null && !typeInfo.getUrl().startsWith("http://hl7.org/fhir/StructureDefinition")) { w(save, " if ("+name+" != null) {"); - w(save, " "+name+".save(tgt.makeChild(\""+sname+"\"), nulls);"); + w(save, " "+name+".save(tgt.makeChild(\""+fname+"\"), nulls);"); w(save, " }"); } else if (isExtension) { w(save, " if ("+name+" != null) {"); - w(save, " tgt.makeChild(\""+sname+"\").data().setProperty(\"value[x]\", "+name+");"); + w(save, " tgt.makeChild(\""+fname+"\").data().setProperty(\"value[x]\", "+name+");"); w(save, " }"); } else { w(save, " if ("+name+" != null) {"); - w(save, " tgt.addChild(\""+sname+"\", "+name+");"); + w(save, " tgt.addChild(\""+fname+"\", "+name+");"); w(save, " }"); } } - private void genAccessors(boolean isPrim, boolean isAbstract, String name, String type, String init, String ptype, String ltype, String cname, String csname, boolean isList, String shortDoco, boolean isFixed, boolean isEnum, ElementDefinition ed) { + private void genAccessors(boolean isPrim, boolean isAbstract, String name, String fname, String type, String init, String ptype, String ltype, String cname, String csname, boolean isList, String shortDoco, boolean isFixed, boolean isEnum, ElementDefinition ed) { if (ed != null) { jdoc(accessors, ed.getDefinition(), 2, true); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/profilemodel/PEBuilder.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/profilemodel/PEBuilder.java index 813f6bc40..ad465acbd 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/profilemodel/PEBuilder.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/profilemodel/PEBuilder.java @@ -587,9 +587,6 @@ public class PEBuilder { throw new DefinitionException("The discriminator type 'type' is not supported by the PEBuilder"); case VALUE: String path = d.getPath(); - if (path.contains(".")) { - throw new DefinitionException("The discriminator path '"+path+"' is not supported by the PEBuilder"); - } ElementDefinition ed = getChildElement(profile, definition, path); if (ed == null) { throw new DefinitionException("The discriminator path '"+path+"' could not be resolved by the PEBuilder"); @@ -637,13 +634,26 @@ public class PEBuilder { } private ElementDefinition getChildElement(StructureDefinition profile, ElementDefinition definition, String path) { - List elements = pu.getChildList(profile, definition); - if (elements.size() == 0) { - profile = definition.getTypeFirstRep().hasProfile() ? context.fetchResource(StructureDefinition.class, definition.getTypeFirstRep().getProfile().get(0).asStringValue()) : - context.fetchTypeDefinition(definition.getTypeFirstRep().getWorkingCode()); - elements = pu.getChildList(profile, profile.getSnapshot().getElementFirstRep()); - } - return getByName(elements, path); + String head = path.contains(".") ? path.substring(0, path.indexOf(".")) : path; + String tail = path.contains(".") ? path.substring(path.indexOf(".")+1) : null; + ElementDefinition focus = definition; + + do { + List elements = pu.getChildList(profile, focus); + if (elements.size() == 0) { + profile = focus.getTypeFirstRep().hasProfile() ? context.fetchResource(StructureDefinition.class, focus.getTypeFirstRep().getProfile().get(0).asStringValue()) : + context.fetchTypeDefinition(focus.getTypeFirstRep().getWorkingCode()); + elements = pu.getChildList(profile, profile.getSnapshot().getElementFirstRep()); + } + focus = getByName(elements, head); + if (tail != null) { + head = tail.contains(".") ? tail.substring(0, tail.indexOf(".")) : tail; + tail = tail.contains(".") ? tail.substring(tail.indexOf(".")+1) : null; + } else { + head = null; + } + } while (head != null && focus != null); + return focus; } public List exec(Resource resource, Base data, String fhirpath) { diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/profilemodel/gen/PECodeGenerator.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/profilemodel/gen/PECodeGenerator.java index fa1f4cb46..9ed54b0a3 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/profilemodel/gen/PECodeGenerator.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/profilemodel/gen/PECodeGenerator.java @@ -119,9 +119,9 @@ public class PECodeGenerator { public void genId() { if (isResource) { genField(true, "id", "String", "id", "", false, "", 0, 1, null); - genAccessors(true, false, "id", "String", "", "String", "String", "Id", "Ids", false, "", false, false, null); - genLoad(true, false, "id", "id", "IdType", "", "String", "String", "Id", "Ids", false, false, null, false); - genSave(true, false, "id", "id", "IdType", "", "String", "String", "Id", "Ids", false, false, false, null, false); + genAccessors(true, false, "id", "id", "String", "", "String", "String", "Id", "Ids", false, "", false, false, null); + genLoad(true, false, "id", "id", "id", "IdType", "", "String", "String", "Id", "Ids", false, false, null, false); + genSave(true, false, "id", "id", "id", "IdType", "", "String", "String", "Id", "Ids", false, false, false, null, false); genClear(false, "id", "String"); } } @@ -382,9 +382,9 @@ public class PECodeGenerator { if (isPrim && field.hasFixedValue()) { genFixed(name, ptype, field.getFixedValue()); } - genAccessors(isPrim, isAbstract, name, type, init, ptype, ltype, cname, csname, field.isList(), field.documentation(), field.hasFixedValue(), isEnum, field.definition()); - genLoad(isPrim, isAbstract, name, sname, type, init, ptype, ltype, cname, csname, field.isList(), field.hasFixedValue(), field.types().get(0), isEnum); - genSave(isPrim, isAbstract, name, sname, type, init, ptype, ltype, cname, csname, field.isList(), field.hasFixedValue(), isExtension, field.types().get(0), isEnum); + genAccessors(isPrim, isAbstract, name, field.name(), type, init, ptype, ltype, cname, csname, field.isList(), field.documentation(), field.hasFixedValue(), isEnum, field.definition()); + genLoad(isPrim, isAbstract, name, sname, field.name(), type, init, ptype, ltype, cname, csname, field.isList(), field.hasFixedValue(), field.types().get(0), isEnum); + genSave(isPrim, isAbstract, name, sname, field.name(), type, init, ptype, ltype, cname, csname, field.isList(), field.hasFixedValue(), isExtension, field.types().get(0), isEnum); genClear(field.isList(), name, ptype); } } else { @@ -404,9 +404,9 @@ public class PECodeGenerator { } } - private void genLoad(boolean isPrim, boolean isAbstract, String name, String sname, String type, String init, String ptype, String ltype, String cname, String csname, boolean isList, boolean isFixed, PEType typeInfo, boolean isEnum) { + private void genLoad(boolean isPrim, boolean isAbstract, String name, String sname, String fname, String type, String init, String ptype, String ltype, String cname, String csname, boolean isList, boolean isFixed, PEType typeInfo, boolean isEnum) { if (isList) { - w(load, " for (PEInstance item : src.children(\""+sname+"\")) {"); + w(load, " for (PEInstance item : src.children(\""+fname+"\")) {"); if ("BackboneElement".equals(type)) { w(load, " "+name+".add(("+type+") item.asElement());"); } else { @@ -414,59 +414,59 @@ public class PECodeGenerator { } w(load, " }"); } else if (isEnum) { - w(load, " if (src.hasChild(\""+name+"\")) {"); + w(load, " if (src.hasChild(\""+fname+"\")) {"); if ("CodeableConcept".equals(typeInfo.getName())) { - w(load, " "+name+" = "+type+".fromCodeableConcept((CodeableConcept) src.child(\""+name+"\").asDataType());"); + w(load, " "+name+" = "+type+".fromCodeableConcept((CodeableConcept) src.child(\""+fname+"\").asDataType());"); } else if ("Coding".equals(typeInfo.getName())) { - w(load, " "+name+" = "+type+".fromCoding((Coding) src.child(\""+name+"\").asDataType());"); + w(load, " "+name+" = "+type+".fromCoding((Coding) src.child(\""+fname+"\").asDataType());"); } else { - w(load, " "+name+" = "+type+".fromCode(src.child(\""+name+"\").asDataType().primitiveValue());"); + w(load, " "+name+" = "+type+".fromCode(src.child(\""+fname+"\").asDataType().primitiveValue());"); } w(load, " }"); } else if (isPrim) { - w(load, " if (src.hasChild(\""+name+"\")) {"); + w(load, " if (src.hasChild(\""+fname+"\")) {"); if ("CodeType".equals(type)) { // might be code or enum - w(load, " "+name+" = src.child(\""+name+"\").asDataType().primitiveValue();"); + w(load, " "+name+" = src.child(\""+fname+"\").asDataType().primitiveValue();"); } else { - w(load, " "+name+" = (("+type+") src.child(\""+name+"\").asDataType()).getValue();"); + w(load, " "+name+" = (("+type+") src.child(\""+fname+"\").asDataType()).getValue();"); } w(load, " }"); } else if (typeInfo != null && typeInfo.getUrl() != null && !typeInfo.getUrl().startsWith("http://hl7.org/fhir/StructureDefinition")) { - w(load, " if (src.hasChild(\""+name+"\")) {"); - w(load, " "+name+" = "+type+".fromSource(src.child(\""+name+"\"));"); + w(load, " if (src.hasChild(\""+fname+"\")) {"); + w(load, " "+name+" = "+type+".fromSource(src.child(\""+fname+"\"));"); w(load, " }"); } else { - w(load, " if (src.hasChild(\""+name+"\")) {"); + w(load, " if (src.hasChild(\""+fname+"\")) {"); if ("BackboneElement".equals(type)) { - w(load, " "+name+" = ("+type+") src.child(\""+name+"\").asElement();"); + w(load, " "+name+" = ("+type+") src.child(\""+fname+"\").asElement();"); } else if (Utilities.existsInList(type, workerContext.getResourceNames())) { - w(load, " "+name+" = ("+type+") src.child(\""+name+"\").asResource();"); + w(load, " "+name+" = ("+type+") src.child(\""+fname+"\").asResource();"); } else { - w(load, " "+name+" = ("+type+") src.child(\""+name+"\").asDataType();"); + w(load, " "+name+" = ("+type+") src.child(\""+fname+"\").asDataType();"); } w(load, " }"); } } - private void genSave(boolean isPrim, boolean isAbstract, String name, String sname, String type, String init, String ptype, String ltype, String cname, String csname, boolean isList, boolean isFixed, boolean isExtension, PEType typeInfo, boolean isEnum) { - w(save, " tgt.clear(\""+sname+"\");"); + private void genSave(boolean isPrim, boolean isAbstract, String name, String sname, String fname, String type, String init, String ptype, String ltype, String cname, String csname, boolean isList, boolean isFixed, boolean isExtension, PEType typeInfo, boolean isEnum) { + w(save, " tgt.clear(\""+fname+"\");"); if (isList) { w(save, " for ("+type+" item : "+name+") {"); if (isExtension) { - w(save, " tgt.makeChild(\""+sname+"\").data().setProperty(\"value[x]\", item);"); + w(save, " tgt.makeChild(\""+fname+"\").data().setProperty(\"value[x]\", item);"); } else { - w(save, " tgt.addChild(\""+sname+"\", item);"); + w(save, " tgt.addChild(\""+fname+"\", item);"); } w(save, " }"); } else if (isEnum) { w(save, " if ("+name+" != null) {"); if ("CodeableConcept".equals(typeInfo.getName())) { - w(save, " tgt.addChild(\""+sname+"\", "+name+".toCodeableConcept());"); + w(save, " tgt.addChild(\""+fname+"\", "+name+".toCodeableConcept());"); } else if ("Coding".equals(typeInfo.getName())) { - w(save, " tgt.addChild(\""+sname+"\", "+name+".toCoding());"); + w(save, " tgt.addChild(\""+fname+"\", "+name+".toCoding());"); } else { - w(save, " tgt.addChild(\""+sname+"\", "+name+".toCode());"); + w(save, " tgt.addChild(\""+fname+"\", "+name+".toCode());"); } w(save, " }"); } else if (isPrim) { @@ -478,29 +478,29 @@ public class PECodeGenerator { w(save, " if ("+name+" != null) {"); } if (isExtension) { - w(save, " tgt.makeChild(\""+sname+"\").data().setProperty(\"value[x]\", new "+type+"("+name+"));"); + w(save, " tgt.makeChild(\""+fname+"\").data().setProperty(\"value[x]\", new "+type+"("+name+"));"); } else if (Utilities.existsInList(type, "DateType", "InstantType", "DateTimeType")) { - w(save, " tgt.addChild(\""+sname+"\", new "+type+"("+name+"));"); + w(save, " tgt.addChild(\""+fname+"\", new "+type+"("+name+"));"); } else { - w(save, " tgt.makeChild(\""+sname+"\").data().setProperty(\"value\", new "+type+"("+name+"));"); + w(save, " tgt.makeChild(\""+fname+"\").data().setProperty(\"value\", new "+type+"("+name+"));"); } w(save, " }"); } else if (typeInfo != null && typeInfo.getUrl() != null && !typeInfo.getUrl().startsWith("http://hl7.org/fhir/StructureDefinition")) { w(save, " if ("+name+" != null) {"); - w(save, " "+name+".save(tgt.makeChild(\""+sname+"\"), nulls);"); + w(save, " "+name+".save(tgt.makeChild(\""+fname+"\"), nulls);"); w(save, " }"); } else if (isExtension) { w(save, " if ("+name+" != null) {"); - w(save, " tgt.makeChild(\""+sname+"\").data().setProperty(\"value[x]\", "+name+");"); + w(save, " tgt.makeChild(\""+fname+"\").data().setProperty(\"value[x]\", "+name+");"); w(save, " }"); } else { w(save, " if ("+name+" != null) {"); - w(save, " tgt.addChild(\""+sname+"\", "+name+");"); + w(save, " tgt.addChild(\""+fname+"\", "+name+");"); w(save, " }"); } } - private void genAccessors(boolean isPrim, boolean isAbstract, String name, String type, String init, String ptype, String ltype, String cname, String csname, boolean isList, String shortDoco, boolean isFixed, boolean isEnum, ElementDefinition ed) { + private void genAccessors(boolean isPrim, boolean isAbstract, String name, String fname, String type, String init, String ptype, String ltype, String cname, String csname, boolean isList, String shortDoco, boolean isFixed, boolean isEnum, ElementDefinition ed) { if (ed != null) { jdoc(accessors, ed.getDefinition(), 2, true); } diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/PECodeGenTests.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/PECodeGenTests.java index cff21337c..6aec55ce6 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/PECodeGenTests.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/PECodeGenTests.java @@ -1,11 +1,14 @@ package org.hl7.fhir.r5.test.profiles; import java.io.IOException; +import java.util.UUID; import org.hl7.fhir.r5.context.IWorkerContext; import org.hl7.fhir.r5.formats.JsonParser; import org.hl7.fhir.r5.model.MedicinalProductDefinition; import org.hl7.fhir.r5.model.Resource; +import org.hl7.fhir.r5.test.profiles.codegen.DkCoreDeCprIdentifier; +import org.hl7.fhir.r5.test.profiles.codegen.DkCorePatient; import org.hl7.fhir.r5.test.profiles.codegen.MedicinalProductDefinitionUvEpi; import org.hl7.fhir.r5.test.utils.TestPackageLoader; import org.hl7.fhir.r5.test.utils.TestingUtilities; @@ -46,6 +49,13 @@ public class PECodeGenTests { } + @Test + public void testConstruct1() throws IOException { + load(); + var patient = new DkCorePatient(ctxt).setDEcpr(new DkCoreDeCprIdentifier().setSystem(DkCoreDeCprIdentifier.DkCoreDeCPRValueSet.URNOID122081761613).setValue(UUID.randomUUID().toString())); + var pat = patient.build(ctxt); + } + @Test public void testProfile() throws IOException { load(); diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/AdministrableProductDefinitionUvEpi.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/AdministrableProductDefinitionUvEpi.java index 83b744602..e8ddc4395 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/AdministrableProductDefinitionUvEpi.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/AdministrableProductDefinitionUvEpi.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * A medicinal product in the final form which is suitable for administering to a diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/AuthorizationIdentifier.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/AuthorizationIdentifier.java index bd0c6828d..7e2ec34b8 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/AuthorizationIdentifier.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/AuthorizationIdentifier.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * An identifier - identifies some entity uniquely and unambiguously. Typically diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/BundleUvEpi.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/BundleUvEpi.java index 7f3c064c2..a468f65af 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/BundleUvEpi.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/BundleUvEpi.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * Electronic Product Information Bundle Document. A container for the collection diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/CVRIdentifier.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/CVRIdentifier.java index 8d4cc399c..6344ac546 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/CVRIdentifier.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/CVRIdentifier.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * An identifier - identifies some entity uniquely and unambiguously. Typically diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionContraindicationUvEpi.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionContraindicationUvEpi.java index 083cf9f10..d93ec0293 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionContraindicationUvEpi.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionContraindicationUvEpi.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * A single issue - either an indication, contraindication, interaction or an diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionIndicationUvEpi.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionIndicationUvEpi.java index d6430cd73..6d07d16d5 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionIndicationUvEpi.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionIndicationUvEpi.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * A single issue - either an indication, contraindication, interaction or an diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionInteractionUvEpi.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionInteractionUvEpi.java index 1485bc1a0..e81065145 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionInteractionUvEpi.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionInteractionUvEpi.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * A single issue - either an indication, contraindication, interaction or an diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionUndesirableEffectUvEpi.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionUndesirableEffectUvEpi.java index 0b1a1691f..56d4f4d8c 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionUndesirableEffectUvEpi.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionUndesirableEffectUvEpi.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * A single issue - either an indication, contraindication, interaction or an diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionWarningUvEpi.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionWarningUvEpi.java index b71814be6..fcbf92fc7 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionWarningUvEpi.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ClinicalUseDefinitionWarningUvEpi.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * A single issue - either an indication, contraindication, interaction or an diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/CompositionUvEpi.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/CompositionUvEpi.java index 6214e0daa..b5b92701a 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/CompositionUvEpi.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/CompositionUvEpi.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * A set of healthcare-related information that is assembled together into a single diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ConditionLastAssertedDate.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ConditionLastAssertedDate.java index e6ae5a32c..66627002b 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ConditionLastAssertedDate.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ConditionLastAssertedDate.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * Extension for the last date a Condition-instance was confirmed valid in its diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreBasicObservation.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreBasicObservation.java index 6ccbb1caa..bb50c28e0 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreBasicObservation.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreBasicObservation.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * Measurements and simple assertions made about a patient, device or other @@ -203,8 +203,8 @@ public class DkCoreBasicObservation extends PEGeneratedBase { for (PEInstance item : src.children("performer")) { performers.add((Reference) item.asDataType()); } - if (src.hasChild("value")) { - value = (Quantity) src.child("value").asDataType(); + if (src.hasChild("value[x]")) { + value = (Quantity) src.child("value[x]").asDataType(); } if (src.hasChild("dataAbsentReason")) { dataAbsentReason = (CodeableConcept) src.child("dataAbsentReason").asDataType(); @@ -322,9 +322,9 @@ public class DkCoreBasicObservation extends PEGeneratedBase { for (Reference item : performers) { tgt.addChild("performer", item); } - tgt.clear("value"); + tgt.clear("value[x]"); if (value != null) { - tgt.addChild("value", value); + tgt.addChild("value[x]", value); } tgt.clear("dataAbsentReason"); if (dataAbsentReason != null) { diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreCondition.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreCondition.java index 32911366e..bc9641999 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreCondition.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreCondition.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * A clinical condition, problem, diagnosis, or other event, situation, issue, or diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreCprIdentifier.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreCprIdentifier.java index 61f45cd85..696c459fb 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreCprIdentifier.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreCprIdentifier.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * An identifier - identifies some entity uniquely and unambiguously. Typically diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreDeCprIdentifier.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreDeCprIdentifier.java index da5d317e3..28ea14d33 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreDeCprIdentifier.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreDeCprIdentifier.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * An identifier - identifies some entity uniquely and unambiguously. Typically diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreObservation.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreObservation.java index d75d0f675..e903bbc19 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreObservation.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreObservation.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * Measurements and simple assertions made about a patient, device or other @@ -195,8 +195,8 @@ public class DkCoreObservation extends PEGeneratedBase { for (PEInstance item : src.children("performer")) { performers.add((Reference) item.asDataType()); } - if (src.hasChild("value")) { - value = (Quantity) src.child("value").asDataType(); + if (src.hasChild("value[x]")) { + value = (Quantity) src.child("value[x]").asDataType(); } if (src.hasChild("dataAbsentReason")) { dataAbsentReason = (CodeableConcept) src.child("dataAbsentReason").asDataType(); @@ -310,9 +310,9 @@ public class DkCoreObservation extends PEGeneratedBase { for (Reference item : performers) { tgt.addChild("performer", item); } - tgt.clear("value"); + tgt.clear("value[x]"); if (value != null) { - tgt.addChild("value", value); + tgt.addChild("value[x]", value); } tgt.clear("dataAbsentReason"); if (dataAbsentReason != null) { diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreOrganization.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreOrganization.java index e669cbae7..16bbebcde 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreOrganization.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreOrganization.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * A formally or informally recognized grouping of people or organizations formed @@ -153,20 +153,20 @@ public class DkCoreOrganization extends PEGeneratedBase { for (PEInstance item : src.children("identifier")) { identifiers.add((Identifier) item.asDataType()); } - if (src.hasChild("EANID")) { - EANID = GLNIdentifier.fromSource(src.child("EANID")); + if (src.hasChild("EAN-ID")) { + EANID = GLNIdentifier.fromSource(src.child("EAN-ID")); } - if (src.hasChild("SORID")) { - SORID = SORIdentifier.fromSource(src.child("SORID")); + if (src.hasChild("SOR-ID")) { + SORID = SORIdentifier.fromSource(src.child("SOR-ID")); } - if (src.hasChild("KOMBITORGID")) { - KOMBITORGID = KombitOrgIdentifier.fromSource(src.child("KOMBITORGID")); + if (src.hasChild("KOMBIT-ORG-ID")) { + KOMBITORGID = KombitOrgIdentifier.fromSource(src.child("KOMBIT-ORG-ID")); } if (src.hasChild("Ydernummer")) { Ydernummer = (Identifier) src.child("Ydernummer").asDataType(); } - if (src.hasChild("CVRID")) { - CVRID = CVRIdentifier.fromSource(src.child("CVRID")); + if (src.hasChild("CVR-ID")) { + CVRID = CVRIdentifier.fromSource(src.child("CVR-ID")); } if (src.hasChild("Kommunekode")) { Kommunekode = (Identifier) src.child("Kommunekode").asDataType(); @@ -248,25 +248,25 @@ public class DkCoreOrganization extends PEGeneratedBase { for (Identifier item : identifiers) { tgt.addChild("identifier", item); } - tgt.clear("EANID"); + tgt.clear("EAN-ID"); if (EANID != null) { - EANID.save(tgt.makeChild("EANID"), nulls); + EANID.save(tgt.makeChild("EAN-ID"), nulls); } - tgt.clear("SORID"); + tgt.clear("SOR-ID"); if (SORID != null) { - SORID.save(tgt.makeChild("SORID"), nulls); + SORID.save(tgt.makeChild("SOR-ID"), nulls); } - tgt.clear("KOMBITORGID"); + tgt.clear("KOMBIT-ORG-ID"); if (KOMBITORGID != null) { - KOMBITORGID.save(tgt.makeChild("KOMBITORGID"), nulls); + KOMBITORGID.save(tgt.makeChild("KOMBIT-ORG-ID"), nulls); } tgt.clear("Ydernummer"); if (Ydernummer != null) { tgt.addChild("Ydernummer", Ydernummer); } - tgt.clear("CVRID"); + tgt.clear("CVR-ID"); if (CVRID != null) { - CVRID.save(tgt.makeChild("CVRID"), nulls); + CVRID.save(tgt.makeChild("CVR-ID"), nulls); } tgt.clear("Kommunekode"); if (Kommunekode != null) { diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCorePatient.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCorePatient.java index 90c4abcac..162699687 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCorePatient.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCorePatient.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * Demographics and other administrative information about an individual or animal @@ -150,11 +150,11 @@ public class DkCorePatient extends PEGeneratedBase { if (src.hasChild("cpr")) { cpr = DkCoreCprIdentifier.fromSource(src.child("cpr")); } - if (src.hasChild("xEcpr")) { - xEcpr = DkCoreXeCprIdentifier.fromSource(src.child("xEcpr")); + if (src.hasChild("x-ecpr")) { + xEcpr = DkCoreXeCprIdentifier.fromSource(src.child("x-ecpr")); } - if (src.hasChild("dEcpr")) { - dEcpr = DkCoreDeCprIdentifier.fromSource(src.child("dEcpr")); + if (src.hasChild("d-ecpr")) { + dEcpr = DkCoreDeCprIdentifier.fromSource(src.child("d-ecpr")); } if (src.hasChild("official")) { official = (HumanName) src.child("official").asDataType(); @@ -243,13 +243,13 @@ public class DkCorePatient extends PEGeneratedBase { if (cpr != null) { cpr.save(tgt.makeChild("cpr"), nulls); } - tgt.clear("xEcpr"); + tgt.clear("x-ecpr"); if (xEcpr != null) { - xEcpr.save(tgt.makeChild("xEcpr"), nulls); + xEcpr.save(tgt.makeChild("x-ecpr"), nulls); } - tgt.clear("dEcpr"); + tgt.clear("d-ecpr"); if (dEcpr != null) { - dEcpr.save(tgt.makeChild("dEcpr"), nulls); + dEcpr.save(tgt.makeChild("d-ecpr"), nulls); } tgt.clear("official"); if (official != null) { diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCorePractitioner.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCorePractitioner.java index 46b9d6996..6d96be987 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCorePractitioner.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCorePractitioner.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * A person who is directly or indirectly involved in the provisioning of diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreRelatedPerson.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreRelatedPerson.java index 7bdc310ef..111d8437a 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreRelatedPerson.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreRelatedPerson.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * Information about a person that is involved in the care for a patient, but who @@ -135,11 +135,11 @@ public class DkCoreRelatedPerson extends PEGeneratedBase { if (src.hasChild("cpr")) { cpr = DkCoreCprIdentifier.fromSource(src.child("cpr")); } - if (src.hasChild("xEcpr")) { - xEcpr = DkCoreXeCprIdentifier.fromSource(src.child("xEcpr")); + if (src.hasChild("x-ecpr")) { + xEcpr = DkCoreXeCprIdentifier.fromSource(src.child("x-ecpr")); } - if (src.hasChild("dEcpr")) { - dEcpr = DkCoreDeCprIdentifier.fromSource(src.child("dEcpr")); + if (src.hasChild("d-ecpr")) { + dEcpr = DkCoreDeCprIdentifier.fromSource(src.child("d-ecpr")); } if (src.hasChild("patient")) { patient = (Reference) src.child("patient").asDataType(); @@ -216,13 +216,13 @@ public class DkCoreRelatedPerson extends PEGeneratedBase { if (cpr != null) { cpr.save(tgt.makeChild("cpr"), nulls); } - tgt.clear("xEcpr"); + tgt.clear("x-ecpr"); if (xEcpr != null) { - xEcpr.save(tgt.makeChild("xEcpr"), nulls); + xEcpr.save(tgt.makeChild("x-ecpr"), nulls); } - tgt.clear("dEcpr"); + tgt.clear("d-ecpr"); if (dEcpr != null) { - dEcpr.save(tgt.makeChild("dEcpr"), nulls); + dEcpr.save(tgt.makeChild("d-ecpr"), nulls); } tgt.clear("patient"); if (patient != null) { diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreXeCprIdentifier.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreXeCprIdentifier.java index 7b5d7858b..5065af91a 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreXeCprIdentifier.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/DkCoreXeCprIdentifier.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * An identifier - identifies some entity uniquely and unambiguously. Typically diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/GLNIdentifier.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/GLNIdentifier.java index 34bcde8ea..3d41e7191 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/GLNIdentifier.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/GLNIdentifier.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * An identifier - identifies some entity uniquely and unambiguously. Typically diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/IngredientUvEpi.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/IngredientUvEpi.java index af56cfd46..d5eb08814 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/IngredientUvEpi.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/IngredientUvEpi.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * An ingredient of a manufactured item or pharmaceutical product. @@ -201,7 +201,7 @@ public class IngredientUvEpi extends PEGeneratedBase { if (src.hasChild("status")) { status = PublicationStatus.fromCode(src.child("status").asDataType().primitiveValue()); } - for (PEInstance item : src.children("_for")) { + for (PEInstance item : src.children("for")) { _fors.add((Reference) item.asDataType()); } if (src.hasChild("role")) { @@ -273,9 +273,9 @@ public class IngredientUvEpi extends PEGeneratedBase { if (status != null) { tgt.addChild("status", status.toCode()); } - tgt.clear("_for"); + tgt.clear("for"); for (Reference item : _fors) { - tgt.addChild("_for", item); + tgt.addChild("for", item); } tgt.clear("role"); if (role != null) { diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/KombitOrgIdentifier.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/KombitOrgIdentifier.java index ad240ca97..32f5aa32c 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/KombitOrgIdentifier.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/KombitOrgIdentifier.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * An identifier - identifies some entity uniquely and unambiguously. Typically diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ManufacturedItemDefinitionUvEpi.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ManufacturedItemDefinitionUvEpi.java index b8c96c529..db8e23dd6 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ManufacturedItemDefinitionUvEpi.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ManufacturedItemDefinitionUvEpi.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * The definition and characteristics of a medicinal manufactured item, such as a diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/MedicinalProductDefinitionUvEpi.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/MedicinalProductDefinitionUvEpi.java index a7ff60b2a..45679c696 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/MedicinalProductDefinitionUvEpi.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/MedicinalProductDefinitionUvEpi.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * A medicinal product, being a substance or combination of substances that is diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/MunicipalityCodes.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/MunicipalityCodes.java index efd250c0c..41e384271 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/MunicipalityCodes.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/MunicipalityCodes.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * Identifier holding the official identifier for a danish municipality @@ -57,16 +57,16 @@ public class MunicipalityCodes extends PEGeneratedBase { public void load(PEInstance src) { clear(); - if (src.hasChild("value")) { - value = (CodeableConcept) src.child("value").asDataType(); + if (src.hasChild("value[x]")) { + value = (CodeableConcept) src.child("value[x]").asDataType(); } } public void save(PEInstance tgt, boolean nulls) { - tgt.clear("value"); + tgt.clear("value[x]"); if (value != null) { - tgt.addChild("value", value); + tgt.addChild("value[x]", value); } } diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/NotFollowedAnymore.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/NotFollowedAnymore.java index 4dbc806ba..2799324d0 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/NotFollowedAnymore.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/NotFollowedAnymore.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * Extension for the date where a condition lost focus in a specific clinical diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/OrganizationUvEpi.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/OrganizationUvEpi.java index d62364713..386ae19ed 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/OrganizationUvEpi.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/OrganizationUvEpi.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * A formally or informally recognized grouping of people or organizations formed diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/PackagedProductDefinitionUvEpi.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/PackagedProductDefinitionUvEpi.java index 352a4c811..a7656a5b7 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/PackagedProductDefinitionUvEpi.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/PackagedProductDefinitionUvEpi.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * A medically related item or items, in a container or package. diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ProducentId.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ProducentId.java index 32477af61..4e82d0f15 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ProducentId.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/ProducentId.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * An identifier - identifies some entity uniquely and unambiguously. Typically diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/RegionalSubDivisionCodes.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/RegionalSubDivisionCodes.java index 745f5a14c..19a83d9aa 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/RegionalSubDivisionCodes.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/RegionalSubDivisionCodes.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * Identifier holding the official organization identifier for a danish region @@ -57,16 +57,16 @@ public class RegionalSubDivisionCodes extends PEGeneratedBase { public void load(PEInstance src) { clear(); - if (src.hasChild("value")) { - value = (CodeableConcept) src.child("value").asDataType(); + if (src.hasChild("value[x]")) { + value = (CodeableConcept) src.child("value[x]").asDataType(); } } public void save(PEInstance tgt, boolean nulls) { - tgt.clear("value"); + tgt.clear("value[x]"); if (value != null) { - tgt.addChild("value", value); + tgt.addChild("value[x]", value); } } diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/RegulatedAuthorizationUvEpi.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/RegulatedAuthorizationUvEpi.java index 19bae3338..ab6bdf631 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/RegulatedAuthorizationUvEpi.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/RegulatedAuthorizationUvEpi.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * Regulatory approval, clearance or licencing related to a regulated product, @@ -143,8 +143,8 @@ public class RegulatedAuthorizationUvEpi extends PEGeneratedBase { for (PEInstance item : src.children("attachedDocument")) { attachedDocuments.add((Reference) item.asDataType()); } - if (src.hasChild("_case")) { - _case = (BackboneElement) src.child("_case").asElement(); + if (src.hasChild("case")) { + _case = (BackboneElement) src.child("case").asElement(); } } @@ -223,9 +223,9 @@ public class RegulatedAuthorizationUvEpi extends PEGeneratedBase { for (Reference item : attachedDocuments) { tgt.addChild("attachedDocument", item); } - tgt.clear("_case"); + tgt.clear("case"); if (_case != null) { - tgt.addChild("_case", _case); + tgt.addChild("case", _case); } } diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/SORIdentifier.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/SORIdentifier.java index a7b412ce9..4d0c74b86 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/SORIdentifier.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/SORIdentifier.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * An identifier - identifies some entity uniquely and unambiguously. Typically diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/SubstanceDefinitionUvEpi.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/SubstanceDefinitionUvEpi.java index ff55d21fa..69043b681 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/SubstanceDefinitionUvEpi.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/profiles/codegen/SubstanceDefinitionUvEpi.java @@ -22,7 +22,7 @@ import org.hl7.fhir.r5.profilemodel.gen.MustSupport; import org.hl7.fhir.r5.profilemodel.gen.Definition; -// Generated by the HAPI Java Profile Generator, 2/11/24, 10:50 pm +// Generated by the HAPI Java Profile Generator, 5/11/24, 6:00 pm /** * The detailed description of a substance, typically at a level beyond what is