diff --git a/org.hl7.fhir.dstu2016may/src/main/java/org/hl7/fhir/dstu2016may/model/ListResource.java b/org.hl7.fhir.dstu2016may/src/main/java/org/hl7/fhir/dstu2016may/model/ListResource.java index a54fbdeb1..bf6e13185 100644 --- a/org.hl7.fhir.dstu2016may/src/main/java/org/hl7/fhir/dstu2016may/model/ListResource.java +++ b/org.hl7.fhir.dstu2016may/src/main/java/org/hl7/fhir/dstu2016may/model/ListResource.java @@ -548,10 +548,10 @@ public class ListResource extends DomainResource { return this.flag; } else if (name.equals("deleted")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.deleted"); + throw new FHIRException("Cannot call addChild on a primitive type List.deleted"); } else if (name.equals("date")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.date"); + throw new FHIRException("Cannot call addChild on a primitive type List.date"); } else if (name.equals("item")) { this.item = new Reference(); @@ -774,7 +774,7 @@ public class ListResource extends DomainResource { public Enumeration getStatusElement() { if (this.status == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.status"); + throw new Error("Attempt to auto-create List.status"); else if (Configuration.doAutoCreate()) this.status = new Enumeration(new ListStatusEnumFactory()); // bb return this.status; @@ -819,7 +819,7 @@ public class ListResource extends DomainResource { public Enumeration getModeElement() { if (this.mode == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.mode"); + throw new Error("Attempt to auto-create List.mode"); else if (Configuration.doAutoCreate()) this.mode = new Enumeration(new ListModeEnumFactory()); // bb return this.mode; @@ -864,7 +864,7 @@ public class ListResource extends DomainResource { public StringType getTitleElement() { if (this.title == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.title"); + throw new Error("Attempt to auto-create List.title"); else if (Configuration.doAutoCreate()) this.title = new StringType(); // bb return this.title; @@ -913,7 +913,7 @@ public class ListResource extends DomainResource { public CodeableConcept getCode() { if (this.code == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.code"); + throw new Error("Attempt to auto-create List.code"); else if (Configuration.doAutoCreate()) this.code = new CodeableConcept(); // cc return this.code; @@ -937,7 +937,7 @@ public class ListResource extends DomainResource { public Reference getSubject() { if (this.subject == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.subject"); + throw new Error("Attempt to auto-create List.subject"); else if (Configuration.doAutoCreate()) this.subject = new Reference(); // cc return this.subject; @@ -976,7 +976,7 @@ public class ListResource extends DomainResource { public Reference getEncounter() { if (this.encounter == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.encounter"); + throw new Error("Attempt to auto-create List.encounter"); else if (Configuration.doAutoCreate()) this.encounter = new Reference(); // cc return this.encounter; @@ -1000,7 +1000,7 @@ public class ListResource extends DomainResource { public Encounter getEncounterTarget() { if (this.encounterTarget == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.encounter"); + throw new Error("Attempt to auto-create List.encounter"); else if (Configuration.doAutoCreate()) this.encounterTarget = new Encounter(); // aa return this.encounterTarget; @@ -1020,7 +1020,7 @@ public class ListResource extends DomainResource { public DateTimeType getDateElement() { if (this.date == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.date"); + throw new Error("Attempt to auto-create List.date"); else if (Configuration.doAutoCreate()) this.date = new DateTimeType(); // bb return this.date; @@ -1069,7 +1069,7 @@ public class ListResource extends DomainResource { public Reference getSource() { if (this.source == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.source"); + throw new Error("Attempt to auto-create List.source"); else if (Configuration.doAutoCreate()) this.source = new Reference(); // cc return this.source; @@ -1108,7 +1108,7 @@ public class ListResource extends DomainResource { public CodeableConcept getOrderedBy() { if (this.orderedBy == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.orderedBy"); + throw new Error("Attempt to auto-create List.orderedBy"); else if (Configuration.doAutoCreate()) this.orderedBy = new CodeableConcept(); // cc return this.orderedBy; @@ -1212,7 +1212,7 @@ public class ListResource extends DomainResource { public CodeableConcept getEmptyReason() { if (this.emptyReason == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.emptyReason"); + throw new Error("Attempt to auto-create List.emptyReason"); else if (Configuration.doAutoCreate()) this.emptyReason = new CodeableConcept(); // cc return this.emptyReason; @@ -1374,13 +1374,13 @@ public class ListResource extends DomainResource { return addIdentifier(); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.status"); + throw new FHIRException("Cannot call addChild on a primitive type List.status"); } else if (name.equals("mode")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.mode"); + throw new FHIRException("Cannot call addChild on a primitive type List.mode"); } else if (name.equals("title")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.title"); + throw new FHIRException("Cannot call addChild on a primitive type List.title"); } else if (name.equals("code")) { this.code = new CodeableConcept(); @@ -1395,7 +1395,7 @@ public class ListResource extends DomainResource { return this.encounter; } else if (name.equals("date")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.date"); + throw new FHIRException("Cannot call addChild on a primitive type List.date"); } else if (name.equals("source")) { this.source = new Reference(); @@ -1539,9 +1539,9 @@ public class ListResource extends DomainResource { /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ListResource:patient". + * the path value of "List:patient". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ListResource:patient").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("List:patient").toLocked(); /** * Search parameter: source @@ -1565,9 +1565,9 @@ public class ListResource extends DomainResource { /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ListResource:source". + * the path value of "List:source". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE = new ca.uhn.fhir.model.api.Include("ListResource:source").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE = new ca.uhn.fhir.model.api.Include("List:source").toLocked(); /** * Search parameter: status @@ -1611,9 +1611,9 @@ public class ListResource extends DomainResource { /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ListResource:subject". + * the path value of "List:subject". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("ListResource:subject").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("List:subject").toLocked(); /** * Search parameter: item @@ -1637,9 +1637,9 @@ public class ListResource extends DomainResource { /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ListResource:item". + * the path value of "List:item". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ITEM = new ca.uhn.fhir.model.api.Include("ListResource:item").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_ITEM = new ca.uhn.fhir.model.api.Include("List:item").toLocked(); /** * Search parameter: encounter @@ -1663,9 +1663,9 @@ public class ListResource extends DomainResource { /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ListResource:encounter". + * the path value of "List:encounter". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("ListResource:encounter").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("List:encounter").toLocked(); /** * Search parameter: code diff --git a/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/model/ListResource.java b/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/model/ListResource.java index 4203569c2..c7ea61329 100644 --- a/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/model/ListResource.java +++ b/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/model/ListResource.java @@ -583,10 +583,10 @@ public class ListResource extends DomainResource { return this.flag; } else if (name.equals("deleted")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.deleted"); + throw new FHIRException("Cannot call addChild on a primitive type List.deleted"); } else if (name.equals("date")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.date"); + throw new FHIRException("Cannot call addChild on a primitive type List.date"); } else if (name.equals("item")) { this.item = new Reference(); @@ -827,7 +827,7 @@ public class ListResource extends DomainResource { public Enumeration getStatusElement() { if (this.status == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.status"); + throw new Error("Attempt to auto-create List.status"); else if (Configuration.doAutoCreate()) this.status = new Enumeration(new ListStatusEnumFactory()); // bb return this.status; @@ -872,7 +872,7 @@ public class ListResource extends DomainResource { public Enumeration getModeElement() { if (this.mode == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.mode"); + throw new Error("Attempt to auto-create List.mode"); else if (Configuration.doAutoCreate()) this.mode = new Enumeration(new ListModeEnumFactory()); // bb return this.mode; @@ -917,7 +917,7 @@ public class ListResource extends DomainResource { public StringType getTitleElement() { if (this.title == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.title"); + throw new Error("Attempt to auto-create List.title"); else if (Configuration.doAutoCreate()) this.title = new StringType(); // bb return this.title; @@ -966,7 +966,7 @@ public class ListResource extends DomainResource { public CodeableConcept getCode() { if (this.code == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.code"); + throw new Error("Attempt to auto-create List.code"); else if (Configuration.doAutoCreate()) this.code = new CodeableConcept(); // cc return this.code; @@ -990,7 +990,7 @@ public class ListResource extends DomainResource { public Reference getSubject() { if (this.subject == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.subject"); + throw new Error("Attempt to auto-create List.subject"); else if (Configuration.doAutoCreate()) this.subject = new Reference(); // cc return this.subject; @@ -1029,7 +1029,7 @@ public class ListResource extends DomainResource { public Reference getEncounter() { if (this.encounter == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.encounter"); + throw new Error("Attempt to auto-create List.encounter"); else if (Configuration.doAutoCreate()) this.encounter = new Reference(); // cc return this.encounter; @@ -1053,7 +1053,7 @@ public class ListResource extends DomainResource { public Encounter getEncounterTarget() { if (this.encounterTarget == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.encounter"); + throw new Error("Attempt to auto-create List.encounter"); else if (Configuration.doAutoCreate()) this.encounterTarget = new Encounter(); // aa return this.encounterTarget; @@ -1073,7 +1073,7 @@ public class ListResource extends DomainResource { public DateTimeType getDateElement() { if (this.date == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.date"); + throw new Error("Attempt to auto-create List.date"); else if (Configuration.doAutoCreate()) this.date = new DateTimeType(); // bb return this.date; @@ -1122,7 +1122,7 @@ public class ListResource extends DomainResource { public Reference getSource() { if (this.source == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.source"); + throw new Error("Attempt to auto-create List.source"); else if (Configuration.doAutoCreate()) this.source = new Reference(); // cc return this.source; @@ -1161,7 +1161,7 @@ public class ListResource extends DomainResource { public CodeableConcept getOrderedBy() { if (this.orderedBy == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.orderedBy"); + throw new Error("Attempt to auto-create List.orderedBy"); else if (Configuration.doAutoCreate()) this.orderedBy = new CodeableConcept(); // cc return this.orderedBy; @@ -1291,7 +1291,7 @@ public class ListResource extends DomainResource { public CodeableConcept getEmptyReason() { if (this.emptyReason == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.emptyReason"); + throw new Error("Attempt to auto-create List.emptyReason"); else if (Configuration.doAutoCreate()) this.emptyReason = new CodeableConcept(); // cc return this.emptyReason; @@ -1500,13 +1500,13 @@ public class ListResource extends DomainResource { return addIdentifier(); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.status"); + throw new FHIRException("Cannot call addChild on a primitive type List.status"); } else if (name.equals("mode")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.mode"); + throw new FHIRException("Cannot call addChild on a primitive type List.mode"); } else if (name.equals("title")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.title"); + throw new FHIRException("Cannot call addChild on a primitive type List.title"); } else if (name.equals("code")) { this.code = new CodeableConcept(); @@ -1521,7 +1521,7 @@ public class ListResource extends DomainResource { return this.encounter; } else if (name.equals("date")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.date"); + throw new FHIRException("Cannot call addChild on a primitive type List.date"); } else if (name.equals("source")) { this.source = new Reference(); @@ -1683,9 +1683,9 @@ public class ListResource extends DomainResource { /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ListResource:item". + * the path value of "List:item". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ITEM = new ca.uhn.fhir.model.api.Include("ListResource:item").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_ITEM = new ca.uhn.fhir.model.api.Include("List:item").toLocked(); /** * Search parameter: empty-reason @@ -1769,9 +1769,9 @@ public class ListResource extends DomainResource { /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ListResource:subject". + * the path value of "List:subject". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("ListResource:subject").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("List:subject").toLocked(); /** * Search parameter: patient @@ -1795,9 +1795,9 @@ public class ListResource extends DomainResource { /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ListResource:patient". + * the path value of "List:patient". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ListResource:patient").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("List:patient").toLocked(); /** * Search parameter: source @@ -1821,9 +1821,9 @@ public class ListResource extends DomainResource { /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ListResource:source". + * the path value of "List:source". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE = new ca.uhn.fhir.model.api.Include("ListResource:source").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE = new ca.uhn.fhir.model.api.Include("List:source").toLocked(); /** * Search parameter: encounter @@ -1847,9 +1847,9 @@ public class ListResource extends DomainResource { /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ListResource:encounter". + * the path value of "List:encounter". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("ListResource:encounter").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("List:encounter").toLocked(); /** * Search parameter: title diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/ListResource.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/ListResource.java index 3157c1b87..4c4b2ce97 100644 --- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/ListResource.java +++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/ListResource.java @@ -583,10 +583,10 @@ public class ListResource extends DomainResource { return this.flag; } else if (name.equals("deleted")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.deleted"); + throw new FHIRException("Cannot call addChild on a primitive type List.deleted"); } else if (name.equals("date")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.date"); + throw new FHIRException("Cannot call addChild on a primitive type List.date"); } else if (name.equals("item")) { this.item = new Reference(); @@ -831,7 +831,7 @@ public class ListResource extends DomainResource { public Enumeration getStatusElement() { if (this.status == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.status"); + throw new Error("Attempt to auto-create List.status"); else if (Configuration.doAutoCreate()) this.status = new Enumeration(new ListStatusEnumFactory()); // bb return this.status; @@ -876,7 +876,7 @@ public class ListResource extends DomainResource { public Enumeration getModeElement() { if (this.mode == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.mode"); + throw new Error("Attempt to auto-create List.mode"); else if (Configuration.doAutoCreate()) this.mode = new Enumeration(new ListModeEnumFactory()); // bb return this.mode; @@ -921,7 +921,7 @@ public class ListResource extends DomainResource { public StringType getTitleElement() { if (this.title == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.title"); + throw new Error("Attempt to auto-create List.title"); else if (Configuration.doAutoCreate()) this.title = new StringType(); // bb return this.title; @@ -970,7 +970,7 @@ public class ListResource extends DomainResource { public CodeableConcept getCode() { if (this.code == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.code"); + throw new Error("Attempt to auto-create List.code"); else if (Configuration.doAutoCreate()) this.code = new CodeableConcept(); // cc return this.code; @@ -994,7 +994,7 @@ public class ListResource extends DomainResource { public Reference getSubject() { if (this.subject == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.subject"); + throw new Error("Attempt to auto-create List.subject"); else if (Configuration.doAutoCreate()) this.subject = new Reference(); // cc return this.subject; @@ -1033,7 +1033,7 @@ public class ListResource extends DomainResource { public Reference getEncounter() { if (this.encounter == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.encounter"); + throw new Error("Attempt to auto-create List.encounter"); else if (Configuration.doAutoCreate()) this.encounter = new Reference(); // cc return this.encounter; @@ -1057,7 +1057,7 @@ public class ListResource extends DomainResource { public Encounter getEncounterTarget() { if (this.encounterTarget == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.encounter"); + throw new Error("Attempt to auto-create List.encounter"); else if (Configuration.doAutoCreate()) this.encounterTarget = new Encounter(); // aa return this.encounterTarget; @@ -1077,7 +1077,7 @@ public class ListResource extends DomainResource { public DateTimeType getDateElement() { if (this.date == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.date"); + throw new Error("Attempt to auto-create List.date"); else if (Configuration.doAutoCreate()) this.date = new DateTimeType(); // bb return this.date; @@ -1126,7 +1126,7 @@ public class ListResource extends DomainResource { public Reference getSource() { if (this.source == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.source"); + throw new Error("Attempt to auto-create List.source"); else if (Configuration.doAutoCreate()) this.source = new Reference(); // cc return this.source; @@ -1165,7 +1165,7 @@ public class ListResource extends DomainResource { public CodeableConcept getOrderedBy() { if (this.orderedBy == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.orderedBy"); + throw new Error("Attempt to auto-create List.orderedBy"); else if (Configuration.doAutoCreate()) this.orderedBy = new CodeableConcept(); // cc return this.orderedBy; @@ -1295,7 +1295,7 @@ public class ListResource extends DomainResource { public CodeableConcept getEmptyReason() { if (this.emptyReason == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.emptyReason"); + throw new Error("Attempt to auto-create List.emptyReason"); else if (Configuration.doAutoCreate()) this.emptyReason = new CodeableConcept(); // cc return this.emptyReason; @@ -1504,13 +1504,13 @@ public class ListResource extends DomainResource { return addIdentifier(); } else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.status"); + throw new FHIRException("Cannot call addChild on a primitive type List.status"); } else if (name.equals("mode")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.mode"); + throw new FHIRException("Cannot call addChild on a primitive type List.mode"); } else if (name.equals("title")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.title"); + throw new FHIRException("Cannot call addChild on a primitive type List.title"); } else if (name.equals("code")) { this.code = new CodeableConcept(); @@ -1525,7 +1525,7 @@ public class ListResource extends DomainResource { return this.encounter; } else if (name.equals("date")) { - throw new FHIRException("Cannot call addChild on a primitive type ListResource.date"); + throw new FHIRException("Cannot call addChild on a primitive type List.date"); } else if (name.equals("source")) { this.source = new Reference(); @@ -1691,9 +1691,9 @@ public class ListResource extends DomainResource { /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ListResource:item". + * the path value of "List:item". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ITEM = new ca.uhn.fhir.model.api.Include("ListResource:item").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_ITEM = new ca.uhn.fhir.model.api.Include("List:item").toLocked(); /** * Search parameter: empty-reason @@ -1777,9 +1777,9 @@ public class ListResource extends DomainResource { /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ListResource:subject". + * the path value of "List:subject". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("ListResource:subject").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("List:subject").toLocked(); /** * Search parameter: patient @@ -1803,9 +1803,9 @@ public class ListResource extends DomainResource { /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ListResource:patient". + * the path value of "List:patient". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ListResource:patient").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("List:patient").toLocked(); /** * Search parameter: source @@ -1829,9 +1829,9 @@ public class ListResource extends DomainResource { /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ListResource:source". + * the path value of "List:source". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE = new ca.uhn.fhir.model.api.Include("ListResource:source").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE = new ca.uhn.fhir.model.api.Include("List:source").toLocked(); /** * Search parameter: encounter @@ -1855,9 +1855,9 @@ public class ListResource extends DomainResource { /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ListResource:encounter". + * the path value of "List:encounter". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("ListResource:encounter").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("List:encounter").toLocked(); /** * Search parameter: title diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ListResource.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ListResource.java index cc5fb02f4..96e75bed7 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ListResource.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/ListResource.java @@ -682,7 +682,7 @@ public class ListResource extends DomainResource { public Enumeration getStatusElement() { if (this.status == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.status"); + throw new Error("Attempt to auto-create List.status"); else if (Configuration.doAutoCreate()) this.status = new Enumeration(new ListStatusEnumFactory()); // bb return this.status; @@ -727,7 +727,7 @@ public class ListResource extends DomainResource { public Enumeration getModeElement() { if (this.mode == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.mode"); + throw new Error("Attempt to auto-create List.mode"); else if (Configuration.doAutoCreate()) this.mode = new Enumeration(new ListModeEnumFactory()); // bb return this.mode; @@ -772,7 +772,7 @@ public class ListResource extends DomainResource { public StringType getTitleElement() { if (this.title == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.title"); + throw new Error("Attempt to auto-create List.title"); else if (Configuration.doAutoCreate()) this.title = new StringType(); // bb return this.title; @@ -821,7 +821,7 @@ public class ListResource extends DomainResource { public CodeableConcept getCode() { if (this.code == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.code"); + throw new Error("Attempt to auto-create List.code"); else if (Configuration.doAutoCreate()) this.code = new CodeableConcept(); // cc return this.code; @@ -845,7 +845,7 @@ public class ListResource extends DomainResource { public Reference getSubject() { if (this.subject == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.subject"); + throw new Error("Attempt to auto-create List.subject"); else if (Configuration.doAutoCreate()) this.subject = new Reference(); // cc return this.subject; @@ -869,7 +869,7 @@ public class ListResource extends DomainResource { public Reference getEncounter() { if (this.encounter == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.encounter"); + throw new Error("Attempt to auto-create List.encounter"); else if (Configuration.doAutoCreate()) this.encounter = new Reference(); // cc return this.encounter; @@ -893,7 +893,7 @@ public class ListResource extends DomainResource { public DateTimeType getDateElement() { if (this.date == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.date"); + throw new Error("Attempt to auto-create List.date"); else if (Configuration.doAutoCreate()) this.date = new DateTimeType(); // bb return this.date; @@ -942,7 +942,7 @@ public class ListResource extends DomainResource { public Reference getSource() { if (this.source == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.source"); + throw new Error("Attempt to auto-create List.source"); else if (Configuration.doAutoCreate()) this.source = new Reference(); // cc return this.source; @@ -966,7 +966,7 @@ public class ListResource extends DomainResource { public CodeableConcept getOrderedBy() { if (this.orderedBy == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.orderedBy"); + throw new Error("Attempt to auto-create List.orderedBy"); else if (Configuration.doAutoCreate()) this.orderedBy = new CodeableConcept(); // cc return this.orderedBy; @@ -1096,7 +1096,7 @@ public class ListResource extends DomainResource { public CodeableConcept getEmptyReason() { if (this.emptyReason == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ListResource.emptyReason"); + throw new Error("Attempt to auto-create List.emptyReason"); else if (Configuration.doAutoCreate()) this.emptyReason = new CodeableConcept(); // cc return this.emptyReason; diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java index 4d366ec83..ab99c9938 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java @@ -1874,9 +1874,11 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat if ("http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type".equals(extUrl)) { list.get(0).setExpression("ElementDefinition.type"); } - if ("http://hl7.org/fhir/StructureDefinition/regex".equals(extUrl)) { - list.get(1).setExpression("ElementDefinition.type"); - } + // the history of this is a mess - see https://jira.hl7.org/browse/FHIR-13328 + // we in practice we will support it in either place, but the specification says on ElementDefinition, not on ElementDefinition.type +// if ("http://hl7.org/fhir/StructureDefinition/regex".equals(extUrl)) { +// list.get(1).setExpression("ElementDefinition.type"); +// } if ("http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version".equals(extUrl)) { list.get(0).setExpression("Element"); // well, it can't be used anywhere but the list of places it can be used is quite long } @@ -2070,6 +2072,16 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat } } String regex = context.getExtensionString(ToolingExtensions.EXT_REGEX); + // there's a messy history here - this extension snhould only be on the element definition itself, but for historical reasons + //( see task 13328) it might also be found on one the types + if (regex != null) { + for (TypeRefComponent tr : context.getType()) { + if (tr.hasExtension(ToolingExtensions.EXT_REGEX)) { + regex = tr.getExtensionString(ToolingExtensions.EXT_REGEX); + break; + } + } + } if (regex != null) { rule(errors, IssueType.INVALID, e.line(), e.col(), path, e.primitiveValue().matches(regex), I18nConstants.TYPE_SPECIFIC_CHECKS_DT_PRIMITIVE_REGEX, e.primitiveValue(), regex); }