diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/misc/CPTImporter.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/misc/CPTImporter.java index 7467b47a0..7ec1db586 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/misc/CPTImporter.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/misc/CPTImporter.java @@ -86,7 +86,8 @@ public class CPTImporter { new JsonParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(dst), cs); produceDB(Utilities.changeFileExt(dst, ".db"), cs); - cs.getConcept().removeIf(cc -> !Utilities.existsInList(cc.getCode(), "metadata-kinds", "metadata-designations", "99202", "99203", "25", "P1")); + cs.setContent(CodeSystemContentMode.FRAGMENT); + cs.getConcept().removeIf(cc -> !Utilities.existsInList(cc.getCode(), "metadata-kinds", "metadata-designations", "99202", "99203", "0001A", "25", "P1", "1P", "F1")); new JsonParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(Utilities.changeFileExt(dst, "-fragment.json")), cs); produceDB(Utilities.changeFileExt(dst, "-fragment.db"), cs); } diff --git a/org.hl7.fhir.core.generator/src/org/hl7/fhir/core/generator/codegen/JavaResourceGenerator.java b/org.hl7.fhir.core.generator/src/org/hl7/fhir/core/generator/codegen/JavaResourceGenerator.java index 6a1d044d2..44023f9ac 100644 --- a/org.hl7.fhir.core.generator/src/org/hl7/fhir/core/generator/codegen/JavaResourceGenerator.java +++ b/org.hl7.fhir.core.generator/src/org/hl7/fhir/core/generator/codegen/JavaResourceGenerator.java @@ -1083,7 +1083,7 @@ private void generatePropertyMaker(Analysis analysis, TypeInfo ti, String indent first = false; write( "if (name.equals(\""+namet+"\")) {\r\n"); if (isPrimitive(e.typeSummary()) || e.typeSummary().startsWith("canonical(")) - write(indent+" throw new FHIRException(\"Cannot call addChild on a primitive type "+parent+"."+e.getName()+"\");\r\n"); + write(indent+" throw new FHIRException(\"Cannot call addChild on a singleton property "+parent+"."+e.getName()+"\");\r\n"); else if (isAbstract(e.typeSummary())) write(indent+" throw new FHIRException(\"Cannot call addChild on an abstract type "+parent+"."+e.getName()+"\");\r\n"); else if (e.unbounded()) { diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Account.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Account.java index c3c8f86ea..fbb52a827 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Account.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Account.java @@ -782,12 +782,12 @@ public class Account extends DomainResource { if (name.equals("identifier")) { return addIdentifier(); } else if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a primitive type Account.name"); + throw new FHIRException("Cannot call addChild on a singleton property Account.name"); } else if (name.equals("type")) { this.type = new CodeableConcept(); return this.type; } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type Account.status"); + throw new FHIRException("Cannot call addChild on a singleton property Account.status"); } else if (name.equals("activePeriod")) { this.activePeriod = new Period(); return this.activePeriod; @@ -807,7 +807,7 @@ public class Account extends DomainResource { this.owner = new Reference(); return this.owner; } else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type Account.description"); + throw new FHIRException("Cannot call addChild on a singleton property Account.description"); } else return super.addChild(name); } diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Address.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Address.java index 7f6ddceea..1bcd0f1ba 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Address.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Address.java @@ -1011,23 +1011,23 @@ public class Address extends Type implements ICompositeType { @Override public Base addChild(String name) throws FHIRException { if (name.equals("use")) { - throw new FHIRException("Cannot call addChild on a primitive type Address.use"); + throw new FHIRException("Cannot call addChild on a singleton property Address.use"); } else if (name.equals("type")) { - throw new FHIRException("Cannot call addChild on a primitive type Address.type"); + throw new FHIRException("Cannot call addChild on a singleton property Address.type"); } else if (name.equals("text")) { - throw new FHIRException("Cannot call addChild on a primitive type Address.text"); + throw new FHIRException("Cannot call addChild on a singleton property Address.text"); } else if (name.equals("line")) { - throw new FHIRException("Cannot call addChild on a primitive type Address.line"); + throw new FHIRException("Cannot call addChild on a singleton property Address.line"); } else if (name.equals("city")) { - throw new FHIRException("Cannot call addChild on a primitive type Address.city"); + throw new FHIRException("Cannot call addChild on a singleton property Address.city"); } else if (name.equals("district")) { - throw new FHIRException("Cannot call addChild on a primitive type Address.district"); + throw new FHIRException("Cannot call addChild on a singleton property Address.district"); } else if (name.equals("state")) { - throw new FHIRException("Cannot call addChild on a primitive type Address.state"); + throw new FHIRException("Cannot call addChild on a singleton property Address.state"); } else if (name.equals("postalCode")) { - throw new FHIRException("Cannot call addChild on a primitive type Address.postalCode"); + throw new FHIRException("Cannot call addChild on a singleton property Address.postalCode"); } else if (name.equals("country")) { - throw new FHIRException("Cannot call addChild on a primitive type Address.country"); + throw new FHIRException("Cannot call addChild on a singleton property Address.country"); } else if (name.equals("period")) { this.period = new Period(); return this.period; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/AllergyIntolerance.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/AllergyIntolerance.java index 7a2103229..6999e2dde 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/AllergyIntolerance.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/AllergyIntolerance.java @@ -1443,15 +1443,15 @@ public class AllergyIntolerance extends DomainResource { this.substance = new CodeableConcept(); return this.substance; } else if (name.equals("certainty")) { - throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.certainty"); + throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.certainty"); } else if (name.equals("manifestation")) { return addManifestation(); } else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.description"); + throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.description"); } else if (name.equals("onset")) { - throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.onset"); + throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.onset"); } else if (name.equals("severity")) { - throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.severity"); + throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.severity"); } else if (name.equals("exposureRoute")) { this.exposureRoute = new CodeableConcept(); return this.exposureRoute; @@ -2433,9 +2433,9 @@ public class AllergyIntolerance extends DomainResource { if (name.equals("identifier")) { return addIdentifier(); } else if (name.equals("onset")) { - throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.onset"); + throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.onset"); } else if (name.equals("recordedDate")) { - throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.recordedDate"); + throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.recordedDate"); } else if (name.equals("recorder")) { this.recorder = new Reference(); return this.recorder; @@ -2449,15 +2449,15 @@ public class AllergyIntolerance extends DomainResource { this.substance = new CodeableConcept(); return this.substance; } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.status"); + throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.status"); } else if (name.equals("criticality")) { - throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.criticality"); + throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.criticality"); } else if (name.equals("type")) { - throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.type"); + throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.type"); } else if (name.equals("category")) { - throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.category"); + throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.category"); } else if (name.equals("lastOccurence")) { - throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.lastOccurence"); + throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.lastOccurence"); } else if (name.equals("note")) { this.note = new Annotation(); return this.note; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Annotation.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Annotation.java index 4f7a8a9a0..1742dbd00 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Annotation.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Annotation.java @@ -270,9 +270,9 @@ public class Annotation extends Type implements ICompositeType { this.author = new StringType(); return this.author; } else if (name.equals("time")) { - throw new FHIRException("Cannot call addChild on a primitive type Annotation.time"); + throw new FHIRException("Cannot call addChild on a singleton property Annotation.time"); } else if (name.equals("text")) { - throw new FHIRException("Cannot call addChild on a primitive type Annotation.text"); + throw new FHIRException("Cannot call addChild on a singleton property Annotation.text"); } else return super.addChild(name); } diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Appointment.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Appointment.java index 2c69eb494..3c516c3fd 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Appointment.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Appointment.java @@ -853,9 +853,9 @@ public class Appointment extends DomainResource { this.actor = new Reference(); return this.actor; } else if (name.equals("required")) { - throw new FHIRException("Cannot call addChild on a primitive type Appointment.required"); + throw new FHIRException("Cannot call addChild on a singleton property Appointment.required"); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type Appointment.status"); + throw new FHIRException("Cannot call addChild on a singleton property Appointment.status"); } else return super.addChild(name); } @@ -1730,7 +1730,7 @@ public class Appointment extends DomainResource { if (name.equals("identifier")) { return addIdentifier(); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type Appointment.status"); + throw new FHIRException("Cannot call addChild on a singleton property Appointment.status"); } else if (name.equals("type")) { this.type = new CodeableConcept(); return this.type; @@ -1738,19 +1738,19 @@ public class Appointment extends DomainResource { this.reason = new CodeableConcept(); return this.reason; } else if (name.equals("priority")) { - throw new FHIRException("Cannot call addChild on a primitive type Appointment.priority"); + throw new FHIRException("Cannot call addChild on a singleton property Appointment.priority"); } else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type Appointment.description"); + throw new FHIRException("Cannot call addChild on a singleton property Appointment.description"); } else if (name.equals("start")) { - throw new FHIRException("Cannot call addChild on a primitive type Appointment.start"); + throw new FHIRException("Cannot call addChild on a singleton property Appointment.start"); } else if (name.equals("end")) { - throw new FHIRException("Cannot call addChild on a primitive type Appointment.end"); + throw new FHIRException("Cannot call addChild on a singleton property Appointment.end"); } else if (name.equals("minutesDuration")) { - throw new FHIRException("Cannot call addChild on a primitive type Appointment.minutesDuration"); + throw new FHIRException("Cannot call addChild on a singleton property Appointment.minutesDuration"); } else if (name.equals("slot")) { return addSlot(); } else if (name.equals("comment")) { - throw new FHIRException("Cannot call addChild on a primitive type Appointment.comment"); + throw new FHIRException("Cannot call addChild on a singleton property Appointment.comment"); } else if (name.equals("participant")) { return addParticipant(); } else diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/AppointmentResponse.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/AppointmentResponse.java index d8f861c75..d259d8597 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/AppointmentResponse.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/AppointmentResponse.java @@ -824,18 +824,18 @@ public class AppointmentResponse extends DomainResource { this.appointment = new Reference(); return this.appointment; } else if (name.equals("start")) { - throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.start"); + throw new FHIRException("Cannot call addChild on a singleton property AppointmentResponse.start"); } else if (name.equals("end")) { - throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.end"); + throw new FHIRException("Cannot call addChild on a singleton property AppointmentResponse.end"); } else if (name.equals("participantType")) { return addParticipantType(); } else if (name.equals("actor")) { this.actor = new Reference(); return this.actor; } else if (name.equals("participantStatus")) { - throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.participantStatus"); + throw new FHIRException("Cannot call addChild on a singleton property AppointmentResponse.participantStatus"); } else if (name.equals("comment")) { - throw new FHIRException("Cannot call addChild on a primitive type AppointmentResponse.comment"); + throw new FHIRException("Cannot call addChild on a singleton property AppointmentResponse.comment"); } else return super.addChild(name); } diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Attachment.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Attachment.java index 462afc311..66cbb7f0e 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Attachment.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Attachment.java @@ -613,21 +613,21 @@ public class Attachment extends Type implements ICompositeType { @Override public Base addChild(String name) throws FHIRException { if (name.equals("contentType")) { - throw new FHIRException("Cannot call addChild on a primitive type Attachment.contentType"); + throw new FHIRException("Cannot call addChild on a singleton property Attachment.contentType"); } else if (name.equals("language")) { - throw new FHIRException("Cannot call addChild on a primitive type Attachment.language"); + throw new FHIRException("Cannot call addChild on a singleton property Attachment.language"); } else if (name.equals("data")) { - throw new FHIRException("Cannot call addChild on a primitive type Attachment.data"); + throw new FHIRException("Cannot call addChild on a singleton property Attachment.data"); } else if (name.equals("url")) { - throw new FHIRException("Cannot call addChild on a primitive type Attachment.url"); + throw new FHIRException("Cannot call addChild on a singleton property Attachment.url"); } else if (name.equals("size")) { - throw new FHIRException("Cannot call addChild on a primitive type Attachment.size"); + throw new FHIRException("Cannot call addChild on a singleton property Attachment.size"); } else if (name.equals("hash")) { - throw new FHIRException("Cannot call addChild on a primitive type Attachment.hash"); + throw new FHIRException("Cannot call addChild on a singleton property Attachment.hash"); } else if (name.equals("title")) { - throw new FHIRException("Cannot call addChild on a primitive type Attachment.title"); + throw new FHIRException("Cannot call addChild on a singleton property Attachment.title"); } else if (name.equals("creation")) { - throw new FHIRException("Cannot call addChild on a primitive type Attachment.creation"); + throw new FHIRException("Cannot call addChild on a singleton property Attachment.creation"); } else return super.addChild(name); } diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/AuditEvent.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/AuditEvent.java index 660d05c35..75a36585e 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/AuditEvent.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/AuditEvent.java @@ -999,13 +999,13 @@ public class AuditEvent extends DomainResource { } else if (name.equals("subtype")) { return addSubtype(); } else if (name.equals("action")) { - throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.action"); + throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.action"); } else if (name.equals("dateTime")) { - throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.dateTime"); + throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.dateTime"); } else if (name.equals("outcome")) { - throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.outcome"); + throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.outcome"); } else if (name.equals("outcomeDesc")) { - throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.outcomeDesc"); + throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.outcomeDesc"); } else if (name.equals("purposeOfEvent")) { return addPurposeOfEvent(); } else @@ -1772,16 +1772,16 @@ public class AuditEvent extends DomainResource { this.userId = new Identifier(); return this.userId; } else if (name.equals("altId")) { - throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.altId"); + throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.altId"); } else if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.name"); + throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.name"); } else if (name.equals("requestor")) { - throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.requestor"); + throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.requestor"); } else if (name.equals("location")) { this.location = new Reference(); return this.location; } else if (name.equals("policy")) { - throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.policy"); + throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.policy"); } else if (name.equals("media")) { this.media = new Coding(); return this.media; @@ -2034,9 +2034,9 @@ public class AuditEvent extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("address")) { - throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.address"); + throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.address"); } else if (name.equals("type")) { - throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.type"); + throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.type"); } else return super.addChild(name); } @@ -2279,7 +2279,7 @@ public class AuditEvent extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("site")) { - throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.site"); + throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.site"); } else if (name.equals("identifier")) { this.identifier = new Identifier(); return this.identifier; @@ -2910,11 +2910,11 @@ public class AuditEvent extends DomainResource { } else if (name.equals("securityLabel")) { return addSecurityLabel(); } else if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.name"); + throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.name"); } else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.description"); + throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.description"); } else if (name.equals("query")) { - throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.query"); + throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.query"); } else if (name.equals("detail")) { return addDetail(); } else @@ -3140,9 +3140,9 @@ public class AuditEvent extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("type")) { - throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.type"); + throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.type"); } else if (name.equals("value")) { - throw new FHIRException("Cannot call addChild on a primitive type AuditEvent.value"); + throw new FHIRException("Cannot call addChild on a singleton property AuditEvent.value"); } else return super.addChild(name); } diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Basic.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Basic.java index 06a6a55e5..de2df2867 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Basic.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Basic.java @@ -383,7 +383,7 @@ public class Basic extends DomainResource { this.author = new Reference(); return this.author; } else if (name.equals("created")) { - throw new FHIRException("Cannot call addChild on a primitive type Basic.created"); + throw new FHIRException("Cannot call addChild on a singleton property Basic.created"); } else return super.addChild(name); } diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Binary.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Binary.java index 33d7a0ce2..9df7d3903 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Binary.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Binary.java @@ -203,9 +203,9 @@ public class Binary extends BaseBinary implements IBaseBinary { @Override public Base addChild(String name) throws FHIRException { if (name.equals("contentType")) { - throw new FHIRException("Cannot call addChild on a primitive type Binary.contentType"); + throw new FHIRException("Cannot call addChild on a singleton property Binary.contentType"); } else if (name.equals("content")) { - throw new FHIRException("Cannot call addChild on a primitive type Binary.content"); + throw new FHIRException("Cannot call addChild on a singleton property Binary.content"); } else return super.addChild(name); } diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/BodySite.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/BodySite.java index f332cca7d..9fd4363bb 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/BodySite.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/BodySite.java @@ -421,7 +421,7 @@ public class BodySite extends DomainResource { } else if (name.equals("modifier")) { return addModifier(); } else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type BodySite.description"); + throw new FHIRException("Cannot call addChild on a singleton property BodySite.description"); } else if (name.equals("image")) { return addImage(); } else diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Bundle.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Bundle.java index eb6d16fc7..3f364ead0 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Bundle.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Bundle.java @@ -755,9 +755,9 @@ public class Bundle extends Resource implements IBaseBundle { @Override public Base addChild(String name) throws FHIRException { if (name.equals("relation")) { - throw new FHIRException("Cannot call addChild on a primitive type Bundle.relation"); + throw new FHIRException("Cannot call addChild on a singleton property Bundle.relation"); } else if (name.equals("url")) { - throw new FHIRException("Cannot call addChild on a primitive type Bundle.url"); + throw new FHIRException("Cannot call addChild on a singleton property Bundle.url"); } else return super.addChild(name); } @@ -1104,7 +1104,7 @@ public class Bundle extends Resource implements IBaseBundle { if (name.equals("link")) { return addLink(); } else if (name.equals("fullUrl")) { - throw new FHIRException("Cannot call addChild on a primitive type Bundle.fullUrl"); + throw new FHIRException("Cannot call addChild on a singleton property Bundle.fullUrl"); } else if (name.equals("resource")) { throw new FHIRException("Cannot call addChild on an abstract type Bundle.resource"); } else if (name.equals("search")) { @@ -1332,9 +1332,9 @@ public class Bundle extends Resource implements IBaseBundle { @Override public Base addChild(String name) throws FHIRException { if (name.equals("mode")) { - throw new FHIRException("Cannot call addChild on a primitive type Bundle.mode"); + throw new FHIRException("Cannot call addChild on a singleton property Bundle.mode"); } else if (name.equals("score")) { - throw new FHIRException("Cannot call addChild on a primitive type Bundle.score"); + throw new FHIRException("Cannot call addChild on a singleton property Bundle.score"); } else return super.addChild(name); } @@ -1847,17 +1847,17 @@ public class Bundle extends Resource implements IBaseBundle { @Override public Base addChild(String name) throws FHIRException { if (name.equals("method")) { - throw new FHIRException("Cannot call addChild on a primitive type Bundle.method"); + throw new FHIRException("Cannot call addChild on a singleton property Bundle.method"); } else if (name.equals("url")) { - throw new FHIRException("Cannot call addChild on a primitive type Bundle.url"); + throw new FHIRException("Cannot call addChild on a singleton property Bundle.url"); } else if (name.equals("ifNoneMatch")) { - throw new FHIRException("Cannot call addChild on a primitive type Bundle.ifNoneMatch"); + throw new FHIRException("Cannot call addChild on a singleton property Bundle.ifNoneMatch"); } else if (name.equals("ifModifiedSince")) { - throw new FHIRException("Cannot call addChild on a primitive type Bundle.ifModifiedSince"); + throw new FHIRException("Cannot call addChild on a singleton property Bundle.ifModifiedSince"); } else if (name.equals("ifMatch")) { - throw new FHIRException("Cannot call addChild on a primitive type Bundle.ifMatch"); + throw new FHIRException("Cannot call addChild on a singleton property Bundle.ifMatch"); } else if (name.equals("ifNoneExist")) { - throw new FHIRException("Cannot call addChild on a primitive type Bundle.ifNoneExist"); + throw new FHIRException("Cannot call addChild on a singleton property Bundle.ifNoneExist"); } else return super.addChild(name); } @@ -2207,13 +2207,13 @@ public class Bundle extends Resource implements IBaseBundle { @Override public Base addChild(String name) throws FHIRException { if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type Bundle.status"); + throw new FHIRException("Cannot call addChild on a singleton property Bundle.status"); } else if (name.equals("location")) { - throw new FHIRException("Cannot call addChild on a primitive type Bundle.location"); + throw new FHIRException("Cannot call addChild on a singleton property Bundle.location"); } else if (name.equals("etag")) { - throw new FHIRException("Cannot call addChild on a primitive type Bundle.etag"); + throw new FHIRException("Cannot call addChild on a singleton property Bundle.etag"); } else if (name.equals("lastModified")) { - throw new FHIRException("Cannot call addChild on a primitive type Bundle.lastModified"); + throw new FHIRException("Cannot call addChild on a singleton property Bundle.lastModified"); } else return super.addChild(name); } @@ -2624,9 +2624,9 @@ public class Bundle extends Resource implements IBaseBundle { @Override public Base addChild(String name) throws FHIRException { if (name.equals("type")) { - throw new FHIRException("Cannot call addChild on a primitive type Bundle.type"); + throw new FHIRException("Cannot call addChild on a singleton property Bundle.type"); } else if (name.equals("total")) { - throw new FHIRException("Cannot call addChild on a primitive type Bundle.total"); + throw new FHIRException("Cannot call addChild on a singleton property Bundle.total"); } else if (name.equals("link")) { return addLink(); } else if (name.equals("entry")) { diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/CarePlan.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/CarePlan.java index cd6caeeec..4a0f5fb34 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/CarePlan.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/CarePlan.java @@ -718,7 +718,7 @@ public class CarePlan extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("code")) { - throw new FHIRException("Cannot call addChild on a primitive type CarePlan.code"); + throw new FHIRException("Cannot call addChild on a singleton property CarePlan.code"); } else if (name.equals("plan")) { this.plan = new Reference(); return this.plan; @@ -2272,12 +2272,12 @@ public class CarePlan extends DomainResource { } else if (name.equals("goal")) { return addGoal(); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type CarePlan.status"); + throw new FHIRException("Cannot call addChild on a singleton property CarePlan.status"); } else if (name.equals("statusReason")) { this.statusReason = new CodeableConcept(); return this.statusReason; } else if (name.equals("prohibited")) { - throw new FHIRException("Cannot call addChild on a primitive type CarePlan.prohibited"); + throw new FHIRException("Cannot call addChild on a singleton property CarePlan.prohibited"); } else if (name.equals("scheduledTiming")) { this.scheduled = new Timing(); return this.scheduled; @@ -2305,7 +2305,7 @@ public class CarePlan extends DomainResource { this.quantity = new SimpleQuantity(); return this.quantity; } else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type CarePlan.description"); + throw new FHIRException("Cannot call addChild on a singleton property CarePlan.description"); } else return super.addChild(name); } @@ -3468,7 +3468,7 @@ public class CarePlan extends DomainResource { this.subject = new Reference(); return this.subject; } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type CarePlan.status"); + throw new FHIRException("Cannot call addChild on a singleton property CarePlan.status"); } else if (name.equals("context")) { this.context = new Reference(); return this.context; @@ -3478,11 +3478,11 @@ public class CarePlan extends DomainResource { } else if (name.equals("author")) { return addAuthor(); } else if (name.equals("modified")) { - throw new FHIRException("Cannot call addChild on a primitive type CarePlan.modified"); + throw new FHIRException("Cannot call addChild on a singleton property CarePlan.modified"); } else if (name.equals("category")) { return addCategory(); } else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type CarePlan.description"); + throw new FHIRException("Cannot call addChild on a singleton property CarePlan.description"); } else if (name.equals("addresses")) { return addAddresses(); } else if (name.equals("support")) { diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Claim.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Claim.java index 534103b62..4d3ec696d 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Claim.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Claim.java @@ -851,7 +851,7 @@ public class Claim extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("sequence")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.sequence"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.sequence"); } else if (name.equals("diagnosis")) { this.diagnosis = new Coding(); return this.diagnosis; @@ -1422,19 +1422,19 @@ public class Claim extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("sequence")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.sequence"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.sequence"); } else if (name.equals("focal")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.focal"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.focal"); } else if (name.equals("coverage")) { this.coverage = new Reference(); return this.coverage; } else if (name.equals("businessArrangement")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.businessArrangement"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.businessArrangement"); } else if (name.equals("relationship")) { this.relationship = new Coding(); return this.relationship; } else if (name.equals("preAuthRef")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.preAuthRef"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.preAuthRef"); } else if (name.equals("claimResponse")) { this.claimResponse = new Reference(); return this.claimResponse; @@ -2451,7 +2451,7 @@ public class Claim extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("sequence")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.sequence"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.sequence"); } else if (name.equals("type")) { this.type = new Coding(); return this.type; @@ -2459,12 +2459,12 @@ public class Claim extends DomainResource { this.provider = new Reference(); return this.provider; } else if (name.equals("diagnosisLinkId")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.diagnosisLinkId"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.diagnosisLinkId"); } else if (name.equals("service")) { this.service = new Coding(); return this.service; } else if (name.equals("serviceDate")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.serviceDate"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.serviceDate"); } else if (name.equals("quantity")) { this.quantity = new SimpleQuantity(); return this.quantity; @@ -2472,9 +2472,9 @@ public class Claim extends DomainResource { this.unitPrice = new Money(); return this.unitPrice; } else if (name.equals("factor")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.factor"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.factor"); } else if (name.equals("points")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.points"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.points"); } else if (name.equals("net")) { this.net = new Money(); return this.net; @@ -3136,7 +3136,7 @@ public class Claim extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("sequence")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.sequence"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.sequence"); } else if (name.equals("type")) { this.type = new Coding(); return this.type; @@ -3150,9 +3150,9 @@ public class Claim extends DomainResource { this.unitPrice = new Money(); return this.unitPrice; } else if (name.equals("factor")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.factor"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.factor"); } else if (name.equals("points")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.points"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.points"); } else if (name.equals("net")) { this.net = new Money(); return this.net; @@ -3715,7 +3715,7 @@ public class Claim extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("sequence")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.sequence"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.sequence"); } else if (name.equals("type")) { this.type = new Coding(); return this.type; @@ -3729,9 +3729,9 @@ public class Claim extends DomainResource { this.unitPrice = new Money(); return this.unitPrice; } else if (name.equals("factor")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.factor"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.factor"); } else if (name.equals("points")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.points"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.points"); } else if (name.equals("net")) { this.net = new Money(); return this.net; @@ -3988,9 +3988,9 @@ public class Claim extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("initial")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.initial"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.initial"); } else if (name.equals("priorDate")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.priorDate"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.priorDate"); } else if (name.equals("priorMaterial")) { this.priorMaterial = new Coding(); return this.priorMaterial; @@ -4219,7 +4219,7 @@ public class Claim extends DomainResource { this.reason = new Coding(); return this.reason; } else if (name.equals("extractionDate")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.extractionDate"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.extractionDate"); } else return super.addChild(name); } @@ -5987,7 +5987,7 @@ public class Claim extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("type")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.type"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.type"); } else if (name.equals("identifier")) { return addIdentifier(); } else if (name.equals("ruleset")) { @@ -5997,7 +5997,7 @@ public class Claim extends DomainResource { this.originalRuleset = new Coding(); return this.originalRuleset; } else if (name.equals("created")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.created"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.created"); } else if (name.equals("target")) { this.target = new Reference(); return this.target; @@ -6008,7 +6008,7 @@ public class Claim extends DomainResource { this.organization = new Reference(); return this.organization; } else if (name.equals("use")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.use"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.use"); } else if (name.equals("priority")) { this.priority = new Coding(); return this.priority; @@ -6045,9 +6045,9 @@ public class Claim extends DomainResource { } else if (name.equals("exception")) { return addException(); } else if (name.equals("school")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.school"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.school"); } else if (name.equals("accident")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.accident"); + throw new FHIRException("Cannot call addChild on a singleton property Claim.accident"); } else if (name.equals("accidentType")) { this.accidentType = new Coding(); return this.accidentType; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ClaimResponse.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ClaimResponse.java index 78e5dc0be..a31c4b00c 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ClaimResponse.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ClaimResponse.java @@ -321,9 +321,9 @@ public class ClaimResponse extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("sequenceLinkId")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.sequenceLinkId"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.sequenceLinkId"); } else if (name.equals("noteNumber")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.noteNumber"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.noteNumber"); } else if (name.equals("adjudication")) { return addAdjudication(); } else if (name.equals("detail")) { @@ -571,7 +571,7 @@ public class ClaimResponse extends DomainResource { this.amount = new Money(); return this.amount; } else if (name.equals("value")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.value"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.value"); } else return super.addChild(name); } @@ -815,7 +815,7 @@ public class ClaimResponse extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("sequenceLinkId")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.sequenceLinkId"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.sequenceLinkId"); } else if (name.equals("adjudication")) { return addAdjudication(); } else if (name.equals("subDetail")) { @@ -1056,7 +1056,7 @@ public class ClaimResponse extends DomainResource { this.amount = new Money(); return this.amount; } else if (name.equals("value")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.value"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.value"); } else return super.addChild(name); } @@ -1247,7 +1247,7 @@ public class ClaimResponse extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("sequenceLinkId")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.sequenceLinkId"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.sequenceLinkId"); } else if (name.equals("adjudication")) { return addAdjudication(); } else @@ -1479,7 +1479,7 @@ public class ClaimResponse extends DomainResource { this.amount = new Money(); return this.amount; } else if (name.equals("value")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.value"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.value"); } else return super.addChild(name); } @@ -1877,7 +1877,7 @@ public class ClaimResponse extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("sequenceLinkId")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.sequenceLinkId"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.sequenceLinkId"); } else if (name.equals("service")) { this.service = new Coding(); return this.service; @@ -1885,7 +1885,7 @@ public class ClaimResponse extends DomainResource { this.fee = new Money(); return this.fee; } else if (name.equals("noteNumberLinkId")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.noteNumberLinkId"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.noteNumberLinkId"); } else if (name.equals("adjudication")) { return addAdjudication(); } else if (name.equals("detail")) { @@ -2143,7 +2143,7 @@ public class ClaimResponse extends DomainResource { this.amount = new Money(); return this.amount; } else if (name.equals("value")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.value"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.value"); } else return super.addChild(name); } @@ -2585,7 +2585,7 @@ public class ClaimResponse extends DomainResource { this.amount = new Money(); return this.amount; } else if (name.equals("value")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.value"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.value"); } else return super.addChild(name); } @@ -2920,11 +2920,11 @@ public class ClaimResponse extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("sequenceLinkId")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.sequenceLinkId"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.sequenceLinkId"); } else if (name.equals("detailSequenceLinkId")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.detailSequenceLinkId"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.detailSequenceLinkId"); } else if (name.equals("subdetailSequenceLinkId")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.subdetailSequenceLinkId"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.subdetailSequenceLinkId"); } else if (name.equals("code")) { this.code = new Coding(); return this.code; @@ -3168,12 +3168,12 @@ public class ClaimResponse extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("number")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.number"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.number"); } else if (name.equals("type")) { this.type = new Coding(); return this.type; } else if (name.equals("text")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.text"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.text"); } else return super.addChild(name); } @@ -3743,19 +3743,19 @@ public class ClaimResponse extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("sequence")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.sequence"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.sequence"); } else if (name.equals("focal")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.focal"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.focal"); } else if (name.equals("coverage")) { this.coverage = new Reference(); return this.coverage; } else if (name.equals("businessArrangement")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.businessArrangement"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.businessArrangement"); } else if (name.equals("relationship")) { this.relationship = new Coding(); return this.relationship; } else if (name.equals("preAuthRef")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.preAuthRef"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.preAuthRef"); } else if (name.equals("claimResponse")) { this.claimResponse = new Reference(); return this.claimResponse; @@ -5173,7 +5173,7 @@ public class ClaimResponse extends DomainResource { this.originalRuleset = new Coding(); return this.originalRuleset; } else if (name.equals("created")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.created"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.created"); } else if (name.equals("organization")) { this.organization = new Reference(); return this.organization; @@ -5184,9 +5184,9 @@ public class ClaimResponse extends DomainResource { this.requestOrganization = new Reference(); return this.requestOrganization; } else if (name.equals("outcome")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.outcome"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.outcome"); } else if (name.equals("disposition")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.disposition"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.disposition"); } else if (name.equals("payeeType")) { this.payeeType = new Coding(); return this.payeeType; @@ -5212,7 +5212,7 @@ public class ClaimResponse extends DomainResource { this.paymentAdjustmentReason = new Coding(); return this.paymentAdjustmentReason; } else if (name.equals("paymentDate")) { - throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.paymentDate"); + throw new FHIRException("Cannot call addChild on a singleton property ClaimResponse.paymentDate"); } else if (name.equals("paymentAmount")) { this.paymentAmount = new Money(); return this.paymentAmount; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ClinicalImpression.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ClinicalImpression.java index dcc84ed70..39a73f193 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ClinicalImpression.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ClinicalImpression.java @@ -528,7 +528,7 @@ public class ClinicalImpression extends DomainResource { this.item = new CodeableConcept(); return this.item; } else if (name.equals("cause")) { - throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.cause"); + throw new FHIRException("Cannot call addChild on a singleton property ClinicalImpression.cause"); } else return super.addChild(name); } @@ -707,7 +707,7 @@ public class ClinicalImpression extends DomainResource { this.item = new CodeableConcept(); return this.item; } else if (name.equals("reason")) { - throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.reason"); + throw new FHIRException("Cannot call addChild on a singleton property ClinicalImpression.reason"); } else return super.addChild(name); } @@ -1931,11 +1931,11 @@ public class ClinicalImpression extends DomainResource { this.assessor = new Reference(); return this.assessor; } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.status"); + throw new FHIRException("Cannot call addChild on a singleton property ClinicalImpression.status"); } else if (name.equals("date")) { - throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.date"); + throw new FHIRException("Cannot call addChild on a singleton property ClinicalImpression.date"); } else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.description"); + throw new FHIRException("Cannot call addChild on a singleton property ClinicalImpression.description"); } else if (name.equals("previous")) { this.previous = new Reference(); return this.previous; @@ -1950,9 +1950,9 @@ public class ClinicalImpression extends DomainResource { } else if (name.equals("investigations")) { return addInvestigations(); } else if (name.equals("protocol")) { - throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.protocol"); + throw new FHIRException("Cannot call addChild on a singleton property ClinicalImpression.protocol"); } else if (name.equals("summary")) { - throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.summary"); + throw new FHIRException("Cannot call addChild on a singleton property ClinicalImpression.summary"); } else if (name.equals("finding")) { return addFinding(); } else if (name.equals("resolved")) { @@ -1960,7 +1960,7 @@ public class ClinicalImpression extends DomainResource { } else if (name.equals("ruledOut")) { return addRuledOut(); } else if (name.equals("prognosis")) { - throw new FHIRException("Cannot call addChild on a primitive type ClinicalImpression.prognosis"); + throw new FHIRException("Cannot call addChild on a singleton property ClinicalImpression.prognosis"); } else if (name.equals("plan")) { return addPlan(); } else if (name.equals("action")) { diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/CodeableConcept.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/CodeableConcept.java index 5f4c46a0c..625801647 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/CodeableConcept.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/CodeableConcept.java @@ -201,7 +201,7 @@ public class CodeableConcept extends Type implements ICompositeType { if (name.equals("coding")) { return addCoding(); } else if (name.equals("text")) { - throw new FHIRException("Cannot call addChild on a primitive type CodeableConcept.text"); + throw new FHIRException("Cannot call addChild on a singleton property CodeableConcept.text"); } else return super.addChild(name); } diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Coding.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Coding.java index efe7bd044..7c73367c5 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Coding.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Coding.java @@ -441,15 +441,15 @@ public class Coding extends Type implements IBaseCoding, ICompositeType { @Override public Base addChild(String name) throws FHIRException { if (name.equals("system")) { - throw new FHIRException("Cannot call addChild on a primitive type Coding.system"); + throw new FHIRException("Cannot call addChild on a singleton property Coding.system"); } else if (name.equals("version")) { - throw new FHIRException("Cannot call addChild on a primitive type Coding.version"); + throw new FHIRException("Cannot call addChild on a singleton property Coding.version"); } else if (name.equals("code")) { - throw new FHIRException("Cannot call addChild on a primitive type Coding.code"); + throw new FHIRException("Cannot call addChild on a singleton property Coding.code"); } else if (name.equals("display")) { - throw new FHIRException("Cannot call addChild on a primitive type Coding.display"); + throw new FHIRException("Cannot call addChild on a singleton property Coding.display"); } else if (name.equals("userSelected")) { - throw new FHIRException("Cannot call addChild on a primitive type Coding.userSelected"); + throw new FHIRException("Cannot call addChild on a singleton property Coding.userSelected"); } else return super.addChild(name); } diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Communication.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Communication.java index e4b286ed7..315176528 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Communication.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Communication.java @@ -1263,14 +1263,14 @@ public class Communication extends DomainResource { } else if (name.equals("medium")) { return addMedium(); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type Communication.status"); + throw new FHIRException("Cannot call addChild on a singleton property Communication.status"); } else if (name.equals("encounter")) { this.encounter = new Reference(); return this.encounter; } else if (name.equals("sent")) { - throw new FHIRException("Cannot call addChild on a primitive type Communication.sent"); + throw new FHIRException("Cannot call addChild on a singleton property Communication.sent"); } else if (name.equals("received")) { - throw new FHIRException("Cannot call addChild on a primitive type Communication.received"); + throw new FHIRException("Cannot call addChild on a singleton property Communication.received"); } else if (name.equals("reason")) { return addReason(); } else if (name.equals("subject")) { diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/CommunicationRequest.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/CommunicationRequest.java index d2d82fa70..5cfd08527 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/CommunicationRequest.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/CommunicationRequest.java @@ -1386,7 +1386,7 @@ public class CommunicationRequest extends DomainResource { this.requester = new Reference(); return this.requester; } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type CommunicationRequest.status"); + throw new FHIRException("Cannot call addChild on a singleton property CommunicationRequest.status"); } else if (name.equals("encounter")) { this.encounter = new Reference(); return this.encounter; @@ -1399,7 +1399,7 @@ public class CommunicationRequest extends DomainResource { } else if (name.equals("reason")) { return addReason(); } else if (name.equals("requestedOn")) { - throw new FHIRException("Cannot call addChild on a primitive type CommunicationRequest.requestedOn"); + throw new FHIRException("Cannot call addChild on a singleton property CommunicationRequest.requestedOn"); } else if (name.equals("subject")) { this.subject = new Reference(); return this.subject; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Composition.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Composition.java index fa8cfa226..969b54850 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Composition.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Composition.java @@ -596,9 +596,9 @@ public class Composition extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("mode")) { - throw new FHIRException("Cannot call addChild on a primitive type Composition.mode"); + throw new FHIRException("Cannot call addChild on a singleton property Composition.mode"); } else if (name.equals("time")) { - throw new FHIRException("Cannot call addChild on a primitive type Composition.time"); + throw new FHIRException("Cannot call addChild on a singleton property Composition.time"); } else if (name.equals("party")) { this.party = new Reference(); return this.party; @@ -1400,7 +1400,7 @@ public class Composition extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("title")) { - throw new FHIRException("Cannot call addChild on a primitive type Composition.title"); + throw new FHIRException("Cannot call addChild on a singleton property Composition.title"); } else if (name.equals("code")) { this.code = new CodeableConcept(); return this.code; @@ -1408,7 +1408,7 @@ public class Composition extends DomainResource { this.text = new Narrative(); return this.text; } else if (name.equals("mode")) { - throw new FHIRException("Cannot call addChild on a primitive type Composition.mode"); + throw new FHIRException("Cannot call addChild on a singleton property Composition.mode"); } else if (name.equals("orderedBy")) { this.orderedBy = new CodeableConcept(); return this.orderedBy; @@ -2383,7 +2383,7 @@ public class Composition extends DomainResource { this.identifier = new Identifier(); return this.identifier; } else if (name.equals("date")) { - throw new FHIRException("Cannot call addChild on a primitive type Composition.date"); + throw new FHIRException("Cannot call addChild on a singleton property Composition.date"); } else if (name.equals("type")) { this.type = new CodeableConcept(); return this.type; @@ -2391,11 +2391,11 @@ public class Composition extends DomainResource { this.class_ = new CodeableConcept(); return this.class_; } else if (name.equals("title")) { - throw new FHIRException("Cannot call addChild on a primitive type Composition.title"); + throw new FHIRException("Cannot call addChild on a singleton property Composition.title"); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type Composition.status"); + throw new FHIRException("Cannot call addChild on a singleton property Composition.status"); } else if (name.equals("confidentiality")) { - throw new FHIRException("Cannot call addChild on a primitive type Composition.confidentiality"); + throw new FHIRException("Cannot call addChild on a singleton property Composition.confidentiality"); } else if (name.equals("subject")) { this.subject = new Reference(); return this.subject; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ConceptMap.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ConceptMap.java index 73799ab41..14ea528e0 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ConceptMap.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ConceptMap.java @@ -198,7 +198,7 @@ public class ConceptMap extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.name"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.name"); } else if (name.equals("telecom")) { return addTelecom(); } else @@ -464,9 +464,9 @@ public class ConceptMap extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("codeSystem")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.codeSystem"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.codeSystem"); } else if (name.equals("code")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.code"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.code"); } else if (name.equals("target")) { return addTarget(); } else @@ -960,13 +960,13 @@ public class ConceptMap extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("codeSystem")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.codeSystem"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.codeSystem"); } else if (name.equals("code")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.code"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.code"); } else if (name.equals("equivalence")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.equivalence"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.equivalence"); } else if (name.equals("comments")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.comments"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.comments"); } else if (name.equals("dependsOn")) { return addDependsOn(); } else if (name.equals("product")) { @@ -1286,11 +1286,11 @@ public class ConceptMap extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("element")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.element"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.element"); } else if (name.equals("codeSystem")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.codeSystem"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.codeSystem"); } else if (name.equals("code")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.code"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.code"); } else return super.addChild(name); } @@ -2443,32 +2443,32 @@ public class ConceptMap extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("url")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.url"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.url"); } else if (name.equals("identifier")) { this.identifier = new Identifier(); return this.identifier; } else if (name.equals("version")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.version"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.version"); } else if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.name"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.name"); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.status"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.status"); } else if (name.equals("experimental")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.experimental"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.experimental"); } else if (name.equals("publisher")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.publisher"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.publisher"); } else if (name.equals("contact")) { return addContact(); } else if (name.equals("date")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.date"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.date"); } else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.description"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.description"); } else if (name.equals("useContext")) { return addUseContext(); } else if (name.equals("requirements")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.requirements"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.requirements"); } else if (name.equals("copyright")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.copyright"); + throw new FHIRException("Cannot call addChild on a singleton property ConceptMap.copyright"); } else if (name.equals("sourceUri")) { this.source = new UriType(); return this.source; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Condition.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Condition.java index 2d1e2e09a..a220d6f3e 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Condition.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Condition.java @@ -1729,7 +1729,7 @@ public class Condition extends DomainResource { this.asserter = new Reference(); return this.asserter; } else if (name.equals("dateRecorded")) { - throw new FHIRException("Cannot call addChild on a primitive type Condition.dateRecorded"); + throw new FHIRException("Cannot call addChild on a singleton property Condition.dateRecorded"); } else if (name.equals("code")) { this.code = new CodeableConcept(); return this.code; @@ -1737,9 +1737,9 @@ public class Condition extends DomainResource { this.category = new CodeableConcept(); return this.category; } else if (name.equals("clinicalStatus")) { - throw new FHIRException("Cannot call addChild on a primitive type Condition.clinicalStatus"); + throw new FHIRException("Cannot call addChild on a singleton property Condition.clinicalStatus"); } else if (name.equals("verificationStatus")) { - throw new FHIRException("Cannot call addChild on a primitive type Condition.verificationStatus"); + throw new FHIRException("Cannot call addChild on a singleton property Condition.verificationStatus"); } else if (name.equals("severity")) { this.severity = new CodeableConcept(); return this.severity; @@ -1784,7 +1784,7 @@ public class Condition extends DomainResource { } else if (name.equals("bodySite")) { return addBodySite(); } else if (name.equals("notes")) { - throw new FHIRException("Cannot call addChild on a primitive type Condition.notes"); + throw new FHIRException("Cannot call addChild on a singleton property Condition.notes"); } else return super.addChild(name); } diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Conformance.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Conformance.java index f9881b008..ddaf72146 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Conformance.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Conformance.java @@ -2033,7 +2033,7 @@ public class Conformance extends DomainResource implements IBaseConformance { @Override public Base addChild(String name) throws FHIRException { if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.name"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.name"); } else if (name.equals("telecom")) { return addTelecom(); } else @@ -2310,11 +2310,11 @@ public class Conformance extends DomainResource implements IBaseConformance { @Override public Base addChild(String name) throws FHIRException { if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.name"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.name"); } else if (name.equals("version")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.version"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.version"); } else if (name.equals("releaseDate")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.releaseDate"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.releaseDate"); } else return super.addChild(name); } @@ -2533,9 +2533,9 @@ public class Conformance extends DomainResource implements IBaseConformance { @Override public Base addChild(String name) throws FHIRException { if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.description"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.description"); } else if (name.equals("url")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.url"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.url"); } else return super.addChild(name); } @@ -3153,9 +3153,9 @@ public class Conformance extends DomainResource implements IBaseConformance { @Override public Base addChild(String name) throws FHIRException { if (name.equals("mode")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.mode"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.mode"); } else if (name.equals("documentation")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.documentation"); } else if (name.equals("security")) { this.security = new ConformanceRestSecurityComponent(); return this.security; @@ -3164,13 +3164,13 @@ public class Conformance extends DomainResource implements IBaseConformance { } else if (name.equals("interaction")) { return addInteraction(); } else if (name.equals("transactionMode")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.transactionMode"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.transactionMode"); } else if (name.equals("searchParam")) { return addSearchParam(); } else if (name.equals("operation")) { return addOperation(); } else if (name.equals("compartment")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.compartment"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.compartment"); } else return super.addChild(name); } @@ -3519,11 +3519,11 @@ public class Conformance extends DomainResource implements IBaseConformance { @Override public Base addChild(String name) throws FHIRException { if (name.equals("cors")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.cors"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.cors"); } else if (name.equals("service")) { return addService(); } else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.description"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.description"); } else if (name.equals("certificate")) { return addCertificate(); } else @@ -3737,9 +3737,9 @@ public class Conformance extends DomainResource implements IBaseConformance { @Override public Base addChild(String name) throws FHIRException { if (name.equals("type")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.type"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.type"); } else if (name.equals("blob")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.blob"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.blob"); } else return super.addChild(name); } @@ -4663,28 +4663,28 @@ public class Conformance extends DomainResource implements IBaseConformance { @Override public Base addChild(String name) throws FHIRException { if (name.equals("type")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.type"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.type"); } else if (name.equals("profile")) { this.profile = new Reference(); return this.profile; } else if (name.equals("interaction")) { return addInteraction(); } else if (name.equals("versioning")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.versioning"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.versioning"); } else if (name.equals("readHistory")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.readHistory"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.readHistory"); } else if (name.equals("updateCreate")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.updateCreate"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.updateCreate"); } else if (name.equals("conditionalCreate")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.conditionalCreate"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.conditionalCreate"); } else if (name.equals("conditionalUpdate")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.conditionalUpdate"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.conditionalUpdate"); } else if (name.equals("conditionalDelete")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.conditionalDelete"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.conditionalDelete"); } else if (name.equals("searchInclude")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.searchInclude"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.searchInclude"); } else if (name.equals("searchRevInclude")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.searchRevInclude"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.searchRevInclude"); } else if (name.equals("searchParam")) { return addSearchParam(); } else @@ -4955,9 +4955,9 @@ public class Conformance extends DomainResource implements IBaseConformance { @Override public Base addChild(String name) throws FHIRException { if (name.equals("code")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.code"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.code"); } else if (name.equals("documentation")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.documentation"); } else return super.addChild(name); } @@ -5549,19 +5549,19 @@ public class Conformance extends DomainResource implements IBaseConformance { @Override public Base addChild(String name) throws FHIRException { if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.name"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.name"); } else if (name.equals("definition")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.definition"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.definition"); } else if (name.equals("type")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.type"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.type"); } else if (name.equals("documentation")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.documentation"); } else if (name.equals("target")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.target"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.target"); } else if (name.equals("modifier")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.modifier"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.modifier"); } else if (name.equals("chain")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.chain"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.chain"); } else return super.addChild(name); } @@ -5804,9 +5804,9 @@ public class Conformance extends DomainResource implements IBaseConformance { @Override public Base addChild(String name) throws FHIRException { if (name.equals("code")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.code"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.code"); } else if (name.equals("documentation")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.documentation"); } else return super.addChild(name); } @@ -6017,7 +6017,7 @@ public class Conformance extends DomainResource implements IBaseConformance { @Override public Base addChild(String name) throws FHIRException { if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.name"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.name"); } else if (name.equals("definition")) { this.definition = new Reference(); return this.definition; @@ -6350,9 +6350,9 @@ public class Conformance extends DomainResource implements IBaseConformance { if (name.equals("endpoint")) { return addEndpoint(); } else if (name.equals("reliableCache")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.reliableCache"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.reliableCache"); } else if (name.equals("documentation")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.documentation"); } else if (name.equals("event")) { return addEvent(); } else @@ -6556,7 +6556,7 @@ public class Conformance extends DomainResource implements IBaseConformance { this.protocol = new Coding(); return this.protocol; } else if (name.equals("address")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.address"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.address"); } else return super.addChild(name); } @@ -7080,11 +7080,11 @@ public class Conformance extends DomainResource implements IBaseConformance { this.code = new Coding(); return this.code; } else if (name.equals("category")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.category"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.category"); } else if (name.equals("mode")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.mode"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.mode"); } else if (name.equals("focus")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.focus"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.focus"); } else if (name.equals("request")) { this.request = new Reference(); return this.request; @@ -7092,7 +7092,7 @@ public class Conformance extends DomainResource implements IBaseConformance { this.response = new Reference(); return this.response; } else if (name.equals("documentation")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.documentation"); } else return super.addChild(name); } @@ -7393,9 +7393,9 @@ public class Conformance extends DomainResource implements IBaseConformance { @Override public Base addChild(String name) throws FHIRException { if (name.equals("mode")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.mode"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.mode"); } else if (name.equals("documentation")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.documentation"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.documentation"); } else if (name.equals("profile")) { this.profile = new Reference(); return this.profile; @@ -8942,29 +8942,29 @@ public class Conformance extends DomainResource implements IBaseConformance { @Override public Base addChild(String name) throws FHIRException { if (name.equals("url")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.url"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.url"); } else if (name.equals("version")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.version"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.version"); } else if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.name"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.name"); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.status"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.status"); } else if (name.equals("experimental")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.experimental"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.experimental"); } else if (name.equals("publisher")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.publisher"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.publisher"); } else if (name.equals("contact")) { return addContact(); } else if (name.equals("date")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.date"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.date"); } else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.description"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.description"); } else if (name.equals("requirements")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.requirements"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.requirements"); } else if (name.equals("copyright")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.copyright"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.copyright"); } else if (name.equals("kind")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.kind"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.kind"); } else if (name.equals("software")) { this.software = new ConformanceSoftwareComponent(); return this.software; @@ -8972,11 +8972,11 @@ public class Conformance extends DomainResource implements IBaseConformance { this.implementation = new ConformanceImplementationComponent(); return this.implementation; } else if (name.equals("fhirVersion")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.fhirVersion"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.fhirVersion"); } else if (name.equals("acceptUnknown")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.acceptUnknown"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.acceptUnknown"); } else if (name.equals("format")) { - throw new FHIRException("Cannot call addChild on a primitive type Conformance.format"); + throw new FHIRException("Cannot call addChild on a singleton property Conformance.format"); } else if (name.equals("profile")) { return addProfile(); } else if (name.equals("rest")) { diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ContactPoint.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ContactPoint.java index d5e7346ad..fe0dc3cd8 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ContactPoint.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ContactPoint.java @@ -735,13 +735,13 @@ public class ContactPoint extends Type implements ICompositeType { @Override public Base addChild(String name) throws FHIRException { if (name.equals("system")) { - throw new FHIRException("Cannot call addChild on a primitive type ContactPoint.system"); + throw new FHIRException("Cannot call addChild on a singleton property ContactPoint.system"); } else if (name.equals("value")) { - throw new FHIRException("Cannot call addChild on a primitive type ContactPoint.value"); + throw new FHIRException("Cannot call addChild on a singleton property ContactPoint.value"); } else if (name.equals("use")) { - throw new FHIRException("Cannot call addChild on a primitive type ContactPoint.use"); + throw new FHIRException("Cannot call addChild on a singleton property ContactPoint.use"); } else if (name.equals("rank")) { - throw new FHIRException("Cannot call addChild on a primitive type ContactPoint.rank"); + throw new FHIRException("Cannot call addChild on a singleton property ContactPoint.rank"); } else if (name.equals("period")) { this.period = new Period(); return this.period; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Contract.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Contract.java index 40479c5c4..2780af601 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Contract.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Contract.java @@ -750,7 +750,7 @@ public class Contract extends DomainResource { this.identifier = new Identifier(); return this.identifier; } else if (name.equals("effectiveTime")) { - throw new FHIRException("Cannot call addChild on a primitive type Contract.effectiveTime"); + throw new FHIRException("Cannot call addChild on a singleton property Contract.effectiveTime"); } else if (name.equals("quantity")) { this.quantity = new SimpleQuantity(); return this.quantity; @@ -758,9 +758,9 @@ public class Contract extends DomainResource { this.unitPrice = new Money(); return this.unitPrice; } else if (name.equals("factor")) { - throw new FHIRException("Cannot call addChild on a primitive type Contract.factor"); + throw new FHIRException("Cannot call addChild on a singleton property Contract.factor"); } else if (name.equals("points")) { - throw new FHIRException("Cannot call addChild on a primitive type Contract.points"); + throw new FHIRException("Cannot call addChild on a singleton property Contract.points"); } else if (name.equals("net")) { this.net = new Money(); return this.net; @@ -1022,7 +1022,7 @@ public class Contract extends DomainResource { this.party = new Reference(); return this.party; } else if (name.equals("signature")) { - throw new FHIRException("Cannot call addChild on a primitive type Contract.signature"); + throw new FHIRException("Cannot call addChild on a singleton property Contract.signature"); } else return super.addChild(name); } @@ -1710,7 +1710,7 @@ public class Contract extends DomainResource { this.identifier = new Identifier(); return this.identifier; } else if (name.equals("issued")) { - throw new FHIRException("Cannot call addChild on a primitive type Contract.issued"); + throw new FHIRException("Cannot call addChild on a singleton property Contract.issued"); } else if (name.equals("applies")) { this.applies = new Period(); return this.applies; @@ -1730,7 +1730,7 @@ public class Contract extends DomainResource { } else if (name.equals("actor")) { return addActor(); } else if (name.equals("text")) { - throw new FHIRException("Cannot call addChild on a primitive type Contract.text"); + throw new FHIRException("Cannot call addChild on a singleton property Contract.text"); } else if (name.equals("valuedItem")) { return addValuedItem(); } else if (name.equals("group")) { @@ -2531,7 +2531,7 @@ public class Contract extends DomainResource { this.identifier = new Identifier(); return this.identifier; } else if (name.equals("effectiveTime")) { - throw new FHIRException("Cannot call addChild on a primitive type Contract.effectiveTime"); + throw new FHIRException("Cannot call addChild on a singleton property Contract.effectiveTime"); } else if (name.equals("quantity")) { this.quantity = new SimpleQuantity(); return this.quantity; @@ -2539,9 +2539,9 @@ public class Contract extends DomainResource { this.unitPrice = new Money(); return this.unitPrice; } else if (name.equals("factor")) { - throw new FHIRException("Cannot call addChild on a primitive type Contract.factor"); + throw new FHIRException("Cannot call addChild on a singleton property Contract.factor"); } else if (name.equals("points")) { - throw new FHIRException("Cannot call addChild on a primitive type Contract.points"); + throw new FHIRException("Cannot call addChild on a singleton property Contract.points"); } else if (name.equals("net")) { this.net = new Money(); return this.net; @@ -4148,7 +4148,7 @@ public class Contract extends DomainResource { this.identifier = new Identifier(); return this.identifier; } else if (name.equals("issued")) { - throw new FHIRException("Cannot call addChild on a primitive type Contract.issued"); + throw new FHIRException("Cannot call addChild on a singleton property Contract.issued"); } else if (name.equals("applies")) { this.applies = new Period(); return this.applies; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Coverage.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Coverage.java index 6b913236c..06657da80 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Coverage.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Coverage.java @@ -933,15 +933,15 @@ public class Coverage extends DomainResource { } else if (name.equals("identifier")) { return addIdentifier(); } else if (name.equals("group")) { - throw new FHIRException("Cannot call addChild on a primitive type Coverage.group"); + throw new FHIRException("Cannot call addChild on a singleton property Coverage.group"); } else if (name.equals("plan")) { - throw new FHIRException("Cannot call addChild on a primitive type Coverage.plan"); + throw new FHIRException("Cannot call addChild on a singleton property Coverage.plan"); } else if (name.equals("subPlan")) { - throw new FHIRException("Cannot call addChild on a primitive type Coverage.subPlan"); + throw new FHIRException("Cannot call addChild on a singleton property Coverage.subPlan"); } else if (name.equals("dependent")) { - throw new FHIRException("Cannot call addChild on a primitive type Coverage.dependent"); + throw new FHIRException("Cannot call addChild on a singleton property Coverage.dependent"); } else if (name.equals("sequence")) { - throw new FHIRException("Cannot call addChild on a primitive type Coverage.sequence"); + throw new FHIRException("Cannot call addChild on a singleton property Coverage.sequence"); } else if (name.equals("subscriber")) { this.subscriber = new Reference(); return this.subscriber; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DataElement.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DataElement.java index a1e2187f4..01857043e 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DataElement.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DataElement.java @@ -399,7 +399,7 @@ public class DataElement extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a primitive type DataElement.name"); + throw new FHIRException("Cannot call addChild on a singleton property DataElement.name"); } else if (name.equals("telecom")) { return addTelecom(); } else @@ -756,13 +756,13 @@ public class DataElement extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("identity")) { - throw new FHIRException("Cannot call addChild on a primitive type DataElement.identity"); + throw new FHIRException("Cannot call addChild on a singleton property DataElement.identity"); } else if (name.equals("uri")) { - throw new FHIRException("Cannot call addChild on a primitive type DataElement.uri"); + throw new FHIRException("Cannot call addChild on a singleton property DataElement.uri"); } else if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a primitive type DataElement.name"); + throw new FHIRException("Cannot call addChild on a singleton property DataElement.name"); } else if (name.equals("comments")) { - throw new FHIRException("Cannot call addChild on a primitive type DataElement.comments"); + throw new FHIRException("Cannot call addChild on a singleton property DataElement.comments"); } else return super.addChild(name); } @@ -1794,29 +1794,29 @@ public class DataElement extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("url")) { - throw new FHIRException("Cannot call addChild on a primitive type DataElement.url"); + throw new FHIRException("Cannot call addChild on a singleton property DataElement.url"); } else if (name.equals("identifier")) { return addIdentifier(); } else if (name.equals("version")) { - throw new FHIRException("Cannot call addChild on a primitive type DataElement.version"); + throw new FHIRException("Cannot call addChild on a singleton property DataElement.version"); } else if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a primitive type DataElement.name"); + throw new FHIRException("Cannot call addChild on a singleton property DataElement.name"); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type DataElement.status"); + throw new FHIRException("Cannot call addChild on a singleton property DataElement.status"); } else if (name.equals("experimental")) { - throw new FHIRException("Cannot call addChild on a primitive type DataElement.experimental"); + throw new FHIRException("Cannot call addChild on a singleton property DataElement.experimental"); } else if (name.equals("publisher")) { - throw new FHIRException("Cannot call addChild on a primitive type DataElement.publisher"); + throw new FHIRException("Cannot call addChild on a singleton property DataElement.publisher"); } else if (name.equals("contact")) { return addContact(); } else if (name.equals("date")) { - throw new FHIRException("Cannot call addChild on a primitive type DataElement.date"); + throw new FHIRException("Cannot call addChild on a singleton property DataElement.date"); } else if (name.equals("useContext")) { return addUseContext(); } else if (name.equals("copyright")) { - throw new FHIRException("Cannot call addChild on a primitive type DataElement.copyright"); + throw new FHIRException("Cannot call addChild on a singleton property DataElement.copyright"); } else if (name.equals("stringency")) { - throw new FHIRException("Cannot call addChild on a primitive type DataElement.stringency"); + throw new FHIRException("Cannot call addChild on a singleton property DataElement.stringency"); } else if (name.equals("mapping")) { return addMapping(); } else if (name.equals("element")) { diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DetectedIssue.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DetectedIssue.java index 0fa599acd..0492759df 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DetectedIssue.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DetectedIssue.java @@ -405,7 +405,7 @@ public class DetectedIssue extends DomainResource { this.action = new CodeableConcept(); return this.action; } else if (name.equals("date")) { - throw new FHIRException("Cannot call addChild on a primitive type DetectedIssue.date"); + throw new FHIRException("Cannot call addChild on a singleton property DetectedIssue.date"); } else if (name.equals("author")) { this.author = new Reference(); return this.author; @@ -1114,13 +1114,13 @@ public class DetectedIssue extends DomainResource { this.category = new CodeableConcept(); return this.category; } else if (name.equals("severity")) { - throw new FHIRException("Cannot call addChild on a primitive type DetectedIssue.severity"); + throw new FHIRException("Cannot call addChild on a singleton property DetectedIssue.severity"); } else if (name.equals("implicated")) { return addImplicated(); } else if (name.equals("detail")) { - throw new FHIRException("Cannot call addChild on a primitive type DetectedIssue.detail"); + throw new FHIRException("Cannot call addChild on a singleton property DetectedIssue.detail"); } else if (name.equals("date")) { - throw new FHIRException("Cannot call addChild on a primitive type DetectedIssue.date"); + throw new FHIRException("Cannot call addChild on a singleton property DetectedIssue.date"); } else if (name.equals("author")) { this.author = new Reference(); return this.author; @@ -1128,7 +1128,7 @@ public class DetectedIssue extends DomainResource { this.identifier = new Identifier(); return this.identifier; } else if (name.equals("reference")) { - throw new FHIRException("Cannot call addChild on a primitive type DetectedIssue.reference"); + throw new FHIRException("Cannot call addChild on a singleton property DetectedIssue.reference"); } else if (name.equals("mitigation")) { return addMitigation(); } else diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Device.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Device.java index bfb8395da..007e0190a 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Device.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Device.java @@ -1267,21 +1267,21 @@ public class Device extends DomainResource { } else if (name.equals("note")) { return addNote(); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type Device.status"); + throw new FHIRException("Cannot call addChild on a singleton property Device.status"); } else if (name.equals("manufacturer")) { - throw new FHIRException("Cannot call addChild on a primitive type Device.manufacturer"); + throw new FHIRException("Cannot call addChild on a singleton property Device.manufacturer"); } else if (name.equals("model")) { - throw new FHIRException("Cannot call addChild on a primitive type Device.model"); + throw new FHIRException("Cannot call addChild on a singleton property Device.model"); } else if (name.equals("version")) { - throw new FHIRException("Cannot call addChild on a primitive type Device.version"); + throw new FHIRException("Cannot call addChild on a singleton property Device.version"); } else if (name.equals("manufactureDate")) { - throw new FHIRException("Cannot call addChild on a primitive type Device.manufactureDate"); + throw new FHIRException("Cannot call addChild on a singleton property Device.manufactureDate"); } else if (name.equals("expiry")) { - throw new FHIRException("Cannot call addChild on a primitive type Device.expiry"); + throw new FHIRException("Cannot call addChild on a singleton property Device.expiry"); } else if (name.equals("udi")) { - throw new FHIRException("Cannot call addChild on a primitive type Device.udi"); + throw new FHIRException("Cannot call addChild on a singleton property Device.udi"); } else if (name.equals("lotNumber")) { - throw new FHIRException("Cannot call addChild on a primitive type Device.lotNumber"); + throw new FHIRException("Cannot call addChild on a singleton property Device.lotNumber"); } else if (name.equals("owner")) { this.owner = new Reference(); return this.owner; @@ -1294,7 +1294,7 @@ public class Device extends DomainResource { } else if (name.equals("contact")) { return addContact(); } else if (name.equals("url")) { - throw new FHIRException("Cannot call addChild on a primitive type Device.url"); + throw new FHIRException("Cannot call addChild on a singleton property Device.url"); } else return super.addChild(name); } diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DeviceComponent.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DeviceComponent.java index aff8d8c40..769772d41 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DeviceComponent.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DeviceComponent.java @@ -527,7 +527,7 @@ public class DeviceComponent extends DomainResource { this.componentId = new Identifier(); return this.componentId; } else if (name.equals("productionSpec")) { - throw new FHIRException("Cannot call addChild on a primitive type DeviceComponent.productionSpec"); + throw new FHIRException("Cannot call addChild on a singleton property DeviceComponent.productionSpec"); } else return super.addChild(name); } @@ -1178,7 +1178,7 @@ public class DeviceComponent extends DomainResource { this.identifier = new Identifier(); return this.identifier; } else if (name.equals("lastSystemChange")) { - throw new FHIRException("Cannot call addChild on a primitive type DeviceComponent.lastSystemChange"); + throw new FHIRException("Cannot call addChild on a singleton property DeviceComponent.lastSystemChange"); } else if (name.equals("source")) { this.source = new Reference(); return this.source; @@ -1191,7 +1191,7 @@ public class DeviceComponent extends DomainResource { this.parameterGroup = new CodeableConcept(); return this.parameterGroup; } else if (name.equals("measurementPrinciple")) { - throw new FHIRException("Cannot call addChild on a primitive type DeviceComponent.measurementPrinciple"); + throw new FHIRException("Cannot call addChild on a singleton property DeviceComponent.measurementPrinciple"); } else if (name.equals("productionSpecification")) { return addProductionSpecification(); } else if (name.equals("languageCode")) { diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DeviceMetric.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DeviceMetric.java index 724a42a2f..6feb944a6 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DeviceMetric.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DeviceMetric.java @@ -1082,11 +1082,11 @@ public class DeviceMetric extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("type")) { - throw new FHIRException("Cannot call addChild on a primitive type DeviceMetric.type"); + throw new FHIRException("Cannot call addChild on a singleton property DeviceMetric.type"); } else if (name.equals("state")) { - throw new FHIRException("Cannot call addChild on a primitive type DeviceMetric.state"); + throw new FHIRException("Cannot call addChild on a singleton property DeviceMetric.state"); } else if (name.equals("time")) { - throw new FHIRException("Cannot call addChild on a primitive type DeviceMetric.time"); + throw new FHIRException("Cannot call addChild on a singleton property DeviceMetric.time"); } else return super.addChild(name); } @@ -1836,11 +1836,11 @@ public class DeviceMetric extends DomainResource { this.parent = new Reference(); return this.parent; } else if (name.equals("operationalStatus")) { - throw new FHIRException("Cannot call addChild on a primitive type DeviceMetric.operationalStatus"); + throw new FHIRException("Cannot call addChild on a singleton property DeviceMetric.operationalStatus"); } else if (name.equals("color")) { - throw new FHIRException("Cannot call addChild on a primitive type DeviceMetric.color"); + throw new FHIRException("Cannot call addChild on a singleton property DeviceMetric.color"); } else if (name.equals("category")) { - throw new FHIRException("Cannot call addChild on a primitive type DeviceMetric.category"); + throw new FHIRException("Cannot call addChild on a singleton property DeviceMetric.category"); } else if (name.equals("measurementPeriod")) { this.measurementPeriod = new Timing(); return this.measurementPeriod; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DeviceUseRequest.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DeviceUseRequest.java index 67b179cc9..cafc1b811 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DeviceUseRequest.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DeviceUseRequest.java @@ -1390,7 +1390,7 @@ public class DeviceUseRequest extends DomainResource { this.bodySite = new Reference(); return this.bodySite; } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type DeviceUseRequest.status"); + throw new FHIRException("Cannot call addChild on a singleton property DeviceUseRequest.status"); } else if (name.equals("device")) { this.device = new Reference(); return this.device; @@ -1402,13 +1402,13 @@ public class DeviceUseRequest extends DomainResource { } else if (name.equals("indication")) { return addIndication(); } else if (name.equals("notes")) { - throw new FHIRException("Cannot call addChild on a primitive type DeviceUseRequest.notes"); + throw new FHIRException("Cannot call addChild on a singleton property DeviceUseRequest.notes"); } else if (name.equals("prnReason")) { return addPrnReason(); } else if (name.equals("orderedOn")) { - throw new FHIRException("Cannot call addChild on a primitive type DeviceUseRequest.orderedOn"); + throw new FHIRException("Cannot call addChild on a singleton property DeviceUseRequest.orderedOn"); } else if (name.equals("recordedOn")) { - throw new FHIRException("Cannot call addChild on a primitive type DeviceUseRequest.recordedOn"); + throw new FHIRException("Cannot call addChild on a singleton property DeviceUseRequest.recordedOn"); } else if (name.equals("subject")) { this.subject = new Reference(); return this.subject; @@ -1422,7 +1422,7 @@ public class DeviceUseRequest extends DomainResource { this.timing = new DateTimeType(); return this.timing; } else if (name.equals("priority")) { - throw new FHIRException("Cannot call addChild on a primitive type DeviceUseRequest.priority"); + throw new FHIRException("Cannot call addChild on a singleton property DeviceUseRequest.priority"); } else return super.addChild(name); } diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DeviceUseStatement.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DeviceUseStatement.java index e09757e62..eb8182124 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DeviceUseStatement.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DeviceUseStatement.java @@ -659,9 +659,9 @@ public class DeviceUseStatement extends DomainResource { } else if (name.equals("indication")) { return addIndication(); } else if (name.equals("notes")) { - throw new FHIRException("Cannot call addChild on a primitive type DeviceUseStatement.notes"); + throw new FHIRException("Cannot call addChild on a singleton property DeviceUseStatement.notes"); } else if (name.equals("recordedOn")) { - throw new FHIRException("Cannot call addChild on a primitive type DeviceUseStatement.recordedOn"); + throw new FHIRException("Cannot call addChild on a singleton property DeviceUseStatement.recordedOn"); } else if (name.equals("subject")) { this.subject = new Reference(); return this.subject; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DiagnosticOrder.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DiagnosticOrder.java index 075a5f661..67516613f 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DiagnosticOrder.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DiagnosticOrder.java @@ -792,12 +792,12 @@ public class DiagnosticOrder extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.status"); + throw new FHIRException("Cannot call addChild on a singleton property DiagnosticOrder.status"); } else if (name.equals("description")) { this.description = new CodeableConcept(); return this.description; } else if (name.equals("dateTime")) { - throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.dateTime"); + throw new FHIRException("Cannot call addChild on a singleton property DiagnosticOrder.dateTime"); } else if (name.equals("actor")) { this.actor = new Reference(); return this.actor; @@ -1174,7 +1174,7 @@ public class DiagnosticOrder extends DomainResource { this.bodySite = new CodeableConcept(); return this.bodySite; } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.status"); + throw new FHIRException("Cannot call addChild on a singleton property DiagnosticOrder.status"); } else if (name.equals("event")) { return addEvent(); } else @@ -2109,9 +2109,9 @@ public class DiagnosticOrder extends DomainResource { } else if (name.equals("specimen")) { return addSpecimen(); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.status"); + throw new FHIRException("Cannot call addChild on a singleton property DiagnosticOrder.status"); } else if (name.equals("priority")) { - throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.priority"); + throw new FHIRException("Cannot call addChild on a singleton property DiagnosticOrder.priority"); } else if (name.equals("event")) { return addEvent(); } else if (name.equals("item")) { diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DiagnosticReport.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DiagnosticReport.java index b62205336..acf8104e9 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DiagnosticReport.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DiagnosticReport.java @@ -445,7 +445,7 @@ public class DiagnosticReport extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("comment")) { - throw new FHIRException("Cannot call addChild on a primitive type DiagnosticReport.comment"); + throw new FHIRException("Cannot call addChild on a singleton property DiagnosticReport.comment"); } else if (name.equals("link")) { this.link = new Reference(); return this.link; @@ -1675,7 +1675,7 @@ public class DiagnosticReport extends DomainResource { if (name.equals("identifier")) { return addIdentifier(); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type DiagnosticReport.status"); + throw new FHIRException("Cannot call addChild on a singleton property DiagnosticReport.status"); } else if (name.equals("category")) { this.category = new CodeableConcept(); return this.category; @@ -1695,7 +1695,7 @@ public class DiagnosticReport extends DomainResource { this.effective = new Period(); return this.effective; } else if (name.equals("issued")) { - throw new FHIRException("Cannot call addChild on a primitive type DiagnosticReport.issued"); + throw new FHIRException("Cannot call addChild on a singleton property DiagnosticReport.issued"); } else if (name.equals("performer")) { this.performer = new Reference(); return this.performer; @@ -1710,7 +1710,7 @@ public class DiagnosticReport extends DomainResource { } else if (name.equals("image")) { return addImage(); } else if (name.equals("conclusion")) { - throw new FHIRException("Cannot call addChild on a primitive type DiagnosticReport.conclusion"); + throw new FHIRException("Cannot call addChild on a singleton property DiagnosticReport.conclusion"); } else if (name.equals("codedDiagnosis")) { return addCodedDiagnosis(); } else if (name.equals("presentedForm")) { diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DocumentManifest.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DocumentManifest.java index 47edb143e..8211e283e 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DocumentManifest.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DocumentManifest.java @@ -1200,13 +1200,13 @@ public class DocumentManifest extends DomainResource { } else if (name.equals("author")) { return addAuthor(); } else if (name.equals("created")) { - throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.created"); + throw new FHIRException("Cannot call addChild on a singleton property DocumentManifest.created"); } else if (name.equals("source")) { - throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.source"); + throw new FHIRException("Cannot call addChild on a singleton property DocumentManifest.source"); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.status"); + throw new FHIRException("Cannot call addChild on a singleton property DocumentManifest.status"); } else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.description"); + throw new FHIRException("Cannot call addChild on a singleton property DocumentManifest.description"); } else if (name.equals("content")) { return addContent(); } else if (name.equals("related")) { diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DocumentReference.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DocumentReference.java index 2fa626015..c1483c6d2 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DocumentReference.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/DocumentReference.java @@ -367,7 +367,7 @@ public class DocumentReference extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("code")) { - throw new FHIRException("Cannot call addChild on a primitive type DocumentReference.code"); + throw new FHIRException("Cannot call addChild on a singleton property DocumentReference.code"); } else if (name.equals("target")) { this.target = new Reference(); return this.target; @@ -2317,18 +2317,18 @@ public class DocumentReference extends DomainResource { this.authenticator = new Reference(); return this.authenticator; } else if (name.equals("created")) { - throw new FHIRException("Cannot call addChild on a primitive type DocumentReference.created"); + throw new FHIRException("Cannot call addChild on a singleton property DocumentReference.created"); } else if (name.equals("indexed")) { - throw new FHIRException("Cannot call addChild on a primitive type DocumentReference.indexed"); + throw new FHIRException("Cannot call addChild on a singleton property DocumentReference.indexed"); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type DocumentReference.status"); + throw new FHIRException("Cannot call addChild on a singleton property DocumentReference.status"); } else if (name.equals("docStatus")) { this.docStatus = new CodeableConcept(); return this.docStatus; } else if (name.equals("relatesTo")) { return addRelatesTo(); } else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type DocumentReference.description"); + throw new FHIRException("Cannot call addChild on a singleton property DocumentReference.description"); } else if (name.equals("securityLabel")) { return addSecurityLabel(); } else if (name.equals("content")) { diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Element.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Element.java index 76cf4fce1..0358e5606 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Element.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Element.java @@ -260,7 +260,7 @@ public abstract class Element extends Base implements IBaseHasExtensions, IBaseE @Override public Base addChild(String name) throws FHIRException { if (name.equals("id")) { - throw new FHIRException("Cannot call addChild on a primitive type Element.id"); + throw new FHIRException("Cannot call addChild on a singleton property Element.id"); } else if (name.equals("extension")) { return addExtension(); } else diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ElementDefinition.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ElementDefinition.java index 0674ccc51..bcbba4b15 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ElementDefinition.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ElementDefinition.java @@ -862,13 +862,13 @@ public class ElementDefinition extends Type implements ICompositeType { @Override public Base addChild(String name) throws FHIRException { if (name.equals("discriminator")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.discriminator"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.discriminator"); } else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.description"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.description"); } else if (name.equals("ordered")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.ordered"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.ordered"); } else if (name.equals("rules")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.rules"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.rules"); } else return super.addChild(name); } @@ -1158,11 +1158,11 @@ public class ElementDefinition extends Type implements ICompositeType { @Override public Base addChild(String name) throws FHIRException { if (name.equals("path")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.path"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.path"); } else if (name.equals("min")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.min"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.min"); } else if (name.equals("max")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.max"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.max"); } else return super.addChild(name); } @@ -1492,11 +1492,11 @@ public class ElementDefinition extends Type implements ICompositeType { @Override public Base addChild(String name) throws FHIRException { if (name.equals("code")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.code"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.code"); } else if (name.equals("profile")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.profile"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.profile"); } else if (name.equals("aggregation")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.aggregation"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.aggregation"); } else return super.addChild(name); } @@ -1932,15 +1932,15 @@ public class ElementDefinition extends Type implements ICompositeType { @Override public Base addChild(String name) throws FHIRException { if (name.equals("key")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.key"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.key"); } else if (name.equals("requirements")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.requirements"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.requirements"); } else if (name.equals("severity")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.severity"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.severity"); } else if (name.equals("human")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.human"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.human"); } else if (name.equals("xpath")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.xpath"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.xpath"); } else return super.addChild(name); } @@ -2233,9 +2233,9 @@ public class ElementDefinition extends Type implements ICompositeType { @Override public Base addChild(String name) throws FHIRException { if (name.equals("strength")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.strength"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.strength"); } else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.description"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.description"); } else if (name.equals("valueSetUri")) { this.valueSet = new UriType(); return this.valueSet; @@ -2516,11 +2516,11 @@ public class ElementDefinition extends Type implements ICompositeType { @Override public Base addChild(String name) throws FHIRException { if (name.equals("identity")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.identity"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.identity"); } else if (name.equals("language")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.language"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.language"); } else if (name.equals("map")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.map"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.map"); } else return super.addChild(name); } @@ -4555,39 +4555,39 @@ public class ElementDefinition extends Type implements ICompositeType { @Override public Base addChild(String name) throws FHIRException { if (name.equals("path")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.path"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.path"); } else if (name.equals("representation")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.representation"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.representation"); } else if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.name"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.name"); } else if (name.equals("label")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.label"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.label"); } else if (name.equals("code")) { return addCode(); } else if (name.equals("slicing")) { this.slicing = new ElementDefinitionSlicingComponent(); return this.slicing; } else if (name.equals("short")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.short"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.short"); } else if (name.equals("definition")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.definition"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.definition"); } else if (name.equals("comments")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.comments"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.comments"); } else if (name.equals("requirements")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.requirements"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.requirements"); } else if (name.equals("alias")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.alias"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.alias"); } else if (name.equals("min")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.min"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.min"); } else if (name.equals("max")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.max"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.max"); } else if (name.equals("base")) { this.base = new ElementDefinitionBaseComponent(); return this.base; } else if (name.equals("type")) { return addType(); } else if (name.equals("nameReference")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.nameReference"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.nameReference"); } else if (name.equals("defaultValueBoolean")) { this.defaultValue = new BooleanType(); return this.defaultValue; @@ -4688,7 +4688,7 @@ public class ElementDefinition extends Type implements ICompositeType { this.defaultValue = new Meta(); return this.defaultValue; } else if (name.equals("meaningWhenMissing")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.meaningWhenMissing"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.meaningWhenMissing"); } else if (name.equals("fixedBoolean")) { this.fixed = new BooleanType(); return this.fixed; @@ -5185,17 +5185,17 @@ public class ElementDefinition extends Type implements ICompositeType { this.maxValue = new Meta(); return this.maxValue; } else if (name.equals("maxLength")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.maxLength"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.maxLength"); } else if (name.equals("condition")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.condition"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.condition"); } else if (name.equals("constraint")) { return addConstraint(); } else if (name.equals("mustSupport")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.mustSupport"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.mustSupport"); } else if (name.equals("isModifier")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.isModifier"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.isModifier"); } else if (name.equals("isSummary")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.isSummary"); + throw new FHIRException("Cannot call addChild on a singleton property ElementDefinition.isSummary"); } else if (name.equals("binding")) { this.binding = new ElementDefinitionBindingComponent(); return this.binding; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EligibilityRequest.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EligibilityRequest.java index d1efd80f4..ee8c674ed 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EligibilityRequest.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EligibilityRequest.java @@ -485,7 +485,7 @@ public class EligibilityRequest extends DomainResource { this.originalRuleset = new Coding(); return this.originalRuleset; } else if (name.equals("created")) { - throw new FHIRException("Cannot call addChild on a primitive type EligibilityRequest.created"); + throw new FHIRException("Cannot call addChild on a singleton property EligibilityRequest.created"); } else if (name.equals("target")) { this.target = new Reference(); return this.target; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EligibilityResponse.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EligibilityResponse.java index 60672ec6c..1c0e53574 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EligibilityResponse.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EligibilityResponse.java @@ -693,9 +693,9 @@ public class EligibilityResponse extends DomainResource { this.request = new Reference(); return this.request; } else if (name.equals("outcome")) { - throw new FHIRException("Cannot call addChild on a primitive type EligibilityResponse.outcome"); + throw new FHIRException("Cannot call addChild on a singleton property EligibilityResponse.outcome"); } else if (name.equals("disposition")) { - throw new FHIRException("Cannot call addChild on a primitive type EligibilityResponse.disposition"); + throw new FHIRException("Cannot call addChild on a singleton property EligibilityResponse.disposition"); } else if (name.equals("ruleset")) { this.ruleset = new Coding(); return this.ruleset; @@ -703,7 +703,7 @@ public class EligibilityResponse extends DomainResource { this.originalRuleset = new Coding(); return this.originalRuleset; } else if (name.equals("created")) { - throw new FHIRException("Cannot call addChild on a primitive type EligibilityResponse.created"); + throw new FHIRException("Cannot call addChild on a singleton property EligibilityResponse.created"); } else if (name.equals("organization")) { this.organization = new Reference(); return this.organization; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Encounter.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Encounter.java index 6814b1fea..b2cd82309 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Encounter.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Encounter.java @@ -789,7 +789,7 @@ public class Encounter extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type Encounter.status"); + throw new FHIRException("Cannot call addChild on a singleton property Encounter.status"); } else if (name.equals("period")) { this.period = new Period(); return this.period; @@ -2076,7 +2076,7 @@ public class Encounter extends DomainResource { this.location = new Reference(); return this.location; } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type Encounter.status"); + throw new FHIRException("Cannot call addChild on a singleton property Encounter.status"); } else if (name.equals("period")) { this.period = new Period(); return this.period; @@ -3370,11 +3370,11 @@ public class Encounter extends DomainResource { if (name.equals("identifier")) { return addIdentifier(); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type Encounter.status"); + throw new FHIRException("Cannot call addChild on a singleton property Encounter.status"); } else if (name.equals("statusHistory")) { return addStatusHistory(); } else if (name.equals("class")) { - throw new FHIRException("Cannot call addChild on a primitive type Encounter.class"); + throw new FHIRException("Cannot call addChild on a singleton property Encounter.class"); } else if (name.equals("type")) { return addType(); } else if (name.equals("priority")) { diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EnrollmentRequest.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EnrollmentRequest.java index 500cfe1d6..06787cbb9 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EnrollmentRequest.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EnrollmentRequest.java @@ -667,7 +667,7 @@ public class EnrollmentRequest extends DomainResource { this.originalRuleset = new Coding(); return this.originalRuleset; } else if (name.equals("created")) { - throw new FHIRException("Cannot call addChild on a primitive type EnrollmentRequest.created"); + throw new FHIRException("Cannot call addChild on a singleton property EnrollmentRequest.created"); } else if (name.equals("target")) { this.target = new Reference(); return this.target; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EnrollmentResponse.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EnrollmentResponse.java index 3ff71d0a5..88be209bc 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EnrollmentResponse.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EnrollmentResponse.java @@ -693,9 +693,9 @@ public class EnrollmentResponse extends DomainResource { this.request = new Reference(); return this.request; } else if (name.equals("outcome")) { - throw new FHIRException("Cannot call addChild on a primitive type EnrollmentResponse.outcome"); + throw new FHIRException("Cannot call addChild on a singleton property EnrollmentResponse.outcome"); } else if (name.equals("disposition")) { - throw new FHIRException("Cannot call addChild on a primitive type EnrollmentResponse.disposition"); + throw new FHIRException("Cannot call addChild on a singleton property EnrollmentResponse.disposition"); } else if (name.equals("ruleset")) { this.ruleset = new Coding(); return this.ruleset; @@ -703,7 +703,7 @@ public class EnrollmentResponse extends DomainResource { this.originalRuleset = new Coding(); return this.originalRuleset; } else if (name.equals("created")) { - throw new FHIRException("Cannot call addChild on a primitive type EnrollmentResponse.created"); + throw new FHIRException("Cannot call addChild on a singleton property EnrollmentResponse.created"); } else if (name.equals("organization")) { this.organization = new Reference(); return this.organization; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EpisodeOfCare.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EpisodeOfCare.java index 28a243f4d..03795b876 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EpisodeOfCare.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/EpisodeOfCare.java @@ -383,7 +383,7 @@ public class EpisodeOfCare extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type EpisodeOfCare.status"); + throw new FHIRException("Cannot call addChild on a singleton property EpisodeOfCare.status"); } else if (name.equals("period")) { this.period = new Period(); return this.period; @@ -1418,7 +1418,7 @@ public class EpisodeOfCare extends DomainResource { if (name.equals("identifier")) { return addIdentifier(); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type EpisodeOfCare.status"); + throw new FHIRException("Cannot call addChild on a singleton property EpisodeOfCare.status"); } else if (name.equals("statusHistory")) { return addStatusHistory(); } else if (name.equals("type")) { diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ExplanationOfBenefit.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ExplanationOfBenefit.java index b6665e2eb..d3c0e0d94 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ExplanationOfBenefit.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/ExplanationOfBenefit.java @@ -693,9 +693,9 @@ public class ExplanationOfBenefit extends DomainResource { this.request = new Reference(); return this.request; } else if (name.equals("outcome")) { - throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.outcome"); + throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.outcome"); } else if (name.equals("disposition")) { - throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.disposition"); + throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.disposition"); } else if (name.equals("ruleset")) { this.ruleset = new Coding(); return this.ruleset; @@ -703,7 +703,7 @@ public class ExplanationOfBenefit extends DomainResource { this.originalRuleset = new Coding(); return this.originalRuleset; } else if (name.equals("created")) { - throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.created"); + throw new FHIRException("Cannot call addChild on a singleton property ExplanationOfBenefit.created"); } else if (name.equals("organization")) { this.organization = new Reference(); return this.organization; diff --git a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Extension.java b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Extension.java index 2ce719c56..a102df090 100644 --- a/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Extension.java +++ b/org.hl7.fhir.dstu2/src/main/java/org/hl7/fhir/dstu2/model/Extension.java @@ -177,7 +177,7 @@ public class Extension extends BaseExtension implements IBaseExtension funcIntersect(ExecutionContext context, List focus, ExpressionNode exp) throws FHIRException { List result = new ArrayList(); - List other = execute(context, focus, exp.getParameters().get(0), true); + List other = execute(context, baseToList(context.thisItem), exp.getParameters().get(0), true); for (Base item : focus) { if (!doContains(result, item) && doContains(other, item)) { diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/profiles/PEModelTest1343.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/profiles/PEModelTest1343.java new file mode 100644 index 000000000..23b84de31 --- /dev/null +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/profiles/PEModelTest1343.java @@ -0,0 +1,47 @@ +package org.hl7.fhir.r5.profiles; + + +import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.context.IWorkerContext; +import org.hl7.fhir.r5.model.Patient; +import org.hl7.fhir.r5.context.SimpleWorkerContext; +import org.hl7.fhir.r5.formats.IParser.OutputStyle; +import org.hl7.fhir.r5.formats.JsonParser; +import org.hl7.fhir.r5.profilemodel.PEBuilder; +import org.hl7.fhir.r5.test.utils.TestPackageLoader; +import org.hl7.fhir.r5.test.utils.TestingUtilities; +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.utilities.npm.NpmPackage; +import org.junit.jupiter.api.Test; +import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager; + +public class PEModelTest1343 { + + private IWorkerContext ctxt; + + public void Load() throws Exception { + if (ctxt == null) { + ctxt = TestingUtilities.getSharedWorkerContext("4.0.1"); + FilesystemPackageCacheManager pc = new FilesystemPackageCacheManager(true); + NpmPackage npm = pc.loadPackage("hl7.fhir.fr.core", "1.1.0"); + ctxt.loadFromPackage(npm, new TestPackageLoader(Utilities.strings(SimpleWorkerContext.defaultTypesToLoad().stream().toArray(String[]::new)))); + } + } + + + @Test + public void testPatientCreate() throws Exception { + CreatePatientFromProfile("http://interopsante.org/fhir/StructureDefinition/FrPatient"); + } + + public void CreatePatientFromProfile(String profileURL) throws Exception { + this.Load(); + + var peBuilder = new PEBuilder(ctxt, PEBuilder.PEElementPropertiesPolicy.NONE, false); + Patient res = (Patient) peBuilder.createResource(profileURL, true); + + String json = new JsonParser().setOutputStyle(OutputStyle.PRETTY).composeString(res); + System.out.println(json); + } + +} diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java index 992e76969..c6882c553 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java @@ -1343,7 +1343,7 @@ public class NpmPackage { if (npm.asBoolean("lazy-load")) { return true; } - if (!hasFile("other", "spec.internals")) { + if (!hasFile("other", "spec.internals") && folders.get("package").cachedIndex == null) { return false; } return true;