diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Account.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Account.java index 152e3d986de..b47485f4fdc 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Account.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Account.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centres, etc. */ @@ -766,11 +765,8 @@ public class Account extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (name == null || name.isEmpty()) - && (type == null || type.isEmpty()) && (status == null || status.isEmpty()) && (activePeriod == null || activePeriod.isEmpty()) - && (currency == null || currency.isEmpty()) && (balance == null || balance.isEmpty()) && (coveragePeriod == null || coveragePeriod.isEmpty()) - && (subject == null || subject.isEmpty()) && (owner == null || owner.isEmpty()) && (description == null || description.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, name, type, status + , activePeriod, currency, balance, coveragePeriod, subject, owner, description); } @Override @@ -872,7 +868,7 @@ public class Account extends DomainResource { * Path: Account.subject
*

*/ - @SearchParamDefinition(name="subject", path="Account.subject", description="What is account tied to?", type="reference" ) + @SearchParamDefinition(name="subject", path="Account.subject", description="What is account tied to?", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ActionDefinition.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ActionDefinition.java new file mode 100644 index 00000000000..e16bb6065d5 --- /dev/null +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ActionDefinition.java @@ -0,0 +1,2035 @@ +package org.hl7.fhir.dstu3.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; +/** + * The definition of an action to be performed. Some aspects of the definition are specified statically, and some aspects can be specified dynamically by referencing logic defined in a library. + */ +@DatatypeDef(name="ActionDefinition") +public class ActionDefinition extends Type implements ICompositeType { + + public enum ActionRelationshipType { + /** + * The action must be performed before the related action + */ + BEFORE, + /** + * The action must be performed after the related action + */ + AFTER, + /** + * added to help the parsers + */ + NULL; + public static ActionRelationshipType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("before".equals(codeString)) + return BEFORE; + if ("after".equals(codeString)) + return AFTER; + throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case BEFORE: return "before"; + case AFTER: return "after"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case BEFORE: return "http://hl7.org/fhir/action-relationship-type"; + case AFTER: return "http://hl7.org/fhir/action-relationship-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case BEFORE: return "The action must be performed before the related action"; + case AFTER: return "The action must be performed after the related action"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case BEFORE: return "Before"; + case AFTER: return "After"; + default: return "?"; + } + } + } + + public static class ActionRelationshipTypeEnumFactory implements EnumFactory { + public ActionRelationshipType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("before".equals(codeString)) + return ActionRelationshipType.BEFORE; + if ("after".equals(codeString)) + return ActionRelationshipType.AFTER; + throw new IllegalArgumentException("Unknown ActionRelationshipType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("before".equals(codeString)) + return new Enumeration(this, ActionRelationshipType.BEFORE); + if ("after".equals(codeString)) + return new Enumeration(this, ActionRelationshipType.AFTER); + throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'"); + } + public String toCode(ActionRelationshipType code) { + if (code == ActionRelationshipType.BEFORE) + return "before"; + if (code == ActionRelationshipType.AFTER) + return "after"; + return "?"; + } + public String toSystem(ActionRelationshipType code) { + return code.getSystem(); + } + } + + public enum ActionRelationshipAnchor { + /** + * The action relationship is anchored to the start of the related action + */ + START, + /** + * The action relationship is anchored to the end of the related action + */ + END, + /** + * added to help the parsers + */ + NULL; + public static ActionRelationshipAnchor fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("start".equals(codeString)) + return START; + if ("end".equals(codeString)) + return END; + throw new FHIRException("Unknown ActionRelationshipAnchor code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case START: return "start"; + case END: return "end"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case START: return "http://hl7.org/fhir/action-relationship-anchor"; + case END: return "http://hl7.org/fhir/action-relationship-anchor"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case START: return "The action relationship is anchored to the start of the related action"; + case END: return "The action relationship is anchored to the end of the related action"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case START: return "Start"; + case END: return "End"; + default: return "?"; + } + } + } + + public static class ActionRelationshipAnchorEnumFactory implements EnumFactory { + public ActionRelationshipAnchor fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("start".equals(codeString)) + return ActionRelationshipAnchor.START; + if ("end".equals(codeString)) + return ActionRelationshipAnchor.END; + throw new IllegalArgumentException("Unknown ActionRelationshipAnchor code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("start".equals(codeString)) + return new Enumeration(this, ActionRelationshipAnchor.START); + if ("end".equals(codeString)) + return new Enumeration(this, ActionRelationshipAnchor.END); + throw new FHIRException("Unknown ActionRelationshipAnchor code '"+codeString+"'"); + } + public String toCode(ActionRelationshipAnchor code) { + if (code == ActionRelationshipAnchor.START) + return "start"; + if (code == ActionRelationshipAnchor.END) + return "end"; + return "?"; + } + public String toSystem(ActionRelationshipAnchor code) { + return code.getSystem(); + } + } + + public enum ParticipantType { + /** + * The participant is the patient under evaluation + */ + PATIENT, + /** + * The participant is a practitioner involved in the patient's care + */ + PRACTITIONER, + /** + * The participant is a person related to the patient + */ + RELATEDPERSON, + /** + * added to help the parsers + */ + NULL; + public static ParticipantType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("patient".equals(codeString)) + return PATIENT; + if ("practitioner".equals(codeString)) + return PRACTITIONER; + if ("related-person".equals(codeString)) + return RELATEDPERSON; + throw new FHIRException("Unknown ParticipantType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PATIENT: return "patient"; + case PRACTITIONER: return "practitioner"; + case RELATEDPERSON: return "related-person"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PATIENT: return "http://hl7.org/fhir/action-participant-type"; + case PRACTITIONER: return "http://hl7.org/fhir/action-participant-type"; + case RELATEDPERSON: return "http://hl7.org/fhir/action-participant-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PATIENT: return "The participant is the patient under evaluation"; + case PRACTITIONER: return "The participant is a practitioner involved in the patient's care"; + case RELATEDPERSON: return "The participant is a person related to the patient"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PATIENT: return "Patient"; + case PRACTITIONER: return "Practitioner"; + case RELATEDPERSON: return "Related Person"; + default: return "?"; + } + } + } + + public static class ParticipantTypeEnumFactory implements EnumFactory { + public ParticipantType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("patient".equals(codeString)) + return ParticipantType.PATIENT; + if ("practitioner".equals(codeString)) + return ParticipantType.PRACTITIONER; + if ("related-person".equals(codeString)) + return ParticipantType.RELATEDPERSON; + throw new IllegalArgumentException("Unknown ParticipantType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("patient".equals(codeString)) + return new Enumeration(this, ParticipantType.PATIENT); + if ("practitioner".equals(codeString)) + return new Enumeration(this, ParticipantType.PRACTITIONER); + if ("related-person".equals(codeString)) + return new Enumeration(this, ParticipantType.RELATEDPERSON); + throw new FHIRException("Unknown ParticipantType code '"+codeString+"'"); + } + public String toCode(ParticipantType code) { + if (code == ParticipantType.PATIENT) + return "patient"; + if (code == ParticipantType.PRACTITIONER) + return "practitioner"; + if (code == ParticipantType.RELATEDPERSON) + return "related-person"; + return "?"; + } + public String toSystem(ParticipantType code) { + return code.getSystem(); + } + } + + public enum ActionType { + /** + * The action is to create a new resource + */ + CREATE, + /** + * The action is to update an existing resource + */ + UPDATE, + /** + * The action is to remove an existing resource + */ + REMOVE, + /** + * The action is to fire a specific event + */ + FIREEVENT, + /** + * added to help the parsers + */ + NULL; + public static ActionType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return CREATE; + if ("update".equals(codeString)) + return UPDATE; + if ("remove".equals(codeString)) + return REMOVE; + if ("fire-event".equals(codeString)) + return FIREEVENT; + throw new FHIRException("Unknown ActionType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CREATE: return "create"; + case UPDATE: return "update"; + case REMOVE: return "remove"; + case FIREEVENT: return "fire-event"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case CREATE: return "http://hl7.org/fhir/action-type"; + case UPDATE: return "http://hl7.org/fhir/action-type"; + case REMOVE: return "http://hl7.org/fhir/action-type"; + case FIREEVENT: return "http://hl7.org/fhir/action-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case CREATE: return "The action is to create a new resource"; + case UPDATE: return "The action is to update an existing resource"; + case REMOVE: return "The action is to remove an existing resource"; + case FIREEVENT: return "The action is to fire a specific event"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CREATE: return "Create"; + case UPDATE: return "Update"; + case REMOVE: return "Remove"; + case FIREEVENT: return "Fire Event"; + default: return "?"; + } + } + } + + public static class ActionTypeEnumFactory implements EnumFactory { + public ActionType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return ActionType.CREATE; + if ("update".equals(codeString)) + return ActionType.UPDATE; + if ("remove".equals(codeString)) + return ActionType.REMOVE; + if ("fire-event".equals(codeString)) + return ActionType.FIREEVENT; + throw new IllegalArgumentException("Unknown ActionType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return new Enumeration(this, ActionType.CREATE); + if ("update".equals(codeString)) + return new Enumeration(this, ActionType.UPDATE); + if ("remove".equals(codeString)) + return new Enumeration(this, ActionType.REMOVE); + if ("fire-event".equals(codeString)) + return new Enumeration(this, ActionType.FIREEVENT); + throw new FHIRException("Unknown ActionType code '"+codeString+"'"); + } + public String toCode(ActionType code) { + if (code == ActionType.CREATE) + return "create"; + if (code == ActionType.UPDATE) + return "update"; + if (code == ActionType.REMOVE) + return "remove"; + if (code == ActionType.FIREEVENT) + return "fire-event"; + return "?"; + } + public String toSystem(ActionType code) { + return code.getSystem(); + } + } + + @Block() + public static class ActionDefinitionRelatedActionComponent extends Element implements IBaseDatatypeElement { + /** + * The unique identifier of the related action. + */ + @Child(name = "actionIdentifier", type = {Identifier.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Identifier of the related action", formalDefinition="The unique identifier of the related action." ) + protected Identifier actionIdentifier; + + /** + * The relationship of this action to the related action. + */ + @Child(name = "relationship", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="before | after", formalDefinition="The relationship of this action to the related action." ) + protected Enumeration relationship; + + /** + * A duration or range of durations to apply to the relationship. For example, 30-60 minutes before. + */ + @Child(name = "offset", type = {Duration.class, Range.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Time offset for the relationship", formalDefinition="A duration or range of durations to apply to the relationship. For example, 30-60 minutes before." ) + protected Type offset; + + /** + * An optional indicator for how the relationship is anchored to the related action. For example "before the start" or "before the end" of the related action. + */ + @Child(name = "anchor", type = {CodeType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="start | end", formalDefinition="An optional indicator for how the relationship is anchored to the related action. For example \"before the start\" or \"before the end\" of the related action." ) + protected Enumeration anchor; + + private static final long serialVersionUID = 451097227L; + + /** + * Constructor + */ + public ActionDefinitionRelatedActionComponent() { + super(); + } + + /** + * Constructor + */ + public ActionDefinitionRelatedActionComponent(Identifier actionIdentifier, Enumeration relationship) { + super(); + this.actionIdentifier = actionIdentifier; + this.relationship = relationship; + } + + /** + * @return {@link #actionIdentifier} (The unique identifier of the related action.) + */ + public Identifier getActionIdentifier() { + if (this.actionIdentifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ActionDefinitionRelatedActionComponent.actionIdentifier"); + else if (Configuration.doAutoCreate()) + this.actionIdentifier = new Identifier(); // cc + return this.actionIdentifier; + } + + public boolean hasActionIdentifier() { + return this.actionIdentifier != null && !this.actionIdentifier.isEmpty(); + } + + /** + * @param value {@link #actionIdentifier} (The unique identifier of the related action.) + */ + public ActionDefinitionRelatedActionComponent setActionIdentifier(Identifier value) { + this.actionIdentifier = value; + return this; + } + + /** + * @return {@link #relationship} (The relationship of this action to the related action.). This is the underlying object with id, value and extensions. The accessor "getRelationship" gives direct access to the value + */ + public Enumeration getRelationshipElement() { + if (this.relationship == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ActionDefinitionRelatedActionComponent.relationship"); + else if (Configuration.doAutoCreate()) + this.relationship = new Enumeration(new ActionRelationshipTypeEnumFactory()); // bb + return this.relationship; + } + + public boolean hasRelationshipElement() { + return this.relationship != null && !this.relationship.isEmpty(); + } + + public boolean hasRelationship() { + return this.relationship != null && !this.relationship.isEmpty(); + } + + /** + * @param value {@link #relationship} (The relationship of this action to the related action.). This is the underlying object with id, value and extensions. The accessor "getRelationship" gives direct access to the value + */ + public ActionDefinitionRelatedActionComponent setRelationshipElement(Enumeration value) { + this.relationship = value; + return this; + } + + /** + * @return The relationship of this action to the related action. + */ + public ActionRelationshipType getRelationship() { + return this.relationship == null ? null : this.relationship.getValue(); + } + + /** + * @param value The relationship of this action to the related action. + */ + public ActionDefinitionRelatedActionComponent setRelationship(ActionRelationshipType value) { + if (this.relationship == null) + this.relationship = new Enumeration(new ActionRelationshipTypeEnumFactory()); + this.relationship.setValue(value); + return this; + } + + /** + * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) + */ + public Type getOffset() { + return this.offset; + } + + /** + * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) + */ + public Duration getOffsetDuration() throws FHIRException { + if (!(this.offset instanceof Duration)) + throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.offset.getClass().getName()+" was encountered"); + return (Duration) this.offset; + } + + public boolean hasOffsetDuration() { + return this.offset instanceof Duration; + } + + /** + * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) + */ + public Range getOffsetRange() throws FHIRException { + if (!(this.offset instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.offset.getClass().getName()+" was encountered"); + return (Range) this.offset; + } + + public boolean hasOffsetRange() { + return this.offset instanceof Range; + } + + public boolean hasOffset() { + return this.offset != null && !this.offset.isEmpty(); + } + + /** + * @param value {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) + */ + public ActionDefinitionRelatedActionComponent setOffset(Type value) { + this.offset = value; + return this; + } + + /** + * @return {@link #anchor} (An optional indicator for how the relationship is anchored to the related action. For example "before the start" or "before the end" of the related action.). This is the underlying object with id, value and extensions. The accessor "getAnchor" gives direct access to the value + */ + public Enumeration getAnchorElement() { + if (this.anchor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ActionDefinitionRelatedActionComponent.anchor"); + else if (Configuration.doAutoCreate()) + this.anchor = new Enumeration(new ActionRelationshipAnchorEnumFactory()); // bb + return this.anchor; + } + + public boolean hasAnchorElement() { + return this.anchor != null && !this.anchor.isEmpty(); + } + + public boolean hasAnchor() { + return this.anchor != null && !this.anchor.isEmpty(); + } + + /** + * @param value {@link #anchor} (An optional indicator for how the relationship is anchored to the related action. For example "before the start" or "before the end" of the related action.). This is the underlying object with id, value and extensions. The accessor "getAnchor" gives direct access to the value + */ + public ActionDefinitionRelatedActionComponent setAnchorElement(Enumeration value) { + this.anchor = value; + return this; + } + + /** + * @return An optional indicator for how the relationship is anchored to the related action. For example "before the start" or "before the end" of the related action. + */ + public ActionRelationshipAnchor getAnchor() { + return this.anchor == null ? null : this.anchor.getValue(); + } + + /** + * @param value An optional indicator for how the relationship is anchored to the related action. For example "before the start" or "before the end" of the related action. + */ + public ActionDefinitionRelatedActionComponent setAnchor(ActionRelationshipAnchor value) { + if (value == null) + this.anchor = null; + else { + if (this.anchor == null) + this.anchor = new Enumeration(new ActionRelationshipAnchorEnumFactory()); + this.anchor.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("actionIdentifier", "Identifier", "The unique identifier of the related action.", 0, java.lang.Integer.MAX_VALUE, actionIdentifier)); + childrenList.add(new Property("relationship", "code", "The relationship of this action to the related action.", 0, java.lang.Integer.MAX_VALUE, relationship)); + childrenList.add(new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, java.lang.Integer.MAX_VALUE, offset)); + childrenList.add(new Property("anchor", "code", "An optional indicator for how the relationship is anchored to the related action. For example \"before the start\" or \"before the end\" of the related action.", 0, java.lang.Integer.MAX_VALUE, anchor)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("actionIdentifier")) + this.actionIdentifier = castToIdentifier(value); // Identifier + else if (name.equals("relationship")) + this.relationship = new ActionRelationshipTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("offset[x]")) + this.offset = (Type) value; // Type + else if (name.equals("anchor")) + this.anchor = new ActionRelationshipAnchorEnumFactory().fromType(value); // Enumeration + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("actionIdentifier")) { + this.actionIdentifier = new Identifier(); + return this.actionIdentifier; + } + else if (name.equals("relationship")) { + throw new FHIRException("Cannot call addChild on a primitive type ActionDefinition.relationship"); + } + else if (name.equals("offsetDuration")) { + this.offset = new Duration(); + return this.offset; + } + else if (name.equals("offsetRange")) { + this.offset = new Range(); + return this.offset; + } + else if (name.equals("anchor")) { + throw new FHIRException("Cannot call addChild on a primitive type ActionDefinition.anchor"); + } + else + return super.addChild(name); + } + + public ActionDefinitionRelatedActionComponent copy() { + ActionDefinitionRelatedActionComponent dst = new ActionDefinitionRelatedActionComponent(); + copyValues(dst); + dst.actionIdentifier = actionIdentifier == null ? null : actionIdentifier.copy(); + dst.relationship = relationship == null ? null : relationship.copy(); + dst.offset = offset == null ? null : offset.copy(); + dst.anchor = anchor == null ? null : anchor.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ActionDefinitionRelatedActionComponent)) + return false; + ActionDefinitionRelatedActionComponent o = (ActionDefinitionRelatedActionComponent) other; + return compareDeep(actionIdentifier, o.actionIdentifier, true) && compareDeep(relationship, o.relationship, true) + && compareDeep(offset, o.offset, true) && compareDeep(anchor, o.anchor, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ActionDefinitionRelatedActionComponent)) + return false; + ActionDefinitionRelatedActionComponent o = (ActionDefinitionRelatedActionComponent) other; + return compareValues(relationship, o.relationship, true) && compareValues(anchor, o.anchor, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( actionIdentifier, relationship + , offset, anchor); + } + + public String fhirType() { + return "ActionDefinition.relatedAction"; + + } + + } + + @Block() + public static class ActionDefinitionBehaviorComponent extends Element implements IBaseDatatypeElement { + /** + * The type of the behavior to be described, such as grouping, visual, or selection behaviors. + */ + @Child(name = "type", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The type of behavior (grouping, precheck, selection, cardinality, etc)", formalDefinition="The type of the behavior to be described, such as grouping, visual, or selection behaviors." ) + protected Coding type; + + /** + * The specific behavior. The code used here is determined by the type of behavior being described. For example, the grouping behavior uses the grouping-behavior-type valueset. + */ + @Child(name = "value", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Specific behavior (e.g. required, at-most-one, single, etc)", formalDefinition="The specific behavior. The code used here is determined by the type of behavior being described. For example, the grouping behavior uses the grouping-behavior-type valueset." ) + protected Coding value; + + private static final long serialVersionUID = -1054119695L; + + /** + * Constructor + */ + public ActionDefinitionBehaviorComponent() { + super(); + } + + /** + * Constructor + */ + public ActionDefinitionBehaviorComponent(Coding type, Coding value) { + super(); + this.type = type; + this.value = value; + } + + /** + * @return {@link #type} (The type of the behavior to be described, such as grouping, visual, or selection behaviors.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ActionDefinitionBehaviorComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of the behavior to be described, such as grouping, visual, or selection behaviors.) + */ + public ActionDefinitionBehaviorComponent setType(Coding value) { + this.type = value; + return this; + } + + /** + * @return {@link #value} (The specific behavior. The code used here is determined by the type of behavior being described. For example, the grouping behavior uses the grouping-behavior-type valueset.) + */ + public Coding getValue() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ActionDefinitionBehaviorComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new Coding(); // cc + return this.value; + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The specific behavior. The code used here is determined by the type of behavior being described. For example, the grouping behavior uses the grouping-behavior-type valueset.) + */ + public ActionDefinitionBehaviorComponent setValue(Coding value) { + this.value = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "Coding", "The type of the behavior to be described, such as grouping, visual, or selection behaviors.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("value", "Coding", "The specific behavior. The code used here is determined by the type of behavior being described. For example, the grouping behavior uses the grouping-behavior-type valueset.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCoding(value); // Coding + else if (name.equals("value")) + this.value = castToCoding(value); // Coding + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else if (name.equals("value")) { + this.value = new Coding(); + return this.value; + } + else + return super.addChild(name); + } + + public ActionDefinitionBehaviorComponent copy() { + ActionDefinitionBehaviorComponent dst = new ActionDefinitionBehaviorComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ActionDefinitionBehaviorComponent)) + return false; + ActionDefinitionBehaviorComponent o = (ActionDefinitionBehaviorComponent) other; + return compareDeep(type, o.type, true) && compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ActionDefinitionBehaviorComponent)) + return false; + ActionDefinitionBehaviorComponent o = (ActionDefinitionBehaviorComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, value); + } + + public String fhirType() { + return "ActionDefinition.behavior"; + + } + + } + + @Block() + public static class ActionDefinitionCustomizationComponent extends Element implements IBaseDatatypeElement { + /** + * The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. + */ + @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The path to the element to be set dynamically", formalDefinition="The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression." ) + protected StringType path; + + /** + * An expression specifying the value of the customized element. + */ + @Child(name = "expression", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="An expression that provides the dynamic value for the customization", formalDefinition="An expression specifying the value of the customized element." ) + protected StringType expression; + + private static final long serialVersionUID = -252690483L; + + /** + * Constructor + */ + public ActionDefinitionCustomizationComponent() { + super(); + } + + /** + * Constructor + */ + public ActionDefinitionCustomizationComponent(StringType path, StringType expression) { + super(); + this.path = path; + this.expression = expression; + } + + /** + * @return {@link #path} (The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public StringType getPathElement() { + if (this.path == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ActionDefinitionCustomizationComponent.path"); + else if (Configuration.doAutoCreate()) + this.path = new StringType(); // bb + return this.path; + } + + public boolean hasPathElement() { + return this.path != null && !this.path.isEmpty(); + } + + public boolean hasPath() { + return this.path != null && !this.path.isEmpty(); + } + + /** + * @param value {@link #path} (The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public ActionDefinitionCustomizationComponent setPathElement(StringType value) { + this.path = value; + return this; + } + + /** + * @return The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. + */ + public String getPath() { + return this.path == null ? null : this.path.getValue(); + } + + /** + * @param value The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. + */ + public ActionDefinitionCustomizationComponent setPath(String value) { + if (this.path == null) + this.path = new StringType(); + this.path.setValue(value); + return this; + } + + /** + * @return {@link #expression} (An expression specifying the value of the customized element.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value + */ + public StringType getExpressionElement() { + if (this.expression == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ActionDefinitionCustomizationComponent.expression"); + else if (Configuration.doAutoCreate()) + this.expression = new StringType(); // bb + return this.expression; + } + + public boolean hasExpressionElement() { + return this.expression != null && !this.expression.isEmpty(); + } + + public boolean hasExpression() { + return this.expression != null && !this.expression.isEmpty(); + } + + /** + * @param value {@link #expression} (An expression specifying the value of the customized element.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value + */ + public ActionDefinitionCustomizationComponent setExpressionElement(StringType value) { + this.expression = value; + return this; + } + + /** + * @return An expression specifying the value of the customized element. + */ + public String getExpression() { + return this.expression == null ? null : this.expression.getValue(); + } + + /** + * @param value An expression specifying the value of the customized element. + */ + public ActionDefinitionCustomizationComponent setExpression(String value) { + if (this.expression == null) + this.expression = new StringType(); + this.expression.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("path", "string", "The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.", 0, java.lang.Integer.MAX_VALUE, path)); + childrenList.add(new Property("expression", "string", "An expression specifying the value of the customized element.", 0, java.lang.Integer.MAX_VALUE, expression)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("path")) + this.path = castToString(value); // StringType + else if (name.equals("expression")) + this.expression = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("path")) { + throw new FHIRException("Cannot call addChild on a primitive type ActionDefinition.path"); + } + else if (name.equals("expression")) { + throw new FHIRException("Cannot call addChild on a primitive type ActionDefinition.expression"); + } + else + return super.addChild(name); + } + + public ActionDefinitionCustomizationComponent copy() { + ActionDefinitionCustomizationComponent dst = new ActionDefinitionCustomizationComponent(); + copyValues(dst); + dst.path = path == null ? null : path.copy(); + dst.expression = expression == null ? null : expression.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ActionDefinitionCustomizationComponent)) + return false; + ActionDefinitionCustomizationComponent o = (ActionDefinitionCustomizationComponent) other; + return compareDeep(path, o.path, true) && compareDeep(expression, o.expression, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ActionDefinitionCustomizationComponent)) + return false; + ActionDefinitionCustomizationComponent o = (ActionDefinitionCustomizationComponent) other; + return compareValues(path, o.path, true) && compareValues(expression, o.expression, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( path, expression); + } + + public String fhirType() { + return "ActionDefinition.customization"; + + } + + } + + /** + * A unique identifier for the action. The identifier SHALL be unique within the container in which it appears, and MAY be universally unique. + */ + @Child(name = "actionIdentifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Unique identifier", formalDefinition="A unique identifier for the action. The identifier SHALL be unique within the container in which it appears, and MAY be universally unique." ) + protected Identifier actionIdentifier; + + /** + * A user-visible label for the action. + */ + @Child(name = "label", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="User-visible label for the action (e.g. 1. or A.)", formalDefinition="A user-visible label for the action." ) + protected StringType label; + + /** + * The title of the action displayed to a user. + */ + @Child(name = "title", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="User-visible title", formalDefinition="The title of the action displayed to a user." ) + protected StringType title; + + /** + * A short description of the action used to provide a summary to display to the user. + */ + @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Short description of the action", formalDefinition="A short description of the action used to provide a summary to display to the user." ) + protected StringType description; + + /** + * A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically. + */ + @Child(name = "textEquivalent", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Static text equivalent of the action, used if the dynamic aspects cannot be interpreted by the receiving system", formalDefinition="A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically." ) + protected StringType textEquivalent; + + /** + * The concept represented by this action or its sub-actions. + */ + @Child(name = "concept", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The meaning of the action or its sub-actions", formalDefinition="The concept represented by this action or its sub-actions." ) + protected List concept; + + /** + * The evidence grade and the sources of evidence for this action. + */ + @Child(name = "supportingEvidence", type = {Attachment.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Evidence that supports taking the action", formalDefinition="The evidence grade and the sources of evidence for this action." ) + protected List supportingEvidence; + + /** + * Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources. + */ + @Child(name = "documentation", type = {Attachment.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Supporting documentation for the intended performer of the action", formalDefinition="Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources." ) + protected List documentation; + + /** + * A relationship to another action such as "before" or "30-60 minutes after start of". + */ + @Child(name = "relatedAction", type = {}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Relationship to another action", formalDefinition="A relationship to another action such as \"before\" or \"30-60 minutes after start of\"." ) + protected ActionDefinitionRelatedActionComponent relatedAction; + + /** + * The type of participant in the action. + */ + @Child(name = "participantType", type = {CodeType.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="patient | practitioner | related-person", formalDefinition="The type of participant in the action." ) + protected List> participantType; + + /** + * The type of action to perform (create, update, remove). + */ + @Child(name = "type", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="create | update | remove | fire-event", formalDefinition="The type of action to perform (create, update, remove)." ) + protected Enumeration type; + + /** + * A behavior associated with the action. Behaviors define how the action is to be presented and/or executed within the receiving environment. + */ + @Child(name = "behavior", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Defines behaviors such as selection and grouping", formalDefinition="A behavior associated with the action. Behaviors define how the action is to be presented and/or executed within the receiving environment." ) + protected List behavior; + + /** + * The resource that is the target of the action (e.g. CommunicationRequest). The resource described here defines any aspects of the action that can be specified statically (i.e. are known at the time of definition). + */ + @Child(name = "resource", type = {}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Static portion of the action definition", formalDefinition="The resource that is the target of the action (e.g. CommunicationRequest). The resource described here defines any aspects of the action that can be specified statically (i.e. are known at the time of definition)." ) + protected Reference resource; + + /** + * The actual object that is the target of the reference (The resource that is the target of the action (e.g. CommunicationRequest). The resource described here defines any aspects of the action that can be specified statically (i.e. are known at the time of definition).) + */ + protected Resource resourceTarget; + + /** + * Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result. + */ + @Child(name = "customization", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Dynamic aspects of the definition", formalDefinition="Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result." ) + protected List customization; + + /** + * Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition. + */ + @Child(name = "action", type = {ActionDefinition.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A sub-action", formalDefinition="Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition." ) + protected List action; + + private static final long serialVersionUID = -1659761573L; + + /** + * Constructor + */ + public ActionDefinition() { + super(); + } + + /** + * @return {@link #actionIdentifier} (A unique identifier for the action. The identifier SHALL be unique within the container in which it appears, and MAY be universally unique.) + */ + public Identifier getActionIdentifier() { + if (this.actionIdentifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ActionDefinition.actionIdentifier"); + else if (Configuration.doAutoCreate()) + this.actionIdentifier = new Identifier(); // cc + return this.actionIdentifier; + } + + public boolean hasActionIdentifier() { + return this.actionIdentifier != null && !this.actionIdentifier.isEmpty(); + } + + /** + * @param value {@link #actionIdentifier} (A unique identifier for the action. The identifier SHALL be unique within the container in which it appears, and MAY be universally unique.) + */ + public ActionDefinition setActionIdentifier(Identifier value) { + this.actionIdentifier = value; + return this; + } + + /** + * @return {@link #label} (A user-visible label for the action.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value + */ + public StringType getLabelElement() { + if (this.label == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ActionDefinition.label"); + else if (Configuration.doAutoCreate()) + this.label = new StringType(); // bb + return this.label; + } + + public boolean hasLabelElement() { + return this.label != null && !this.label.isEmpty(); + } + + public boolean hasLabel() { + return this.label != null && !this.label.isEmpty(); + } + + /** + * @param value {@link #label} (A user-visible label for the action.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value + */ + public ActionDefinition setLabelElement(StringType value) { + this.label = value; + return this; + } + + /** + * @return A user-visible label for the action. + */ + public String getLabel() { + return this.label == null ? null : this.label.getValue(); + } + + /** + * @param value A user-visible label for the action. + */ + public ActionDefinition setLabel(String value) { + if (Utilities.noString(value)) + this.label = null; + else { + if (this.label == null) + this.label = new StringType(); + this.label.setValue(value); + } + return this; + } + + /** + * @return {@link #title} (The title of the action displayed to a user.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public StringType getTitleElement() { + if (this.title == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ActionDefinition.title"); + else if (Configuration.doAutoCreate()) + this.title = new StringType(); // bb + return this.title; + } + + public boolean hasTitleElement() { + return this.title != null && !this.title.isEmpty(); + } + + public boolean hasTitle() { + return this.title != null && !this.title.isEmpty(); + } + + /** + * @param value {@link #title} (The title of the action displayed to a user.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public ActionDefinition setTitleElement(StringType value) { + this.title = value; + return this; + } + + /** + * @return The title of the action displayed to a user. + */ + public String getTitle() { + return this.title == null ? null : this.title.getValue(); + } + + /** + * @param value The title of the action displayed to a user. + */ + public ActionDefinition setTitle(String value) { + if (Utilities.noString(value)) + this.title = null; + else { + if (this.title == null) + this.title = new StringType(); + this.title.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A short description of the action used to provide a summary to display to the user.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ActionDefinition.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A short description of the action used to provide a summary to display to the user.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ActionDefinition setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A short description of the action used to provide a summary to display to the user. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A short description of the action used to provide a summary to display to the user. + */ + public ActionDefinition setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #textEquivalent} (A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value + */ + public StringType getTextEquivalentElement() { + if (this.textEquivalent == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ActionDefinition.textEquivalent"); + else if (Configuration.doAutoCreate()) + this.textEquivalent = new StringType(); // bb + return this.textEquivalent; + } + + public boolean hasTextEquivalentElement() { + return this.textEquivalent != null && !this.textEquivalent.isEmpty(); + } + + public boolean hasTextEquivalent() { + return this.textEquivalent != null && !this.textEquivalent.isEmpty(); + } + + /** + * @param value {@link #textEquivalent} (A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value + */ + public ActionDefinition setTextEquivalentElement(StringType value) { + this.textEquivalent = value; + return this; + } + + /** + * @return A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically. + */ + public String getTextEquivalent() { + return this.textEquivalent == null ? null : this.textEquivalent.getValue(); + } + + /** + * @param value A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically. + */ + public ActionDefinition setTextEquivalent(String value) { + if (Utilities.noString(value)) + this.textEquivalent = null; + else { + if (this.textEquivalent == null) + this.textEquivalent = new StringType(); + this.textEquivalent.setValue(value); + } + return this; + } + + /** + * @return {@link #concept} (The concept represented by this action or its sub-actions.) + */ + public List getConcept() { + if (this.concept == null) + this.concept = new ArrayList(); + return this.concept; + } + + public boolean hasConcept() { + if (this.concept == null) + return false; + for (CodeableConcept item : this.concept) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #concept} (The concept represented by this action or its sub-actions.) + */ + // syntactic sugar + public CodeableConcept addConcept() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return t; + } + + // syntactic sugar + public ActionDefinition addConcept(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return this; + } + + /** + * @return {@link #supportingEvidence} (The evidence grade and the sources of evidence for this action.) + */ + public List getSupportingEvidence() { + if (this.supportingEvidence == null) + this.supportingEvidence = new ArrayList(); + return this.supportingEvidence; + } + + public boolean hasSupportingEvidence() { + if (this.supportingEvidence == null) + return false; + for (Attachment item : this.supportingEvidence) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #supportingEvidence} (The evidence grade and the sources of evidence for this action.) + */ + // syntactic sugar + public Attachment addSupportingEvidence() { //3 + Attachment t = new Attachment(); + if (this.supportingEvidence == null) + this.supportingEvidence = new ArrayList(); + this.supportingEvidence.add(t); + return t; + } + + // syntactic sugar + public ActionDefinition addSupportingEvidence(Attachment t) { //3 + if (t == null) + return this; + if (this.supportingEvidence == null) + this.supportingEvidence = new ArrayList(); + this.supportingEvidence.add(t); + return this; + } + + /** + * @return {@link #documentation} (Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.) + */ + public List getDocumentation() { + if (this.documentation == null) + this.documentation = new ArrayList(); + return this.documentation; + } + + public boolean hasDocumentation() { + if (this.documentation == null) + return false; + for (Attachment item : this.documentation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #documentation} (Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.) + */ + // syntactic sugar + public Attachment addDocumentation() { //3 + Attachment t = new Attachment(); + if (this.documentation == null) + this.documentation = new ArrayList(); + this.documentation.add(t); + return t; + } + + // syntactic sugar + public ActionDefinition addDocumentation(Attachment t) { //3 + if (t == null) + return this; + if (this.documentation == null) + this.documentation = new ArrayList(); + this.documentation.add(t); + return this; + } + + /** + * @return {@link #relatedAction} (A relationship to another action such as "before" or "30-60 minutes after start of".) + */ + public ActionDefinitionRelatedActionComponent getRelatedAction() { + if (this.relatedAction == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ActionDefinition.relatedAction"); + else if (Configuration.doAutoCreate()) + this.relatedAction = new ActionDefinitionRelatedActionComponent(); // cc + return this.relatedAction; + } + + public boolean hasRelatedAction() { + return this.relatedAction != null && !this.relatedAction.isEmpty(); + } + + /** + * @param value {@link #relatedAction} (A relationship to another action such as "before" or "30-60 minutes after start of".) + */ + public ActionDefinition setRelatedAction(ActionDefinitionRelatedActionComponent value) { + this.relatedAction = value; + return this; + } + + /** + * @return {@link #participantType} (The type of participant in the action.) + */ + public List> getParticipantType() { + if (this.participantType == null) + this.participantType = new ArrayList>(); + return this.participantType; + } + + public boolean hasParticipantType() { + if (this.participantType == null) + return false; + for (Enumeration item : this.participantType) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #participantType} (The type of participant in the action.) + */ + // syntactic sugar + public Enumeration addParticipantTypeElement() {//2 + Enumeration t = new Enumeration(new ParticipantTypeEnumFactory()); + if (this.participantType == null) + this.participantType = new ArrayList>(); + this.participantType.add(t); + return t; + } + + /** + * @param value {@link #participantType} (The type of participant in the action.) + */ + public ActionDefinition addParticipantType(ParticipantType value) { //1 + Enumeration t = new Enumeration(new ParticipantTypeEnumFactory()); + t.setValue(value); + if (this.participantType == null) + this.participantType = new ArrayList>(); + this.participantType.add(t); + return this; + } + + /** + * @param value {@link #participantType} (The type of participant in the action.) + */ + public boolean hasParticipantType(ParticipantType value) { + if (this.participantType == null) + return false; + for (Enumeration v : this.participantType) + if (v.equals(value)) // code + return true; + return false; + } + + /** + * @return {@link #type} (The type of action to perform (create, update, remove).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ActionDefinition.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new ActionTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of action to perform (create, update, remove).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public ActionDefinition setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return The type of action to perform (create, update, remove). + */ + public ActionType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of action to perform (create, update, remove). + */ + public ActionDefinition setType(ActionType value) { + if (value == null) + this.type = null; + else { + if (this.type == null) + this.type = new Enumeration(new ActionTypeEnumFactory()); + this.type.setValue(value); + } + return this; + } + + /** + * @return {@link #behavior} (A behavior associated with the action. Behaviors define how the action is to be presented and/or executed within the receiving environment.) + */ + public List getBehavior() { + if (this.behavior == null) + this.behavior = new ArrayList(); + return this.behavior; + } + + public boolean hasBehavior() { + if (this.behavior == null) + return false; + for (ActionDefinitionBehaviorComponent item : this.behavior) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #behavior} (A behavior associated with the action. Behaviors define how the action is to be presented and/or executed within the receiving environment.) + */ + // syntactic sugar + public ActionDefinitionBehaviorComponent addBehavior() { //3 + ActionDefinitionBehaviorComponent t = new ActionDefinitionBehaviorComponent(); + if (this.behavior == null) + this.behavior = new ArrayList(); + this.behavior.add(t); + return t; + } + + // syntactic sugar + public ActionDefinition addBehavior(ActionDefinitionBehaviorComponent t) { //3 + if (t == null) + return this; + if (this.behavior == null) + this.behavior = new ArrayList(); + this.behavior.add(t); + return this; + } + + /** + * @return {@link #resource} (The resource that is the target of the action (e.g. CommunicationRequest). The resource described here defines any aspects of the action that can be specified statically (i.e. are known at the time of definition).) + */ + public Reference getResource() { + if (this.resource == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ActionDefinition.resource"); + else if (Configuration.doAutoCreate()) + this.resource = new Reference(); // cc + return this.resource; + } + + public boolean hasResource() { + return this.resource != null && !this.resource.isEmpty(); + } + + /** + * @param value {@link #resource} (The resource that is the target of the action (e.g. CommunicationRequest). The resource described here defines any aspects of the action that can be specified statically (i.e. are known at the time of definition).) + */ + public ActionDefinition setResource(Reference value) { + this.resource = value; + return this; + } + + /** + * @return {@link #resource} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The resource that is the target of the action (e.g. CommunicationRequest). The resource described here defines any aspects of the action that can be specified statically (i.e. are known at the time of definition).) + */ + public Resource getResourceTarget() { + return this.resourceTarget; + } + + /** + * @param value {@link #resource} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The resource that is the target of the action (e.g. CommunicationRequest). The resource described here defines any aspects of the action that can be specified statically (i.e. are known at the time of definition).) + */ + public ActionDefinition setResourceTarget(Resource value) { + this.resourceTarget = value; + return this; + } + + /** + * @return {@link #customization} (Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.) + */ + public List getCustomization() { + if (this.customization == null) + this.customization = new ArrayList(); + return this.customization; + } + + public boolean hasCustomization() { + if (this.customization == null) + return false; + for (ActionDefinitionCustomizationComponent item : this.customization) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #customization} (Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.) + */ + // syntactic sugar + public ActionDefinitionCustomizationComponent addCustomization() { //3 + ActionDefinitionCustomizationComponent t = new ActionDefinitionCustomizationComponent(); + if (this.customization == null) + this.customization = new ArrayList(); + this.customization.add(t); + return t; + } + + // syntactic sugar + public ActionDefinition addCustomization(ActionDefinitionCustomizationComponent t) { //3 + if (t == null) + return this; + if (this.customization == null) + this.customization = new ArrayList(); + this.customization.add(t); + return this; + } + + /** + * @return {@link #action} (Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition.) + */ + public List getAction() { + if (this.action == null) + this.action = new ArrayList(); + return this.action; + } + + public boolean hasAction() { + if (this.action == null) + return false; + for (ActionDefinition item : this.action) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #action} (Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition.) + */ + // syntactic sugar + public ActionDefinition addAction() { //3 + ActionDefinition t = new ActionDefinition(); + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return t; + } + + // syntactic sugar + public ActionDefinition addAction(ActionDefinition t) { //3 + if (t == null) + return this; + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("actionIdentifier", "Identifier", "A unique identifier for the action. The identifier SHALL be unique within the container in which it appears, and MAY be universally unique.", 0, java.lang.Integer.MAX_VALUE, actionIdentifier)); + childrenList.add(new Property("label", "string", "A user-visible label for the action.", 0, java.lang.Integer.MAX_VALUE, label)); + childrenList.add(new Property("title", "string", "The title of the action displayed to a user.", 0, java.lang.Integer.MAX_VALUE, title)); + childrenList.add(new Property("description", "string", "A short description of the action used to provide a summary to display to the user.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("textEquivalent", "string", "A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.", 0, java.lang.Integer.MAX_VALUE, textEquivalent)); + childrenList.add(new Property("concept", "CodeableConcept", "The concept represented by this action or its sub-actions.", 0, java.lang.Integer.MAX_VALUE, concept)); + childrenList.add(new Property("supportingEvidence", "Attachment", "The evidence grade and the sources of evidence for this action.", 0, java.lang.Integer.MAX_VALUE, supportingEvidence)); + childrenList.add(new Property("documentation", "Attachment", "Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.", 0, java.lang.Integer.MAX_VALUE, documentation)); + childrenList.add(new Property("relatedAction", "", "A relationship to another action such as \"before\" or \"30-60 minutes after start of\".", 0, java.lang.Integer.MAX_VALUE, relatedAction)); + childrenList.add(new Property("participantType", "code", "The type of participant in the action.", 0, java.lang.Integer.MAX_VALUE, participantType)); + childrenList.add(new Property("type", "code", "The type of action to perform (create, update, remove).", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("behavior", "", "A behavior associated with the action. Behaviors define how the action is to be presented and/or executed within the receiving environment.", 0, java.lang.Integer.MAX_VALUE, behavior)); + childrenList.add(new Property("resource", "Reference(Any)", "The resource that is the target of the action (e.g. CommunicationRequest). The resource described here defines any aspects of the action that can be specified statically (i.e. are known at the time of definition).", 0, java.lang.Integer.MAX_VALUE, resource)); + childrenList.add(new Property("customization", "", "Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.", 0, java.lang.Integer.MAX_VALUE, customization)); + childrenList.add(new Property("action", "ActionDefinition", "Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition.", 0, java.lang.Integer.MAX_VALUE, action)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("actionIdentifier")) + this.actionIdentifier = castToIdentifier(value); // Identifier + else if (name.equals("label")) + this.label = castToString(value); // StringType + else if (name.equals("title")) + this.title = castToString(value); // StringType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("textEquivalent")) + this.textEquivalent = castToString(value); // StringType + else if (name.equals("concept")) + this.getConcept().add(castToCodeableConcept(value)); + else if (name.equals("supportingEvidence")) + this.getSupportingEvidence().add(castToAttachment(value)); + else if (name.equals("documentation")) + this.getDocumentation().add(castToAttachment(value)); + else if (name.equals("relatedAction")) + this.relatedAction = (ActionDefinitionRelatedActionComponent) value; // ActionDefinitionRelatedActionComponent + else if (name.equals("participantType")) + this.getParticipantType().add(new ParticipantTypeEnumFactory().fromType(value)); + else if (name.equals("type")) + this.type = new ActionTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("behavior")) + this.getBehavior().add((ActionDefinitionBehaviorComponent) value); + else if (name.equals("resource")) + this.resource = castToReference(value); // Reference + else if (name.equals("customization")) + this.getCustomization().add((ActionDefinitionCustomizationComponent) value); + else if (name.equals("action")) + this.getAction().add(castToActionDefinition(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("actionIdentifier")) { + this.actionIdentifier = new Identifier(); + return this.actionIdentifier; + } + else if (name.equals("label")) { + throw new FHIRException("Cannot call addChild on a primitive type ActionDefinition.label"); + } + else if (name.equals("title")) { + throw new FHIRException("Cannot call addChild on a primitive type ActionDefinition.title"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ActionDefinition.description"); + } + else if (name.equals("textEquivalent")) { + throw new FHIRException("Cannot call addChild on a primitive type ActionDefinition.textEquivalent"); + } + else if (name.equals("concept")) { + return addConcept(); + } + else if (name.equals("supportingEvidence")) { + return addSupportingEvidence(); + } + else if (name.equals("documentation")) { + return addDocumentation(); + } + else if (name.equals("relatedAction")) { + this.relatedAction = new ActionDefinitionRelatedActionComponent(); + return this.relatedAction; + } + else if (name.equals("participantType")) { + throw new FHIRException("Cannot call addChild on a primitive type ActionDefinition.participantType"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type ActionDefinition.type"); + } + else if (name.equals("behavior")) { + return addBehavior(); + } + else if (name.equals("resource")) { + this.resource = new Reference(); + return this.resource; + } + else if (name.equals("customization")) { + return addCustomization(); + } + else if (name.equals("action")) { + return addAction(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ActionDefinition"; + + } + + public ActionDefinition copy() { + ActionDefinition dst = new ActionDefinition(); + copyValues(dst); + dst.actionIdentifier = actionIdentifier == null ? null : actionIdentifier.copy(); + dst.label = label == null ? null : label.copy(); + dst.title = title == null ? null : title.copy(); + dst.description = description == null ? null : description.copy(); + dst.textEquivalent = textEquivalent == null ? null : textEquivalent.copy(); + if (concept != null) { + dst.concept = new ArrayList(); + for (CodeableConcept i : concept) + dst.concept.add(i.copy()); + }; + if (supportingEvidence != null) { + dst.supportingEvidence = new ArrayList(); + for (Attachment i : supportingEvidence) + dst.supportingEvidence.add(i.copy()); + }; + if (documentation != null) { + dst.documentation = new ArrayList(); + for (Attachment i : documentation) + dst.documentation.add(i.copy()); + }; + dst.relatedAction = relatedAction == null ? null : relatedAction.copy(); + if (participantType != null) { + dst.participantType = new ArrayList>(); + for (Enumeration i : participantType) + dst.participantType.add(i.copy()); + }; + dst.type = type == null ? null : type.copy(); + if (behavior != null) { + dst.behavior = new ArrayList(); + for (ActionDefinitionBehaviorComponent i : behavior) + dst.behavior.add(i.copy()); + }; + dst.resource = resource == null ? null : resource.copy(); + if (customization != null) { + dst.customization = new ArrayList(); + for (ActionDefinitionCustomizationComponent i : customization) + dst.customization.add(i.copy()); + }; + if (action != null) { + dst.action = new ArrayList(); + for (ActionDefinition i : action) + dst.action.add(i.copy()); + }; + return dst; + } + + protected ActionDefinition typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ActionDefinition)) + return false; + ActionDefinition o = (ActionDefinition) other; + return compareDeep(actionIdentifier, o.actionIdentifier, true) && compareDeep(label, o.label, true) + && compareDeep(title, o.title, true) && compareDeep(description, o.description, true) && compareDeep(textEquivalent, o.textEquivalent, true) + && compareDeep(concept, o.concept, true) && compareDeep(supportingEvidence, o.supportingEvidence, true) + && compareDeep(documentation, o.documentation, true) && compareDeep(relatedAction, o.relatedAction, true) + && compareDeep(participantType, o.participantType, true) && compareDeep(type, o.type, true) && compareDeep(behavior, o.behavior, true) + && compareDeep(resource, o.resource, true) && compareDeep(customization, o.customization, true) + && compareDeep(action, o.action, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ActionDefinition)) + return false; + ActionDefinition o = (ActionDefinition) other; + return compareValues(label, o.label, true) && compareValues(title, o.title, true) && compareValues(description, o.description, true) + && compareValues(textEquivalent, o.textEquivalent, true) && compareValues(participantType, o.participantType, true) + && compareValues(type, o.type, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( actionIdentifier, label, title + , description, textEquivalent, concept, supportingEvidence, documentation, relatedAction + , participantType, type, behavior, resource, customization, action); + } + + +} + diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Address.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Address.java index 9c20a5d555c..7e60e2c4486 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Address.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Address.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -38,11 +38,10 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** - * There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world. + * An address expressed using postal conventions (as opposed to GPS or other location definition formats). This data type may be used to convey addresses for use in delivering mail as well as for visiting locations and which might not be valid for mail delivery. There are a variety of postal address formats defined around the world. */ @DatatypeDef(name="Address") public class Address extends Type implements ICompositeType { @@ -951,10 +950,8 @@ public class Address extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (use == null || use.isEmpty()) && (type == null || type.isEmpty()) - && (text == null || text.isEmpty()) && (line == null || line.isEmpty()) && (city == null || city.isEmpty()) - && (district == null || district.isEmpty()) && (state == null || state.isEmpty()) && (postalCode == null || postalCode.isEmpty()) - && (country == null || country.isEmpty()) && (period == null || period.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( use, type, text, line, city + , district, state, postalCode, country, period); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Age.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Age.java index 6b6f21b2e5b..84c9fe3bbf6 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Age.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Age.java @@ -29,13 +29,12 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. */ @@ -82,9 +81,8 @@ public class Age extends Quantity { } public boolean isEmpty() { - return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty()) - && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value, comparator, unit, system + , code); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/AllergyIntolerance.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/AllergyIntolerance.java index 3159da78763..c56965f4814 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/AllergyIntolerance.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/AllergyIntolerance.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance. */ @@ -215,109 +214,6 @@ public class AllergyIntolerance extends DomainResource { } } - public enum AllergyIntoleranceCriticality { - /** - * The potential clinical impact of a future reaction is estimated as low risk: exposure to substance is unlikely to result in a life threatening or organ system threatening outcome. Future exposure to the Substance is considered a relative contra-indication. - */ - CRITL, - /** - * The potential clinical impact of a future reaction is estimated as high risk: exposure to substance may result in a life threatening or organ system threatening outcome. Future exposure to the Substance may be considered an absolute contra-indication. - */ - CRITH, - /** - * Unable to assess the potential clinical impact with the information available. - */ - CRITU, - /** - * added to help the parsers - */ - NULL; - public static AllergyIntoleranceCriticality fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("CRITL".equals(codeString)) - return CRITL; - if ("CRITH".equals(codeString)) - return CRITH; - if ("CRITU".equals(codeString)) - return CRITU; - throw new FHIRException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case CRITL: return "CRITL"; - case CRITH: return "CRITH"; - case CRITU: return "CRITU"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case CRITL: return "http://hl7.org/fhir/allergy-intolerance-criticality"; - case CRITH: return "http://hl7.org/fhir/allergy-intolerance-criticality"; - case CRITU: return "http://hl7.org/fhir/allergy-intolerance-criticality"; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case CRITL: return "The potential clinical impact of a future reaction is estimated as low risk: exposure to substance is unlikely to result in a life threatening or organ system threatening outcome. Future exposure to the Substance is considered a relative contra-indication."; - case CRITH: return "The potential clinical impact of a future reaction is estimated as high risk: exposure to substance may result in a life threatening or organ system threatening outcome. Future exposure to the Substance may be considered an absolute contra-indication."; - case CRITU: return "Unable to assess the potential clinical impact with the information available."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case CRITL: return "Low Risk"; - case CRITH: return "High Risk"; - case CRITU: return "Unable to determine"; - default: return "?"; - } - } - } - - public static class AllergyIntoleranceCriticalityEnumFactory implements EnumFactory { - public AllergyIntoleranceCriticality fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("CRITL".equals(codeString)) - return AllergyIntoleranceCriticality.CRITL; - if ("CRITH".equals(codeString)) - return AllergyIntoleranceCriticality.CRITH; - if ("CRITU".equals(codeString)) - return AllergyIntoleranceCriticality.CRITU; - throw new IllegalArgumentException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'"); - } - public Enumeration fromType(Base code) throws FHIRException { - if (code == null || code.isEmpty()) - return null; - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return null; - if ("CRITL".equals(codeString)) - return new Enumeration(this, AllergyIntoleranceCriticality.CRITL); - if ("CRITH".equals(codeString)) - return new Enumeration(this, AllergyIntoleranceCriticality.CRITH); - if ("CRITU".equals(codeString)) - return new Enumeration(this, AllergyIntoleranceCriticality.CRITU); - throw new FHIRException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'"); - } - public String toCode(AllergyIntoleranceCriticality code) { - if (code == AllergyIntoleranceCriticality.CRITL) - return "CRITL"; - if (code == AllergyIntoleranceCriticality.CRITH) - return "CRITH"; - if (code == AllergyIntoleranceCriticality.CRITU) - return "CRITU"; - return "?"; - } - public String toSystem(AllergyIntoleranceCriticality code) { - return code.getSystem(); - } - } - public enum AllergyIntoleranceType { /** * A propensity for hypersensitivity reaction(s) to a substance. These reactions are most typically type I hypersensitivity, plus other "allergy-like" reactions, including pseudoallergy. @@ -524,6 +420,109 @@ public class AllergyIntolerance extends DomainResource { } } + public enum AllergyIntoleranceCriticality { + /** + * Worst case result of a future exposure is not assessed to be life-threatening or having high potential for organ system failure. + */ + LOW, + /** + * Worst case result of a future exposure is assessed to be life-threatening or having high potential for organ system failure. + */ + HIGH, + /** + * Unable to assess the worst case result of a future exposure. + */ + UNABLETOASSESS, + /** + * added to help the parsers + */ + NULL; + public static AllergyIntoleranceCriticality fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("low".equals(codeString)) + return LOW; + if ("high".equals(codeString)) + return HIGH; + if ("unable-to-assess".equals(codeString)) + return UNABLETOASSESS; + throw new FHIRException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case LOW: return "low"; + case HIGH: return "high"; + case UNABLETOASSESS: return "unable-to-assess"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case LOW: return "http://hl7.org/fhir/allergy-intolerance-criticality"; + case HIGH: return "http://hl7.org/fhir/allergy-intolerance-criticality"; + case UNABLETOASSESS: return "http://hl7.org/fhir/allergy-intolerance-criticality"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case LOW: return "Worst case result of a future exposure is not assessed to be life-threatening or having high potential for organ system failure."; + case HIGH: return "Worst case result of a future exposure is assessed to be life-threatening or having high potential for organ system failure."; + case UNABLETOASSESS: return "Unable to assess the worst case result of a future exposure."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case LOW: return "Low Risk"; + case HIGH: return "High Risk"; + case UNABLETOASSESS: return "Unable to Assess Risk"; + default: return "?"; + } + } + } + + public static class AllergyIntoleranceCriticalityEnumFactory implements EnumFactory { + public AllergyIntoleranceCriticality fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("low".equals(codeString)) + return AllergyIntoleranceCriticality.LOW; + if ("high".equals(codeString)) + return AllergyIntoleranceCriticality.HIGH; + if ("unable-to-assess".equals(codeString)) + return AllergyIntoleranceCriticality.UNABLETOASSESS; + throw new IllegalArgumentException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("low".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceCriticality.LOW); + if ("high".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceCriticality.HIGH); + if ("unable-to-assess".equals(codeString)) + return new Enumeration(this, AllergyIntoleranceCriticality.UNABLETOASSESS); + throw new FHIRException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'"); + } + public String toCode(AllergyIntoleranceCriticality code) { + if (code == AllergyIntoleranceCriticality.LOW) + return "low"; + if (code == AllergyIntoleranceCriticality.HIGH) + return "high"; + if (code == AllergyIntoleranceCriticality.UNABLETOASSESS) + return "unable-to-assess"; + return "?"; + } + public String toSystem(AllergyIntoleranceCriticality code) { + return code.getSystem(); + } + } + public enum AllergyIntoleranceCertainty { /** * There is a low level of clinical certainty that the reaction was caused by the identified Substance. @@ -784,11 +783,11 @@ public class AllergyIntolerance extends DomainResource { /** * Additional text about the adverse reaction event not captured in other fields. */ - @Child(name = "note", type = {Annotation.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Child(name = "note", type = {Annotation.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Text about event not captured in other fields", formalDefinition="Additional text about the adverse reaction event not captured in other fields." ) - protected Annotation note; + protected List note; - private static final long serialVersionUID = -765664367L; + private static final long serialVersionUID = -31700461L; /** * Constructor @@ -1084,24 +1083,40 @@ public class AllergyIntolerance extends DomainResource { /** * @return {@link #note} (Additional text about the adverse reaction event not captured in other fields.) */ - public Annotation getNote() { + public List getNote() { if (this.note == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AllergyIntoleranceReactionComponent.note"); - else if (Configuration.doAutoCreate()) - this.note = new Annotation(); // cc + this.note = new ArrayList(); return this.note; } public boolean hasNote() { - return this.note != null && !this.note.isEmpty(); + if (this.note == null) + return false; + for (Annotation item : this.note) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #note} (Additional text about the adverse reaction event not captured in other fields.) + * @return {@link #note} (Additional text about the adverse reaction event not captured in other fields.) */ - public AllergyIntoleranceReactionComponent setNote(Annotation value) { - this.note = value; + // syntactic sugar + public Annotation addNote() { //3 + Annotation t = new Annotation(); + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return t; + } + + // syntactic sugar + public AllergyIntoleranceReactionComponent addNote(Annotation t) { //3 + if (t == null) + return this; + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); return this; } @@ -1134,7 +1149,7 @@ public class AllergyIntolerance extends DomainResource { else if (name.equals("exposureRoute")) this.exposureRoute = castToCodeableConcept(value); // CodeableConcept else if (name.equals("note")) - this.note = castToAnnotation(value); // Annotation + this.getNote().add(castToAnnotation(value)); else super.setProperty(name, value); } @@ -1165,8 +1180,7 @@ public class AllergyIntolerance extends DomainResource { return this.exposureRoute; } else if (name.equals("note")) { - this.note = new Annotation(); - return this.note; + return addNote(); } else return super.addChild(name); @@ -1186,7 +1200,11 @@ public class AllergyIntolerance extends DomainResource { dst.onset = onset == null ? null : onset.copy(); dst.severity = severity == null ? null : severity.copy(); dst.exposureRoute = exposureRoute == null ? null : exposureRoute.copy(); - dst.note = note == null ? null : note.copy(); + if (note != null) { + dst.note = new ArrayList(); + for (Annotation i : note) + dst.note.add(i.copy()); + }; return dst; } @@ -1214,10 +1232,8 @@ public class AllergyIntolerance extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (substance == null || substance.isEmpty()) && (certainty == null || certainty.isEmpty()) - && (manifestation == null || manifestation.isEmpty()) && (description == null || description.isEmpty()) - && (onset == null || onset.isEmpty()) && (severity == null || severity.isEmpty()) && (exposureRoute == null || exposureRoute.isEmpty()) - && (note == null || note.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( substance, certainty, manifestation + , description, onset, severity, exposureRoute, note); } public String fhirType() { @@ -1235,35 +1251,44 @@ public class AllergyIntolerance extends DomainResource { protected List identifier; /** - * Record of the date and/or time of the onset of the Allergy or Intolerance. + * Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance. */ - @Child(name = "onset", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Date(/time) when manifestations showed", formalDefinition="Record of the date and/or time of the onset of the Allergy or Intolerance." ) - protected DateTimeType onset; + @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="active | unconfirmed | confirmed | inactive | resolved | refuted | entered-in-error", formalDefinition="Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance." ) + protected Enumeration status; /** - * Date when the sensitivity was recorded. + * Identification of the underlying physiological mechanism for the reaction risk. */ - @Child(name = "recordedDate", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="When recorded", formalDefinition="Date when the sensitivity was recorded." ) - protected DateTimeType recordedDate; + @Child(name = "type", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="allergy | intolerance - Underlying mechanism (if known)", formalDefinition="Identification of the underlying physiological mechanism for the reaction risk." ) + protected Enumeration type; /** - * Individual who recorded the record and takes responsibility for its conten. + * Category of the identified Substance. */ - @Child(name = "recorder", type = {Practitioner.class, Patient.class}, order=3, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Who recorded the sensitivity", formalDefinition="Individual who recorded the record and takes responsibility for its conten." ) - protected Reference recorder; + @Child(name = "category", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="food | medication | environment | other - Category of Substance", formalDefinition="Category of the identified Substance." ) + protected Enumeration category; /** - * The actual object that is the target of the reference (Individual who recorded the record and takes responsibility for its conten.) + * Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance. */ - protected Resource recorderTarget; + @Child(name = "criticality", type = {CodeType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="low | high | unable-to-assess", formalDefinition="Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance." ) + protected Enumeration criticality; + + /** + * Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk. + */ + @Child(name = "substance", type = {CodeableConcept.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Substance, (or class) considered to be responsible for risk", formalDefinition="Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk." ) + protected CodeableConcept substance; /** * The patient who has the allergy or intolerance. */ - @Child(name = "patient", type = {Patient.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Child(name = "patient", type = {Patient.class}, order=6, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Who the sensitivity is for", formalDefinition="The patient who has the allergy or intolerance." ) protected Reference patient; @@ -1272,10 +1297,29 @@ public class AllergyIntolerance extends DomainResource { */ protected Patient patientTarget; + /** + * Date when the sensitivity was recorded. + */ + @Child(name = "recordedDate", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When recorded", formalDefinition="Date when the sensitivity was recorded." ) + protected DateTimeType recordedDate; + + /** + * Individual who recorded the record and takes responsibility for its content. + */ + @Child(name = "recorder", type = {Practitioner.class, Patient.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who recorded the sensitivity", formalDefinition="Individual who recorded the record and takes responsibility for its content." ) + protected Reference recorder; + + /** + * The actual object that is the target of the reference (Individual who recorded the record and takes responsibility for its content.) + */ + protected Resource recorderTarget; + /** * The source of the information about the allergy that is recorded. */ - @Child(name = "reporter", type = {Patient.class, RelatedPerson.class, Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "reporter", type = {Patient.class, RelatedPerson.class, Practitioner.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Source of the information about the allergy", formalDefinition="The source of the information about the allergy that is recorded." ) protected Reference reporter; @@ -1285,39 +1329,11 @@ public class AllergyIntolerance extends DomainResource { protected Resource reporterTarget; /** - * Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk. + * Record of the date and/or time of the onset of the Allergy or Intolerance. */ - @Child(name = "substance", type = {CodeableConcept.class}, order=6, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Substance, (or class) considered to be responsible for risk", formalDefinition="Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk." ) - protected CodeableConcept substance; - - /** - * Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance. - */ - @Child(name = "status", type = {CodeType.class}, order=7, min=0, max=1, modifier=true, summary=true) - @Description(shortDefinition="active | unconfirmed | confirmed | inactive | resolved | refuted | entered-in-error", formalDefinition="Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance." ) - protected Enumeration status; - - /** - * Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance. - */ - @Child(name = "criticality", type = {CodeType.class}, order=8, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="CRITL | CRITH | CRITU", formalDefinition="Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance." ) - protected Enumeration criticality; - - /** - * Identification of the underlying physiological mechanism for the reaction risk. - */ - @Child(name = "type", type = {CodeType.class}, order=9, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="allergy | intolerance - Underlying mechanism (if known)", formalDefinition="Identification of the underlying physiological mechanism for the reaction risk." ) - protected Enumeration type; - - /** - * Category of the identified Substance. - */ - @Child(name = "category", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="food | medication | environment | other - Category of Substance", formalDefinition="Category of the identified Substance." ) - protected Enumeration category; + @Child(name = "onset", type = {DateTimeType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date(/time) when manifestations showed", formalDefinition="Record of the date and/or time of the onset of the Allergy or Intolerance." ) + protected DateTimeType onset; /** * Represents the date and/or time of the last known occurrence of a reaction event. @@ -1329,9 +1345,9 @@ public class AllergyIntolerance extends DomainResource { /** * Additional narrative about the propensity for the Adverse Reaction, not captured in other fields. */ - @Child(name = "note", type = {Annotation.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Child(name = "note", type = {Annotation.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Additional text not captured in other fields", formalDefinition="Additional narrative about the propensity for the Adverse Reaction, not captured in other fields." ) - protected Annotation note; + protected List note; /** * Details about each adverse reaction event linked to exposure to the identified Substance. @@ -1340,7 +1356,7 @@ public class AllergyIntolerance extends DomainResource { @Description(shortDefinition="Adverse Reaction Events linked to exposure to substance", formalDefinition="Details about each adverse reaction event linked to exposure to the identified Substance." ) protected List reaction; - private static final long serialVersionUID = -1657522921L; + private static final long serialVersionUID = 278089117L; /** * Constructor @@ -1352,10 +1368,10 @@ public class AllergyIntolerance extends DomainResource { /** * Constructor */ - public AllergyIntolerance(Reference patient, CodeableConcept substance) { + public AllergyIntolerance(CodeableConcept substance, Reference patient) { super(); - this.patient = patient; this.substance = substance; + this.patient = patient; } /** @@ -1398,250 +1414,6 @@ public class AllergyIntolerance extends DomainResource { return this; } - /** - * @return {@link #onset} (Record of the date and/or time of the onset of the Allergy or Intolerance.). This is the underlying object with id, value and extensions. The accessor "getOnset" gives direct access to the value - */ - public DateTimeType getOnsetElement() { - if (this.onset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AllergyIntolerance.onset"); - else if (Configuration.doAutoCreate()) - this.onset = new DateTimeType(); // bb - return this.onset; - } - - public boolean hasOnsetElement() { - return this.onset != null && !this.onset.isEmpty(); - } - - public boolean hasOnset() { - return this.onset != null && !this.onset.isEmpty(); - } - - /** - * @param value {@link #onset} (Record of the date and/or time of the onset of the Allergy or Intolerance.). This is the underlying object with id, value and extensions. The accessor "getOnset" gives direct access to the value - */ - public AllergyIntolerance setOnsetElement(DateTimeType value) { - this.onset = value; - return this; - } - - /** - * @return Record of the date and/or time of the onset of the Allergy or Intolerance. - */ - public Date getOnset() { - return this.onset == null ? null : this.onset.getValue(); - } - - /** - * @param value Record of the date and/or time of the onset of the Allergy or Intolerance. - */ - public AllergyIntolerance setOnset(Date value) { - if (value == null) - this.onset = null; - else { - if (this.onset == null) - this.onset = new DateTimeType(); - this.onset.setValue(value); - } - return this; - } - - /** - * @return {@link #recordedDate} (Date when the sensitivity was recorded.). This is the underlying object with id, value and extensions. The accessor "getRecordedDate" gives direct access to the value - */ - public DateTimeType getRecordedDateElement() { - if (this.recordedDate == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AllergyIntolerance.recordedDate"); - else if (Configuration.doAutoCreate()) - this.recordedDate = new DateTimeType(); // bb - return this.recordedDate; - } - - public boolean hasRecordedDateElement() { - return this.recordedDate != null && !this.recordedDate.isEmpty(); - } - - public boolean hasRecordedDate() { - return this.recordedDate != null && !this.recordedDate.isEmpty(); - } - - /** - * @param value {@link #recordedDate} (Date when the sensitivity was recorded.). This is the underlying object with id, value and extensions. The accessor "getRecordedDate" gives direct access to the value - */ - public AllergyIntolerance setRecordedDateElement(DateTimeType value) { - this.recordedDate = value; - return this; - } - - /** - * @return Date when the sensitivity was recorded. - */ - public Date getRecordedDate() { - return this.recordedDate == null ? null : this.recordedDate.getValue(); - } - - /** - * @param value Date when the sensitivity was recorded. - */ - public AllergyIntolerance setRecordedDate(Date value) { - if (value == null) - this.recordedDate = null; - else { - if (this.recordedDate == null) - this.recordedDate = new DateTimeType(); - this.recordedDate.setValue(value); - } - return this; - } - - /** - * @return {@link #recorder} (Individual who recorded the record and takes responsibility for its conten.) - */ - public Reference getRecorder() { - if (this.recorder == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AllergyIntolerance.recorder"); - else if (Configuration.doAutoCreate()) - this.recorder = new Reference(); // cc - return this.recorder; - } - - public boolean hasRecorder() { - return this.recorder != null && !this.recorder.isEmpty(); - } - - /** - * @param value {@link #recorder} (Individual who recorded the record and takes responsibility for its conten.) - */ - public AllergyIntolerance setRecorder(Reference value) { - this.recorder = value; - return this; - } - - /** - * @return {@link #recorder} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Individual who recorded the record and takes responsibility for its conten.) - */ - public Resource getRecorderTarget() { - return this.recorderTarget; - } - - /** - * @param value {@link #recorder} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Individual who recorded the record and takes responsibility for its conten.) - */ - public AllergyIntolerance setRecorderTarget(Resource value) { - this.recorderTarget = value; - return this; - } - - /** - * @return {@link #patient} (The patient who has the allergy or intolerance.) - */ - public Reference getPatient() { - if (this.patient == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AllergyIntolerance.patient"); - else if (Configuration.doAutoCreate()) - this.patient = new Reference(); // cc - return this.patient; - } - - public boolean hasPatient() { - return this.patient != null && !this.patient.isEmpty(); - } - - /** - * @param value {@link #patient} (The patient who has the allergy or intolerance.) - */ - public AllergyIntolerance setPatient(Reference value) { - this.patient = value; - return this; - } - - /** - * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient who has the allergy or intolerance.) - */ - public Patient getPatientTarget() { - if (this.patientTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AllergyIntolerance.patient"); - else if (Configuration.doAutoCreate()) - this.patientTarget = new Patient(); // aa - return this.patientTarget; - } - - /** - * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient who has the allergy or intolerance.) - */ - public AllergyIntolerance setPatientTarget(Patient value) { - this.patientTarget = value; - return this; - } - - /** - * @return {@link #reporter} (The source of the information about the allergy that is recorded.) - */ - public Reference getReporter() { - if (this.reporter == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AllergyIntolerance.reporter"); - else if (Configuration.doAutoCreate()) - this.reporter = new Reference(); // cc - return this.reporter; - } - - public boolean hasReporter() { - return this.reporter != null && !this.reporter.isEmpty(); - } - - /** - * @param value {@link #reporter} (The source of the information about the allergy that is recorded.) - */ - public AllergyIntolerance setReporter(Reference value) { - this.reporter = value; - return this; - } - - /** - * @return {@link #reporter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The source of the information about the allergy that is recorded.) - */ - public Resource getReporterTarget() { - return this.reporterTarget; - } - - /** - * @param value {@link #reporter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The source of the information about the allergy that is recorded.) - */ - public AllergyIntolerance setReporterTarget(Resource value) { - this.reporterTarget = value; - return this; - } - - /** - * @return {@link #substance} (Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk.) - */ - public CodeableConcept getSubstance() { - if (this.substance == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AllergyIntolerance.substance"); - else if (Configuration.doAutoCreate()) - this.substance = new CodeableConcept(); // cc - return this.substance; - } - - public boolean hasSubstance() { - return this.substance != null && !this.substance.isEmpty(); - } - - /** - * @param value {@link #substance} (Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk.) - */ - public AllergyIntolerance setSubstance(CodeableConcept value) { - this.substance = value; - return this; - } - /** * @return {@link #status} (Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value */ @@ -1691,55 +1463,6 @@ public class AllergyIntolerance extends DomainResource { return this; } - /** - * @return {@link #criticality} (Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.). This is the underlying object with id, value and extensions. The accessor "getCriticality" gives direct access to the value - */ - public Enumeration getCriticalityElement() { - if (this.criticality == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AllergyIntolerance.criticality"); - else if (Configuration.doAutoCreate()) - this.criticality = new Enumeration(new AllergyIntoleranceCriticalityEnumFactory()); // bb - return this.criticality; - } - - public boolean hasCriticalityElement() { - return this.criticality != null && !this.criticality.isEmpty(); - } - - public boolean hasCriticality() { - return this.criticality != null && !this.criticality.isEmpty(); - } - - /** - * @param value {@link #criticality} (Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.). This is the underlying object with id, value and extensions. The accessor "getCriticality" gives direct access to the value - */ - public AllergyIntolerance setCriticalityElement(Enumeration value) { - this.criticality = value; - return this; - } - - /** - * @return Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance. - */ - public AllergyIntoleranceCriticality getCriticality() { - return this.criticality == null ? null : this.criticality.getValue(); - } - - /** - * @param value Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance. - */ - public AllergyIntolerance setCriticality(AllergyIntoleranceCriticality value) { - if (value == null) - this.criticality = null; - else { - if (this.criticality == null) - this.criticality = new Enumeration(new AllergyIntoleranceCriticalityEnumFactory()); - this.criticality.setValue(value); - } - return this; - } - /** * @return {@link #type} (Identification of the underlying physiological mechanism for the reaction risk.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value */ @@ -1838,6 +1561,299 @@ public class AllergyIntolerance extends DomainResource { return this; } + /** + * @return {@link #criticality} (Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.). This is the underlying object with id, value and extensions. The accessor "getCriticality" gives direct access to the value + */ + public Enumeration getCriticalityElement() { + if (this.criticality == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.criticality"); + else if (Configuration.doAutoCreate()) + this.criticality = new Enumeration(new AllergyIntoleranceCriticalityEnumFactory()); // bb + return this.criticality; + } + + public boolean hasCriticalityElement() { + return this.criticality != null && !this.criticality.isEmpty(); + } + + public boolean hasCriticality() { + return this.criticality != null && !this.criticality.isEmpty(); + } + + /** + * @param value {@link #criticality} (Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.). This is the underlying object with id, value and extensions. The accessor "getCriticality" gives direct access to the value + */ + public AllergyIntolerance setCriticalityElement(Enumeration value) { + this.criticality = value; + return this; + } + + /** + * @return Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance. + */ + public AllergyIntoleranceCriticality getCriticality() { + return this.criticality == null ? null : this.criticality.getValue(); + } + + /** + * @param value Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance. + */ + public AllergyIntolerance setCriticality(AllergyIntoleranceCriticality value) { + if (value == null) + this.criticality = null; + else { + if (this.criticality == null) + this.criticality = new Enumeration(new AllergyIntoleranceCriticalityEnumFactory()); + this.criticality.setValue(value); + } + return this; + } + + /** + * @return {@link #substance} (Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk.) + */ + public CodeableConcept getSubstance() { + if (this.substance == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.substance"); + else if (Configuration.doAutoCreate()) + this.substance = new CodeableConcept(); // cc + return this.substance; + } + + public boolean hasSubstance() { + return this.substance != null && !this.substance.isEmpty(); + } + + /** + * @param value {@link #substance} (Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk.) + */ + public AllergyIntolerance setSubstance(CodeableConcept value) { + this.substance = value; + return this; + } + + /** + * @return {@link #patient} (The patient who has the allergy or intolerance.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (The patient who has the allergy or intolerance.) + */ + public AllergyIntolerance setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient who has the allergy or intolerance.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient who has the allergy or intolerance.) + */ + public AllergyIntolerance setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #recordedDate} (Date when the sensitivity was recorded.). This is the underlying object with id, value and extensions. The accessor "getRecordedDate" gives direct access to the value + */ + public DateTimeType getRecordedDateElement() { + if (this.recordedDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.recordedDate"); + else if (Configuration.doAutoCreate()) + this.recordedDate = new DateTimeType(); // bb + return this.recordedDate; + } + + public boolean hasRecordedDateElement() { + return this.recordedDate != null && !this.recordedDate.isEmpty(); + } + + public boolean hasRecordedDate() { + return this.recordedDate != null && !this.recordedDate.isEmpty(); + } + + /** + * @param value {@link #recordedDate} (Date when the sensitivity was recorded.). This is the underlying object with id, value and extensions. The accessor "getRecordedDate" gives direct access to the value + */ + public AllergyIntolerance setRecordedDateElement(DateTimeType value) { + this.recordedDate = value; + return this; + } + + /** + * @return Date when the sensitivity was recorded. + */ + public Date getRecordedDate() { + return this.recordedDate == null ? null : this.recordedDate.getValue(); + } + + /** + * @param value Date when the sensitivity was recorded. + */ + public AllergyIntolerance setRecordedDate(Date value) { + if (value == null) + this.recordedDate = null; + else { + if (this.recordedDate == null) + this.recordedDate = new DateTimeType(); + this.recordedDate.setValue(value); + } + return this; + } + + /** + * @return {@link #recorder} (Individual who recorded the record and takes responsibility for its content.) + */ + public Reference getRecorder() { + if (this.recorder == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.recorder"); + else if (Configuration.doAutoCreate()) + this.recorder = new Reference(); // cc + return this.recorder; + } + + public boolean hasRecorder() { + return this.recorder != null && !this.recorder.isEmpty(); + } + + /** + * @param value {@link #recorder} (Individual who recorded the record and takes responsibility for its content.) + */ + public AllergyIntolerance setRecorder(Reference value) { + this.recorder = value; + return this; + } + + /** + * @return {@link #recorder} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Individual who recorded the record and takes responsibility for its content.) + */ + public Resource getRecorderTarget() { + return this.recorderTarget; + } + + /** + * @param value {@link #recorder} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Individual who recorded the record and takes responsibility for its content.) + */ + public AllergyIntolerance setRecorderTarget(Resource value) { + this.recorderTarget = value; + return this; + } + + /** + * @return {@link #reporter} (The source of the information about the allergy that is recorded.) + */ + public Reference getReporter() { + if (this.reporter == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.reporter"); + else if (Configuration.doAutoCreate()) + this.reporter = new Reference(); // cc + return this.reporter; + } + + public boolean hasReporter() { + return this.reporter != null && !this.reporter.isEmpty(); + } + + /** + * @param value {@link #reporter} (The source of the information about the allergy that is recorded.) + */ + public AllergyIntolerance setReporter(Reference value) { + this.reporter = value; + return this; + } + + /** + * @return {@link #reporter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The source of the information about the allergy that is recorded.) + */ + public Resource getReporterTarget() { + return this.reporterTarget; + } + + /** + * @param value {@link #reporter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The source of the information about the allergy that is recorded.) + */ + public AllergyIntolerance setReporterTarget(Resource value) { + this.reporterTarget = value; + return this; + } + + /** + * @return {@link #onset} (Record of the date and/or time of the onset of the Allergy or Intolerance.). This is the underlying object with id, value and extensions. The accessor "getOnset" gives direct access to the value + */ + public DateTimeType getOnsetElement() { + if (this.onset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AllergyIntolerance.onset"); + else if (Configuration.doAutoCreate()) + this.onset = new DateTimeType(); // bb + return this.onset; + } + + public boolean hasOnsetElement() { + return this.onset != null && !this.onset.isEmpty(); + } + + public boolean hasOnset() { + return this.onset != null && !this.onset.isEmpty(); + } + + /** + * @param value {@link #onset} (Record of the date and/or time of the onset of the Allergy or Intolerance.). This is the underlying object with id, value and extensions. The accessor "getOnset" gives direct access to the value + */ + public AllergyIntolerance setOnsetElement(DateTimeType value) { + this.onset = value; + return this; + } + + /** + * @return Record of the date and/or time of the onset of the Allergy or Intolerance. + */ + public Date getOnset() { + return this.onset == null ? null : this.onset.getValue(); + } + + /** + * @param value Record of the date and/or time of the onset of the Allergy or Intolerance. + */ + public AllergyIntolerance setOnset(Date value) { + if (value == null) + this.onset = null; + else { + if (this.onset == null) + this.onset = new DateTimeType(); + this.onset.setValue(value); + } + return this; + } + /** * @return {@link #lastOccurence} (Represents the date and/or time of the last known occurrence of a reaction event.). This is the underlying object with id, value and extensions. The accessor "getLastOccurence" gives direct access to the value */ @@ -1890,24 +1906,40 @@ public class AllergyIntolerance extends DomainResource { /** * @return {@link #note} (Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.) */ - public Annotation getNote() { + public List getNote() { if (this.note == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AllergyIntolerance.note"); - else if (Configuration.doAutoCreate()) - this.note = new Annotation(); // cc + this.note = new ArrayList(); return this.note; } public boolean hasNote() { - return this.note != null && !this.note.isEmpty(); + if (this.note == null) + return false; + for (Annotation item : this.note) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #note} (Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.) + * @return {@link #note} (Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.) */ - public AllergyIntolerance setNote(Annotation value) { - this.note = value; + // syntactic sugar + public Annotation addNote() { //3 + Annotation t = new Annotation(); + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return t; + } + + // syntactic sugar + public AllergyIntolerance addNote(Annotation t) { //3 + if (t == null) + return this; + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); return this; } @@ -1954,16 +1986,16 @@ public class AllergyIntolerance extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("onset", "dateTime", "Record of the date and/or time of the onset of the Allergy or Intolerance.", 0, java.lang.Integer.MAX_VALUE, onset)); - childrenList.add(new Property("recordedDate", "dateTime", "Date when the sensitivity was recorded.", 0, java.lang.Integer.MAX_VALUE, recordedDate)); - childrenList.add(new Property("recorder", "Reference(Practitioner|Patient)", "Individual who recorded the record and takes responsibility for its conten.", 0, java.lang.Integer.MAX_VALUE, recorder)); - childrenList.add(new Property("patient", "Reference(Patient)", "The patient who has the allergy or intolerance.", 0, java.lang.Integer.MAX_VALUE, patient)); - childrenList.add(new Property("reporter", "Reference(Patient|RelatedPerson|Practitioner)", "The source of the information about the allergy that is recorded.", 0, java.lang.Integer.MAX_VALUE, reporter)); - childrenList.add(new Property("substance", "CodeableConcept", "Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk.", 0, java.lang.Integer.MAX_VALUE, substance)); childrenList.add(new Property("status", "code", "Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance.", 0, java.lang.Integer.MAX_VALUE, status)); - childrenList.add(new Property("criticality", "code", "Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.", 0, java.lang.Integer.MAX_VALUE, criticality)); childrenList.add(new Property("type", "code", "Identification of the underlying physiological mechanism for the reaction risk.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("category", "code", "Category of the identified Substance.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("criticality", "code", "Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.", 0, java.lang.Integer.MAX_VALUE, criticality)); + childrenList.add(new Property("substance", "CodeableConcept", "Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk.", 0, java.lang.Integer.MAX_VALUE, substance)); + childrenList.add(new Property("patient", "Reference(Patient)", "The patient who has the allergy or intolerance.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("recordedDate", "dateTime", "Date when the sensitivity was recorded.", 0, java.lang.Integer.MAX_VALUE, recordedDate)); + childrenList.add(new Property("recorder", "Reference(Practitioner|Patient)", "Individual who recorded the record and takes responsibility for its content.", 0, java.lang.Integer.MAX_VALUE, recorder)); + childrenList.add(new Property("reporter", "Reference(Patient|RelatedPerson|Practitioner)", "The source of the information about the allergy that is recorded.", 0, java.lang.Integer.MAX_VALUE, reporter)); + childrenList.add(new Property("onset", "dateTime", "Record of the date and/or time of the onset of the Allergy or Intolerance.", 0, java.lang.Integer.MAX_VALUE, onset)); childrenList.add(new Property("lastOccurence", "dateTime", "Represents the date and/or time of the last known occurrence of a reaction event.", 0, java.lang.Integer.MAX_VALUE, lastOccurence)); childrenList.add(new Property("note", "Annotation", "Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.", 0, java.lang.Integer.MAX_VALUE, note)); childrenList.add(new Property("reaction", "", "Details about each adverse reaction event linked to exposure to the identified Substance.", 0, java.lang.Integer.MAX_VALUE, reaction)); @@ -1973,30 +2005,30 @@ public class AllergyIntolerance extends DomainResource { public void setProperty(String name, Base value) throws FHIRException { if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); - else if (name.equals("onset")) - this.onset = castToDateTime(value); // DateTimeType - else if (name.equals("recordedDate")) - this.recordedDate = castToDateTime(value); // DateTimeType - else if (name.equals("recorder")) - this.recorder = castToReference(value); // Reference - else if (name.equals("patient")) - this.patient = castToReference(value); // Reference - else if (name.equals("reporter")) - this.reporter = castToReference(value); // Reference - else if (name.equals("substance")) - this.substance = castToCodeableConcept(value); // CodeableConcept else if (name.equals("status")) this.status = new AllergyIntoleranceStatusEnumFactory().fromType(value); // Enumeration - else if (name.equals("criticality")) - this.criticality = new AllergyIntoleranceCriticalityEnumFactory().fromType(value); // Enumeration else if (name.equals("type")) this.type = new AllergyIntoleranceTypeEnumFactory().fromType(value); // Enumeration else if (name.equals("category")) this.category = new AllergyIntoleranceCategoryEnumFactory().fromType(value); // Enumeration + else if (name.equals("criticality")) + this.criticality = new AllergyIntoleranceCriticalityEnumFactory().fromType(value); // Enumeration + else if (name.equals("substance")) + this.substance = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("recordedDate")) + this.recordedDate = castToDateTime(value); // DateTimeType + else if (name.equals("recorder")) + this.recorder = castToReference(value); // Reference + else if (name.equals("reporter")) + this.reporter = castToReference(value); // Reference + else if (name.equals("onset")) + this.onset = castToDateTime(value); // DateTimeType else if (name.equals("lastOccurence")) this.lastOccurence = castToDateTime(value); // DateTimeType else if (name.equals("note")) - this.note = castToAnnotation(value); // Annotation + this.getNote().add(castToAnnotation(value)); else if (name.equals("reaction")) this.getReaction().add((AllergyIntoleranceReactionComponent) value); else @@ -2008,8 +2040,25 @@ 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"); + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.status"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.type"); + } + else if (name.equals("category")) { + throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.category"); + } + else if (name.equals("criticality")) { + throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.criticality"); + } + else if (name.equals("substance")) { + this.substance = new CodeableConcept(); + return this.substance; + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; } else if (name.equals("recordedDate")) { throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.recordedDate"); @@ -2018,36 +2067,18 @@ public class AllergyIntolerance extends DomainResource { this.recorder = new Reference(); return this.recorder; } - else if (name.equals("patient")) { - this.patient = new Reference(); - return this.patient; - } else if (name.equals("reporter")) { this.reporter = new Reference(); return this.reporter; } - else if (name.equals("substance")) { - this.substance = new CodeableConcept(); - return this.substance; - } - else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.status"); - } - else if (name.equals("criticality")) { - throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.criticality"); - } - else if (name.equals("type")) { - throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.type"); - } - else if (name.equals("category")) { - throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.category"); + else if (name.equals("onset")) { + throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.onset"); } else if (name.equals("lastOccurence")) { throw new FHIRException("Cannot call addChild on a primitive type AllergyIntolerance.lastOccurence"); } else if (name.equals("note")) { - this.note = new Annotation(); - return this.note; + return addNote(); } else if (name.equals("reaction")) { return addReaction(); @@ -2069,18 +2100,22 @@ public class AllergyIntolerance extends DomainResource { for (Identifier i : identifier) dst.identifier.add(i.copy()); }; - dst.onset = onset == null ? null : onset.copy(); - dst.recordedDate = recordedDate == null ? null : recordedDate.copy(); - dst.recorder = recorder == null ? null : recorder.copy(); - dst.patient = patient == null ? null : patient.copy(); - dst.reporter = reporter == null ? null : reporter.copy(); - dst.substance = substance == null ? null : substance.copy(); dst.status = status == null ? null : status.copy(); - dst.criticality = criticality == null ? null : criticality.copy(); dst.type = type == null ? null : type.copy(); dst.category = category == null ? null : category.copy(); + dst.criticality = criticality == null ? null : criticality.copy(); + dst.substance = substance == null ? null : substance.copy(); + dst.patient = patient == null ? null : patient.copy(); + dst.recordedDate = recordedDate == null ? null : recordedDate.copy(); + dst.recorder = recorder == null ? null : recorder.copy(); + dst.reporter = reporter == null ? null : reporter.copy(); + dst.onset = onset == null ? null : onset.copy(); dst.lastOccurence = lastOccurence == null ? null : lastOccurence.copy(); - dst.note = note == null ? null : note.copy(); + if (note != null) { + dst.note = new ArrayList(); + for (Annotation i : note) + dst.note.add(i.copy()); + }; if (reaction != null) { dst.reaction = new ArrayList(); for (AllergyIntoleranceReactionComponent i : reaction) @@ -2100,10 +2135,10 @@ public class AllergyIntolerance extends DomainResource { if (!(other instanceof AllergyIntolerance)) return false; AllergyIntolerance o = (AllergyIntolerance) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(onset, o.onset, true) && compareDeep(recordedDate, o.recordedDate, true) - && compareDeep(recorder, o.recorder, true) && compareDeep(patient, o.patient, true) && compareDeep(reporter, o.reporter, true) - && compareDeep(substance, o.substance, true) && compareDeep(status, o.status, true) && compareDeep(criticality, o.criticality, true) - && compareDeep(type, o.type, true) && compareDeep(category, o.category, true) && compareDeep(lastOccurence, o.lastOccurence, true) + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(type, o.type, true) + && compareDeep(category, o.category, true) && compareDeep(criticality, o.criticality, true) && compareDeep(substance, o.substance, true) + && compareDeep(patient, o.patient, true) && compareDeep(recordedDate, o.recordedDate, true) && compareDeep(recorder, o.recorder, true) + && compareDeep(reporter, o.reporter, true) && compareDeep(onset, o.onset, true) && compareDeep(lastOccurence, o.lastOccurence, true) && compareDeep(note, o.note, true) && compareDeep(reaction, o.reaction, true); } @@ -2114,18 +2149,15 @@ public class AllergyIntolerance extends DomainResource { if (!(other instanceof AllergyIntolerance)) return false; AllergyIntolerance o = (AllergyIntolerance) other; - return compareValues(onset, o.onset, true) && compareValues(recordedDate, o.recordedDate, true) && compareValues(status, o.status, true) - && compareValues(criticality, o.criticality, true) && compareValues(type, o.type, true) && compareValues(category, o.category, true) - && compareValues(lastOccurence, o.lastOccurence, true); + return compareValues(status, o.status, true) && compareValues(type, o.type, true) && compareValues(category, o.category, true) + && compareValues(criticality, o.criticality, true) && compareValues(recordedDate, o.recordedDate, true) + && compareValues(onset, o.onset, true) && compareValues(lastOccurence, o.lastOccurence, true); } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (onset == null || onset.isEmpty()) - && (recordedDate == null || recordedDate.isEmpty()) && (recorder == null || recorder.isEmpty()) - && (patient == null || patient.isEmpty()) && (reporter == null || reporter.isEmpty()) && (substance == null || substance.isEmpty()) - && (status == null || status.isEmpty()) && (criticality == null || criticality.isEmpty()) - && (type == null || type.isEmpty()) && (category == null || category.isEmpty()) && (lastOccurence == null || lastOccurence.isEmpty()) - && (note == null || note.isEmpty()) && (reaction == null || reaction.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, type, category + , criticality, substance, patient, recordedDate, recorder, reporter, onset, lastOccurence + , note, reaction); } @Override @@ -2221,7 +2253,7 @@ public class AllergyIntolerance extends DomainResource { * Path: AllergyIntolerance.recorder
*

*/ - @SearchParamDefinition(name="recorder", path="AllergyIntolerance.recorder", description="Who recorded the sensitivity", type="reference" ) + @SearchParamDefinition(name="recorder", path="AllergyIntolerance.recorder", description="Who recorded the sensitivity", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_RECORDER = "recorder"; /** * Fluent Client search parameter constant for recorder @@ -2262,17 +2294,17 @@ public class AllergyIntolerance extends DomainResource { /** * Search parameter: criticality *

- * Description: CRITL | CRITH | CRITU
+ * Description: low | high | unable-to-assess
* Type: token
* Path: AllergyIntolerance.criticality
*

*/ - @SearchParamDefinition(name="criticality", path="AllergyIntolerance.criticality", description="CRITL | CRITH | CRITU", type="token" ) + @SearchParamDefinition(name="criticality", path="AllergyIntolerance.criticality", description="low | high | unable-to-assess", type="token" ) public static final String SP_CRITICALITY = "criticality"; /** * Fluent Client search parameter constant for criticality *

- * Description: CRITL | CRITH | CRITU
+ * Description: low | high | unable-to-assess
* Type: token
* Path: AllergyIntolerance.criticality
*

@@ -2287,7 +2319,7 @@ public class AllergyIntolerance extends DomainResource { * Path: AllergyIntolerance.reporter
*

*/ - @SearchParamDefinition(name="reporter", path="AllergyIntolerance.reporter", description="Source of the information about the allergy", type="reference" ) + @SearchParamDefinition(name="reporter", path="AllergyIntolerance.reporter", description="Source of the information about the allergy", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_REPORTER = "reporter"; /** * Fluent Client search parameter constant for reporter @@ -2373,7 +2405,7 @@ public class AllergyIntolerance extends DomainResource { * Path: AllergyIntolerance.patient
*

*/ - @SearchParamDefinition(name="patient", path="AllergyIntolerance.patient", description="Who the sensitivity is for", type="reference" ) + @SearchParamDefinition(name="patient", path="AllergyIntolerance.patient", description="Who the sensitivity is for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Annotation.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Annotation.java index f91e9280d37..88e5bdbdc22 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Annotation.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Annotation.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -38,9 +38,8 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A text note which also contains information about who made the statement and when. */ @@ -64,7 +63,7 @@ public class Annotation extends Type implements ICompositeType { /** * The text of the annotation. */ - @Child(name = "text", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Child(name = "text", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) @Description(shortDefinition="The annotation - text content", formalDefinition="The text of the annotation." ) protected StringType text; @@ -303,8 +302,7 @@ public class Annotation extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (author == null || author.isEmpty()) && (time == null || time.isEmpty()) - && (text == null || text.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( author, time, text); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Appointment.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Appointment.java index f47fb9d900a..854e4dd3749 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Appointment.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Appointment.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s). */ @@ -739,8 +738,8 @@ public class Appointment extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (actor == null || actor.isEmpty()) - && (required == null || required.isEmpty()) && (status == null || status.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, actor, required, status + ); } public String fhirType() { @@ -765,58 +764,79 @@ public class Appointment extends DomainResource { protected Enumeration status; /** - * The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService). + * A broad categorisation of the service that is to be performed during this appointment. */ - @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The type of appointment that is being booked", formalDefinition="The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService)." ) - protected CodeableConcept type; + @Child(name = "serviceCategory", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="A broad categorisation of the service that is to be performed during this appointment", formalDefinition="A broad categorisation of the service that is to be performed during this appointment." ) + protected CodeableConcept serviceCategory; + + /** + * The specific service that is to be performed during this appointment. + */ + @Child(name = "serviceType", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The specific service that is to be performed during this appointment", formalDefinition="The specific service that is to be performed during this appointment." ) + protected List serviceType; + + /** + * The specialty of a practitioner that would be required to perform the service requested in this appointment. + */ + @Child(name = "specialty", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The specialty of a practitioner that would be required to perform the service requested in this appointment", formalDefinition="The specialty of a practitioner that would be required to perform the service requested in this appointment." ) + protected List specialty; + + /** + * The style of appointment or patient that has been booked in the slot (not service type). + */ + @Child(name = "appointmentType", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The style of appointment or patient that has been booked in the slot (not service type)", formalDefinition="The style of appointment or patient that has been booked in the slot (not service type)." ) + protected CodeableConcept appointmentType; /** * The reason that this appointment is being scheduled. This is more clinical than administrative. */ - @Child(name = "reason", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "reason", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Reason this appointment is scheduled", formalDefinition="The reason that this appointment is being scheduled. This is more clinical than administrative." ) protected CodeableConcept reason; /** * The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority). */ - @Child(name = "priority", type = {UnsignedIntType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Child(name = "priority", type = {UnsignedIntType.class}, order=7, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Used to make informed decisions if needing to re-prioritize", formalDefinition="The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority)." ) protected UnsignedIntType priority; /** * The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field. */ - @Child(name = "description", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Child(name = "description", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Shown on a subject line in a meeting request, or appointment list", formalDefinition="The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field." ) protected StringType description; /** * Date/Time that the appointment is to take place. */ - @Child(name = "start", type = {InstantType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "start", type = {InstantType.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="When appointment is to take place", formalDefinition="Date/Time that the appointment is to take place." ) protected InstantType start; /** * Date/Time that the appointment is to conclude. */ - @Child(name = "end", type = {InstantType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "end", type = {InstantType.class}, order=10, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="When appointment is to conclude", formalDefinition="Date/Time that the appointment is to conclude." ) protected InstantType end; /** * Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request). */ - @Child(name = "minutesDuration", type = {PositiveIntType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Child(name = "minutesDuration", type = {PositiveIntType.class}, order=11, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Can be less than start/end (e.g. estimate)", formalDefinition="Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request)." ) protected PositiveIntType minutesDuration; /** * The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot. */ - @Child(name = "slot", type = {Slot.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "slot", type = {Slot.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="If provided, then no schedule and start/end values MUST match slot", formalDefinition="The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot." ) protected List slot; /** @@ -825,21 +845,28 @@ public class Appointment extends DomainResource { protected List slotTarget; + /** + * The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment. + */ + @Child(name = "created", type = {DateTimeType.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The date that this appointment was initially created", formalDefinition="The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment." ) + protected DateTimeType created; + /** * Additional comments about the appointment. */ - @Child(name = "comment", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Child(name = "comment", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Additional comments", formalDefinition="Additional comments about the appointment." ) protected StringType comment; /** * List of participants involved in the appointment. */ - @Child(name = "participant", type = {}, order=11, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "participant", type = {}, order=15, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Participants involved in appointment", formalDefinition="List of participants involved in the appointment." ) protected List participant; - private static final long serialVersionUID = -1403944125L; + private static final long serialVersionUID = 552749730L; /** * Constructor @@ -942,26 +969,130 @@ public class Appointment extends DomainResource { } /** - * @return {@link #type} (The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService).) + * @return {@link #serviceCategory} (A broad categorisation of the service that is to be performed during this appointment.) */ - public CodeableConcept getType() { - if (this.type == null) + public CodeableConcept getServiceCategory() { + if (this.serviceCategory == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Appointment.type"); + throw new Error("Attempt to auto-create Appointment.serviceCategory"); else if (Configuration.doAutoCreate()) - this.type = new CodeableConcept(); // cc - return this.type; + this.serviceCategory = new CodeableConcept(); // cc + return this.serviceCategory; } - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); + public boolean hasServiceCategory() { + return this.serviceCategory != null && !this.serviceCategory.isEmpty(); } /** - * @param value {@link #type} (The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService).) + * @param value {@link #serviceCategory} (A broad categorisation of the service that is to be performed during this appointment.) */ - public Appointment setType(CodeableConcept value) { - this.type = value; + public Appointment setServiceCategory(CodeableConcept value) { + this.serviceCategory = value; + return this; + } + + /** + * @return {@link #serviceType} (The specific service that is to be performed during this appointment.) + */ + public List getServiceType() { + if (this.serviceType == null) + this.serviceType = new ArrayList(); + return this.serviceType; + } + + public boolean hasServiceType() { + if (this.serviceType == null) + return false; + for (CodeableConcept item : this.serviceType) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #serviceType} (The specific service that is to be performed during this appointment.) + */ + // syntactic sugar + public CodeableConcept addServiceType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.serviceType == null) + this.serviceType = new ArrayList(); + this.serviceType.add(t); + return t; + } + + // syntactic sugar + public Appointment addServiceType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.serviceType == null) + this.serviceType = new ArrayList(); + this.serviceType.add(t); + return this; + } + + /** + * @return {@link #specialty} (The specialty of a practitioner that would be required to perform the service requested in this appointment.) + */ + public List getSpecialty() { + if (this.specialty == null) + this.specialty = new ArrayList(); + return this.specialty; + } + + public boolean hasSpecialty() { + if (this.specialty == null) + return false; + for (CodeableConcept item : this.specialty) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #specialty} (The specialty of a practitioner that would be required to perform the service requested in this appointment.) + */ + // syntactic sugar + public CodeableConcept addSpecialty() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.specialty == null) + this.specialty = new ArrayList(); + this.specialty.add(t); + return t; + } + + // syntactic sugar + public Appointment addSpecialty(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.specialty == null) + this.specialty = new ArrayList(); + this.specialty.add(t); + return this; + } + + /** + * @return {@link #appointmentType} (The style of appointment or patient that has been booked in the slot (not service type).) + */ + public CodeableConcept getAppointmentType() { + if (this.appointmentType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.appointmentType"); + else if (Configuration.doAutoCreate()) + this.appointmentType = new CodeableConcept(); // cc + return this.appointmentType; + } + + public boolean hasAppointmentType() { + return this.appointmentType != null && !this.appointmentType.isEmpty(); + } + + /** + * @param value {@link #appointmentType} (The style of appointment or patient that has been booked in the slot (not service type).) + */ + public Appointment setAppointmentType(CodeableConcept value) { + this.appointmentType = value; return this; } @@ -1287,6 +1418,55 @@ public class Appointment extends DomainResource { return r; } + /** + * @return {@link #created} (The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DateTimeType getCreatedElement() { + if (this.created == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Appointment.created"); + else if (Configuration.doAutoCreate()) + this.created = new DateTimeType(); // bb + return this.created; + } + + public boolean hasCreatedElement() { + return this.created != null && !this.created.isEmpty(); + } + + public boolean hasCreated() { + return this.created != null && !this.created.isEmpty(); + } + + /** + * @param value {@link #created} (The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public Appointment setCreatedElement(DateTimeType value) { + this.created = value; + return this; + } + + /** + * @return The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment. + */ + public Date getCreated() { + return this.created == null ? null : this.created.getValue(); + } + + /** + * @param value The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment. + */ + public Appointment setCreated(Date value) { + if (value == null) + this.created = null; + else { + if (this.created == null) + this.created = new DateTimeType(); + this.created.setValue(value); + } + return this; + } + /** * @return {@link #comment} (Additional comments about the appointment.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value */ @@ -1380,7 +1560,10 @@ public class Appointment extends DomainResource { super.listChildren(childrenList); childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); childrenList.add(new Property("status", "code", "The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.", 0, java.lang.Integer.MAX_VALUE, status)); - childrenList.add(new Property("type", "CodeableConcept", "The type of appointment that is being booked (This may also be associated with participants for location, and/or a HealthcareService).", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("serviceCategory", "CodeableConcept", "A broad categorisation of the service that is to be performed during this appointment.", 0, java.lang.Integer.MAX_VALUE, serviceCategory)); + childrenList.add(new Property("serviceType", "CodeableConcept", "The specific service that is to be performed during this appointment.", 0, java.lang.Integer.MAX_VALUE, serviceType)); + childrenList.add(new Property("specialty", "CodeableConcept", "The specialty of a practitioner that would be required to perform the service requested in this appointment.", 0, java.lang.Integer.MAX_VALUE, specialty)); + childrenList.add(new Property("appointmentType", "CodeableConcept", "The style of appointment or patient that has been booked in the slot (not service type).", 0, java.lang.Integer.MAX_VALUE, appointmentType)); childrenList.add(new Property("reason", "CodeableConcept", "The reason that this appointment is being scheduled. This is more clinical than administrative.", 0, java.lang.Integer.MAX_VALUE, reason)); childrenList.add(new Property("priority", "unsignedInt", "The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).", 0, java.lang.Integer.MAX_VALUE, priority)); childrenList.add(new Property("description", "string", "The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.", 0, java.lang.Integer.MAX_VALUE, description)); @@ -1388,6 +1571,7 @@ public class Appointment extends DomainResource { childrenList.add(new Property("end", "instant", "Date/Time that the appointment is to conclude.", 0, java.lang.Integer.MAX_VALUE, end)); childrenList.add(new Property("minutesDuration", "positiveInt", "Number of minutes that the appointment is to take. This can be less than the duration between the start and end times (where actual time of appointment is only an estimate or is a planned appointment request).", 0, java.lang.Integer.MAX_VALUE, minutesDuration)); childrenList.add(new Property("slot", "Reference(Slot)", "The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot.", 0, java.lang.Integer.MAX_VALUE, slot)); + childrenList.add(new Property("created", "dateTime", "The date that this appointment was initially created. This could be different to the meta.lastModified value on the initial entry, as this could have been before the resource was created on the FHIR server, and should remain unchanged over the lifespan of the appointment.", 0, java.lang.Integer.MAX_VALUE, created)); childrenList.add(new Property("comment", "string", "Additional comments about the appointment.", 0, java.lang.Integer.MAX_VALUE, comment)); childrenList.add(new Property("participant", "", "List of participants involved in the appointment.", 0, java.lang.Integer.MAX_VALUE, participant)); } @@ -1398,8 +1582,14 @@ public class Appointment extends DomainResource { this.getIdentifier().add(castToIdentifier(value)); else if (name.equals("status")) this.status = new AppointmentStatusEnumFactory().fromType(value); // Enumeration - else if (name.equals("type")) - this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("serviceCategory")) + this.serviceCategory = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("serviceType")) + this.getServiceType().add(castToCodeableConcept(value)); + else if (name.equals("specialty")) + this.getSpecialty().add(castToCodeableConcept(value)); + else if (name.equals("appointmentType")) + this.appointmentType = castToCodeableConcept(value); // CodeableConcept else if (name.equals("reason")) this.reason = castToCodeableConcept(value); // CodeableConcept else if (name.equals("priority")) @@ -1414,6 +1604,8 @@ public class Appointment extends DomainResource { this.minutesDuration = castToPositiveInt(value); // PositiveIntType else if (name.equals("slot")) this.getSlot().add(castToReference(value)); + else if (name.equals("created")) + this.created = castToDateTime(value); // DateTimeType else if (name.equals("comment")) this.comment = castToString(value); // StringType else if (name.equals("participant")) @@ -1430,9 +1622,19 @@ public class Appointment extends DomainResource { else if (name.equals("status")) { throw new FHIRException("Cannot call addChild on a primitive type Appointment.status"); } - else if (name.equals("type")) { - this.type = new CodeableConcept(); - return this.type; + else if (name.equals("serviceCategory")) { + this.serviceCategory = new CodeableConcept(); + return this.serviceCategory; + } + else if (name.equals("serviceType")) { + return addServiceType(); + } + else if (name.equals("specialty")) { + return addSpecialty(); + } + else if (name.equals("appointmentType")) { + this.appointmentType = new CodeableConcept(); + return this.appointmentType; } else if (name.equals("reason")) { this.reason = new CodeableConcept(); @@ -1456,6 +1658,9 @@ public class Appointment extends DomainResource { else if (name.equals("slot")) { return addSlot(); } + else if (name.equals("created")) { + throw new FHIRException("Cannot call addChild on a primitive type Appointment.created"); + } else if (name.equals("comment")) { throw new FHIRException("Cannot call addChild on a primitive type Appointment.comment"); } @@ -1480,7 +1685,18 @@ public class Appointment extends DomainResource { dst.identifier.add(i.copy()); }; dst.status = status == null ? null : status.copy(); - dst.type = type == null ? null : type.copy(); + dst.serviceCategory = serviceCategory == null ? null : serviceCategory.copy(); + if (serviceType != null) { + dst.serviceType = new ArrayList(); + for (CodeableConcept i : serviceType) + dst.serviceType.add(i.copy()); + }; + if (specialty != null) { + dst.specialty = new ArrayList(); + for (CodeableConcept i : specialty) + dst.specialty.add(i.copy()); + }; + dst.appointmentType = appointmentType == null ? null : appointmentType.copy(); dst.reason = reason == null ? null : reason.copy(); dst.priority = priority == null ? null : priority.copy(); dst.description = description == null ? null : description.copy(); @@ -1492,6 +1708,7 @@ public class Appointment extends DomainResource { for (Reference i : slot) dst.slot.add(i.copy()); }; + dst.created = created == null ? null : created.copy(); dst.comment = comment == null ? null : comment.copy(); if (participant != null) { dst.participant = new ArrayList(); @@ -1512,11 +1729,12 @@ public class Appointment extends DomainResource { if (!(other instanceof Appointment)) return false; Appointment o = (Appointment) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(type, o.type, true) + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(serviceCategory, o.serviceCategory, true) + && compareDeep(serviceType, o.serviceType, true) && compareDeep(specialty, o.specialty, true) && compareDeep(appointmentType, o.appointmentType, true) && compareDeep(reason, o.reason, true) && compareDeep(priority, o.priority, true) && compareDeep(description, o.description, true) && compareDeep(start, o.start, true) && compareDeep(end, o.end, true) && compareDeep(minutesDuration, o.minutesDuration, true) - && compareDeep(slot, o.slot, true) && compareDeep(comment, o.comment, true) && compareDeep(participant, o.participant, true) - ; + && compareDeep(slot, o.slot, true) && compareDeep(created, o.created, true) && compareDeep(comment, o.comment, true) + && compareDeep(participant, o.participant, true); } @Override @@ -1528,16 +1746,13 @@ public class Appointment extends DomainResource { Appointment o = (Appointment) other; return compareValues(status, o.status, true) && compareValues(priority, o.priority, true) && compareValues(description, o.description, true) && compareValues(start, o.start, true) && compareValues(end, o.end, true) && compareValues(minutesDuration, o.minutesDuration, true) - && compareValues(comment, o.comment, true); + && compareValues(created, o.created, true) && compareValues(comment, o.comment, true); } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) - && (type == null || type.isEmpty()) && (reason == null || reason.isEmpty()) && (priority == null || priority.isEmpty()) - && (description == null || description.isEmpty()) && (start == null || start.isEmpty()) && (end == null || end.isEmpty()) - && (minutesDuration == null || minutesDuration.isEmpty()) && (slot == null || slot.isEmpty()) - && (comment == null || comment.isEmpty()) && (participant == null || participant.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, serviceCategory + , serviceType, specialty, appointmentType, reason, priority, description, start, end + , minutesDuration, slot, created, comment, participant); } @Override @@ -1573,7 +1788,7 @@ public class Appointment extends DomainResource { * Path: Appointment.participant.actor
*

*/ - @SearchParamDefinition(name="actor", path="Appointment.participant.actor", description="Any one of the individuals participating in the appointment", type="reference" ) + @SearchParamDefinition(name="actor", path="Appointment.participant.actor", description="Any one of the individuals participating in the appointment", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_ACTOR = "actor"; /** * Fluent Client search parameter constant for actor @@ -1683,6 +1898,46 @@ public class Appointment extends DomainResource { */ public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Appointment:patient").toLocked(); + /** + * Search parameter: appointment-type + *

+ * Description: The style of appointment or patient that has been booked in the slot (not service type)
+ * Type: token
+ * Path: Appointment.appointmentType
+ *

+ */ + @SearchParamDefinition(name="appointment-type", path="Appointment.appointmentType", description="The style of appointment or patient that has been booked in the slot (not service type)", type="token" ) + public static final String SP_APPOINTMENT_TYPE = "appointment-type"; + /** + * Fluent Client search parameter constant for appointment-type + *

+ * Description: The style of appointment or patient that has been booked in the slot (not service type)
+ * Type: token
+ * Path: Appointment.appointmentType
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam APPOINTMENT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_APPOINTMENT_TYPE); + + /** + * Search parameter: service-type + *

+ * Description: The specific service that is to be performed during this appointment
+ * Type: token
+ * Path: Appointment.serviceType
+ *

+ */ + @SearchParamDefinition(name="service-type", path="Appointment.serviceType", description="The specific service that is to be performed during this appointment", type="token" ) + public static final String SP_SERVICE_TYPE = "service-type"; + /** + * Fluent Client search parameter constant for service-type + *

+ * Description: The specific service that is to be performed during this appointment
+ * Type: token
+ * Path: Appointment.serviceType
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam SERVICE_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SERVICE_TYPE); + /** * Search parameter: location *

diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/AppointmentResponse.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/AppointmentResponse.java index 0c36bf9458e..31f5d990e7f 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/AppointmentResponse.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/AppointmentResponse.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,166 +39,14 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection. */ @ResourceDef(name="AppointmentResponse", profile="http://hl7.org/fhir/Profile/AppointmentResponse") public class AppointmentResponse extends DomainResource { - public enum ParticipantStatus { - /** - * The appointment participant has accepted that they can attend the appointment at the time specified in the AppointmentResponse. - */ - ACCEPTED, - /** - * The appointment participant has declined the appointment. - */ - DECLINED, - /** - * The appointment participant has tentatively accepted the appointment. - */ - TENTATIVE, - /** - * The participant has in-process the appointment. - */ - INPROCESS, - /** - * The participant has completed the appointment. - */ - COMPLETED, - /** - * This is the intitial status of an appointment participant until a participant has replied. It implies that there is no commitment for the appointment. - */ - NEEDSACTION, - /** - * added to help the parsers - */ - NULL; - public static ParticipantStatus fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("accepted".equals(codeString)) - return ACCEPTED; - if ("declined".equals(codeString)) - return DECLINED; - if ("tentative".equals(codeString)) - return TENTATIVE; - if ("in-process".equals(codeString)) - return INPROCESS; - if ("completed".equals(codeString)) - return COMPLETED; - if ("needs-action".equals(codeString)) - return NEEDSACTION; - throw new FHIRException("Unknown ParticipantStatus code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case ACCEPTED: return "accepted"; - case DECLINED: return "declined"; - case TENTATIVE: return "tentative"; - case INPROCESS: return "in-process"; - case COMPLETED: return "completed"; - case NEEDSACTION: return "needs-action"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case ACCEPTED: return "http://hl7.org/fhir/participantstatus"; - case DECLINED: return "http://hl7.org/fhir/participantstatus"; - case TENTATIVE: return "http://hl7.org/fhir/participantstatus"; - case INPROCESS: return "http://hl7.org/fhir/participantstatus"; - case COMPLETED: return "http://hl7.org/fhir/participantstatus"; - case NEEDSACTION: return "http://hl7.org/fhir/participantstatus"; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case ACCEPTED: return "The appointment participant has accepted that they can attend the appointment at the time specified in the AppointmentResponse."; - case DECLINED: return "The appointment participant has declined the appointment."; - case TENTATIVE: return "The appointment participant has tentatively accepted the appointment."; - case INPROCESS: return "The participant has in-process the appointment."; - case COMPLETED: return "The participant has completed the appointment."; - case NEEDSACTION: return "This is the intitial status of an appointment participant until a participant has replied. It implies that there is no commitment for the appointment."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case ACCEPTED: return "Accepted"; - case DECLINED: return "Declined"; - case TENTATIVE: return "Tentative"; - case INPROCESS: return "In Process"; - case COMPLETED: return "Completed"; - case NEEDSACTION: return "Needs Action"; - default: return "?"; - } - } - } - - public static class ParticipantStatusEnumFactory implements EnumFactory { - public ParticipantStatus fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("accepted".equals(codeString)) - return ParticipantStatus.ACCEPTED; - if ("declined".equals(codeString)) - return ParticipantStatus.DECLINED; - if ("tentative".equals(codeString)) - return ParticipantStatus.TENTATIVE; - if ("in-process".equals(codeString)) - return ParticipantStatus.INPROCESS; - if ("completed".equals(codeString)) - return ParticipantStatus.COMPLETED; - if ("needs-action".equals(codeString)) - return ParticipantStatus.NEEDSACTION; - throw new IllegalArgumentException("Unknown ParticipantStatus code '"+codeString+"'"); - } - public Enumeration fromType(Base code) throws FHIRException { - if (code == null || code.isEmpty()) - return null; - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return null; - if ("accepted".equals(codeString)) - return new Enumeration(this, ParticipantStatus.ACCEPTED); - if ("declined".equals(codeString)) - return new Enumeration(this, ParticipantStatus.DECLINED); - if ("tentative".equals(codeString)) - return new Enumeration(this, ParticipantStatus.TENTATIVE); - if ("in-process".equals(codeString)) - return new Enumeration(this, ParticipantStatus.INPROCESS); - if ("completed".equals(codeString)) - return new Enumeration(this, ParticipantStatus.COMPLETED); - if ("needs-action".equals(codeString)) - return new Enumeration(this, ParticipantStatus.NEEDSACTION); - throw new FHIRException("Unknown ParticipantStatus code '"+codeString+"'"); - } - public String toCode(ParticipantStatus code) { - if (code == ParticipantStatus.ACCEPTED) - return "accepted"; - if (code == ParticipantStatus.DECLINED) - return "declined"; - if (code == ParticipantStatus.TENTATIVE) - return "tentative"; - if (code == ParticipantStatus.INPROCESS) - return "in-process"; - if (code == ParticipantStatus.COMPLETED) - return "completed"; - if (code == ParticipantStatus.NEEDSACTION) - return "needs-action"; - return "?"; - } - public String toSystem(ParticipantStatus code) { - return code.getSystem(); - } - } - /** * This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate. */ @@ -256,7 +104,7 @@ public class AppointmentResponse extends DomainResource { */ @Child(name = "participantStatus", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true) @Description(shortDefinition="accepted | declined | tentative | in-process | completed | needs-action", formalDefinition="Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty." ) - protected Enumeration participantStatus; + protected CodeType participantStatus; /** * Additional comments about the appointment. @@ -265,7 +113,7 @@ public class AppointmentResponse extends DomainResource { @Description(shortDefinition="Additional comments", formalDefinition="Additional comments about the appointment." ) protected StringType comment; - private static final long serialVersionUID = 248548635L; + private static final long serialVersionUID = -1645343660L; /** * Constructor @@ -277,7 +125,7 @@ public class AppointmentResponse extends DomainResource { /** * Constructor */ - public AppointmentResponse(Reference appointment, Enumeration participantStatus) { + public AppointmentResponse(Reference appointment, CodeType participantStatus) { super(); this.appointment = appointment; this.participantStatus = participantStatus; @@ -547,12 +395,12 @@ public class AppointmentResponse extends DomainResource { /** * @return {@link #participantStatus} (Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.). This is the underlying object with id, value and extensions. The accessor "getParticipantStatus" gives direct access to the value */ - public Enumeration getParticipantStatusElement() { + public CodeType getParticipantStatusElement() { if (this.participantStatus == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create AppointmentResponse.participantStatus"); else if (Configuration.doAutoCreate()) - this.participantStatus = new Enumeration(new ParticipantStatusEnumFactory()); // bb + this.participantStatus = new CodeType(); // bb return this.participantStatus; } @@ -567,7 +415,7 @@ public class AppointmentResponse extends DomainResource { /** * @param value {@link #participantStatus} (Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.). This is the underlying object with id, value and extensions. The accessor "getParticipantStatus" gives direct access to the value */ - public AppointmentResponse setParticipantStatusElement(Enumeration value) { + public AppointmentResponse setParticipantStatusElement(CodeType value) { this.participantStatus = value; return this; } @@ -575,16 +423,16 @@ public class AppointmentResponse extends DomainResource { /** * @return Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty. */ - public ParticipantStatus getParticipantStatus() { + public String getParticipantStatus() { return this.participantStatus == null ? null : this.participantStatus.getValue(); } /** * @param value Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty. */ - public AppointmentResponse setParticipantStatus(ParticipantStatus value) { + public AppointmentResponse setParticipantStatus(String value) { if (this.participantStatus == null) - this.participantStatus = new Enumeration(new ParticipantStatusEnumFactory()); + this.participantStatus = new CodeType(); this.participantStatus.setValue(value); return this; } @@ -665,7 +513,7 @@ public class AppointmentResponse extends DomainResource { else if (name.equals("actor")) this.actor = castToReference(value); // Reference else if (name.equals("participantStatus")) - this.participantStatus = new ParticipantStatusEnumFactory().fromType(value); // Enumeration + this.participantStatus = castToCode(value); // CodeType else if (name.equals("comment")) this.comment = castToString(value); // StringType else @@ -760,10 +608,8 @@ public class AppointmentResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (appointment == null || appointment.isEmpty()) - && (start == null || start.isEmpty()) && (end == null || end.isEmpty()) && (participantType == null || participantType.isEmpty()) - && (actor == null || actor.isEmpty()) && (participantStatus == null || participantStatus.isEmpty()) - && (comment == null || comment.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, appointment, start + , end, participantType, actor, participantStatus, comment); } @Override @@ -779,7 +625,7 @@ public class AppointmentResponse extends DomainResource { * Path: AppointmentResponse.actor
*

*/ - @SearchParamDefinition(name="actor", path="AppointmentResponse.actor", description="The Person, Location/HealthcareService or Device that this appointment response replies for", type="reference" ) + @SearchParamDefinition(name="actor", path="AppointmentResponse.actor", description="The Person, Location/HealthcareService or Device that this appointment response replies for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_ACTOR = "actor"; /** * Fluent Client search parameter constant for actor diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Attachment.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Attachment.java index 606c8c34f92..d3d3c504eab 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Attachment.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Attachment.java @@ -29,20 +29,18 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * For referring to data content defined in other formats. */ @@ -66,7 +64,7 @@ public class Attachment extends Type implements ICompositeType { /** * The actual data of the attachment - a sequence of bytes. In XML, represented using base64. */ - @Child(name = "data", type = {Base64BinaryType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Child(name = "data", type = {Base64BinaryType.class}, order=2, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Data inline, base64ed", formalDefinition="The actual data of the attachment - a sequence of bytes. In XML, represented using base64." ) protected Base64BinaryType data; @@ -616,10 +614,8 @@ public class Attachment extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (contentType == null || contentType.isEmpty()) && (language == null || language.isEmpty()) - && (data == null || data.isEmpty()) && (url == null || url.isEmpty()) && (size == null || size.isEmpty()) - && (hash == null || hash.isEmpty()) && (title == null || title.isEmpty()) && (creation == null || creation.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( contentType, language, data, url + , size, hash, title, creation); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/AuditEvent.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/AuditEvent.java index 4fac75fa9d6..5ba5db46c7d 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/AuditEvent.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/AuditEvent.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage. */ @@ -442,10 +440,10 @@ public class AuditEvent extends DomainResource { @Block() public static class AuditEventAgentComponent extends BackboneElement implements IBaseBackboneElement { /** - * Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context. + * Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context. */ @Child(name = "role", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="User roles (e.g. local RBAC codes)", formalDefinition="Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context." ) + @Description(shortDefinition="Agent role in the event", formalDefinition="Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context." ) protected List role; /** @@ -475,10 +473,10 @@ public class AuditEvent extends DomainResource { protected StringType altId; /** - * Human-meaningful name for the user. + * Human-meaningful name for the agent. */ @Child(name = "name", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Human-meaningful name for the user", formalDefinition="Human-meaningful name for the user." ) + @Description(shortDefinition="Human-meaningful name for the agent", formalDefinition="Human-meaningful name for the agent." ) protected StringType name; /** @@ -546,7 +544,7 @@ public class AuditEvent extends DomainResource { } /** - * @return {@link #role} (Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context.) + * @return {@link #role} (Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context.) */ public List getRole() { if (this.role == null) @@ -564,7 +562,7 @@ public class AuditEvent extends DomainResource { } /** - * @return {@link #role} (Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context.) + * @return {@link #role} (Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context.) */ // syntactic sugar public CodeableConcept addRole() { //3 @@ -698,7 +696,7 @@ public class AuditEvent extends DomainResource { } /** - * @return {@link #name} (Human-meaningful name for the user.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + * @return {@link #name} (Human-meaningful name for the agent.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ public StringType getNameElement() { if (this.name == null) @@ -718,7 +716,7 @@ public class AuditEvent extends DomainResource { } /** - * @param value {@link #name} (Human-meaningful name for the user.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + * @param value {@link #name} (Human-meaningful name for the agent.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ public AuditEventAgentComponent setNameElement(StringType value) { this.name = value; @@ -726,14 +724,14 @@ public class AuditEvent extends DomainResource { } /** - * @return Human-meaningful name for the user. + * @return Human-meaningful name for the agent. */ public String getName() { return this.name == null ? null : this.name.getValue(); } /** - * @param value Human-meaningful name for the user. + * @param value Human-meaningful name for the agent. */ public AuditEventAgentComponent setName(String value) { if (Utilities.noString(value)) @@ -979,11 +977,11 @@ public class AuditEvent extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("role", "CodeableConcept", "Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the role-based access control security system used in the local context.", 0, java.lang.Integer.MAX_VALUE, role)); + childrenList.add(new Property("role", "CodeableConcept", "Specification of the role(s) the user plays when performing the event. Usually the codes used in this element are local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context.", 0, java.lang.Integer.MAX_VALUE, role)); childrenList.add(new Property("reference", "Reference(Practitioner|Organization|Device|Patient|RelatedPerson)", "Direct reference to a resource that identifies the agent.", 0, java.lang.Integer.MAX_VALUE, reference)); childrenList.add(new Property("userId", "Identifier", "Unique identifier for the user actively participating in the event.", 0, java.lang.Integer.MAX_VALUE, userId)); childrenList.add(new Property("altId", "string", "Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.", 0, java.lang.Integer.MAX_VALUE, altId)); - childrenList.add(new Property("name", "string", "Human-meaningful name for the user.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("name", "string", "Human-meaningful name for the agent.", 0, java.lang.Integer.MAX_VALUE, name)); childrenList.add(new Property("requestor", "boolean", "Indicator that the user is or is not the requestor, or initiator, for the event being audited.", 0, java.lang.Integer.MAX_VALUE, requestor)); childrenList.add(new Property("location", "Reference(Location)", "Where the event occurred.", 0, java.lang.Integer.MAX_VALUE, location)); childrenList.add(new Property("policy", "uri", "The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.", 0, java.lang.Integer.MAX_VALUE, policy)); @@ -1118,11 +1116,8 @@ public class AuditEvent extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (role == null || role.isEmpty()) && (reference == null || reference.isEmpty()) - && (userId == null || userId.isEmpty()) && (altId == null || altId.isEmpty()) && (name == null || name.isEmpty()) - && (requestor == null || requestor.isEmpty()) && (location == null || location.isEmpty()) - && (policy == null || policy.isEmpty()) && (media == null || media.isEmpty()) && (network == null || network.isEmpty()) - && (purposeOfUse == null || purposeOfUse.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( role, reference, userId, altId + , name, requestor, location, policy, media, network, purposeOfUse); } public String fhirType() { @@ -1312,8 +1307,7 @@ public class AuditEvent extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (address == null || address.isEmpty()) && (type == null || type.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( address, type); } public String fhirType() { @@ -1546,8 +1540,7 @@ public class AuditEvent extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (site == null || site.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (type == null || type.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( site, identifier, type); } public String fhirType() { @@ -2135,11 +2128,8 @@ public class AuditEvent extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (reference == null || reference.isEmpty()) - && (type == null || type.isEmpty()) && (role == null || role.isEmpty()) && (lifecycle == null || lifecycle.isEmpty()) - && (securityLabel == null || securityLabel.isEmpty()) && (name == null || name.isEmpty()) - && (description == null || description.isEmpty()) && (query == null || query.isEmpty()) && (detail == null || detail.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, reference, type, role + , lifecycle, securityLabel, name, description, query, detail); } public String fhirType() { @@ -2330,8 +2320,7 @@ public class AuditEvent extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (value == null || value.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, value); } public String fhirType() { @@ -2391,10 +2380,10 @@ public class AuditEvent extends DomainResource { protected List purposeOfEvent; /** - * A person, a hardware device or software process. + * An actor taking an active role in the event or activity that is logged. */ @Child(name = "agent", type = {}, order=7, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="A person, a hardware device or software process", formalDefinition="A person, a hardware device or software process." ) + @Description(shortDefinition="Actor involved in the event", formalDefinition="An actor taking an active role in the event or activity that is logged." ) protected List agent; /** @@ -2727,7 +2716,7 @@ public class AuditEvent extends DomainResource { } /** - * @return {@link #agent} (A person, a hardware device or software process.) + * @return {@link #agent} (An actor taking an active role in the event or activity that is logged.) */ public List getAgent() { if (this.agent == null) @@ -2745,7 +2734,7 @@ public class AuditEvent extends DomainResource { } /** - * @return {@link #agent} (A person, a hardware device or software process.) + * @return {@link #agent} (An actor taking an active role in the event or activity that is logged.) */ // syntactic sugar public AuditEventAgentComponent addAgent() { //3 @@ -2839,7 +2828,7 @@ public class AuditEvent extends DomainResource { childrenList.add(new Property("outcome", "code", "Indicates whether the event succeeded or failed.", 0, java.lang.Integer.MAX_VALUE, outcome)); childrenList.add(new Property("outcomeDesc", "string", "A free text description of the outcome of the event.", 0, java.lang.Integer.MAX_VALUE, outcomeDesc)); childrenList.add(new Property("purposeOfEvent", "Coding", "The purposeOfUse (reason) that was used during the event being recorded.", 0, java.lang.Integer.MAX_VALUE, purposeOfEvent)); - childrenList.add(new Property("agent", "", "A person, a hardware device or software process.", 0, java.lang.Integer.MAX_VALUE, agent)); + childrenList.add(new Property("agent", "", "An actor taking an active role in the event or activity that is logged.", 0, java.lang.Integer.MAX_VALUE, agent)); childrenList.add(new Property("source", "", "Application systems and processes.", 0, java.lang.Integer.MAX_VALUE, source)); childrenList.add(new Property("entity", "", "Specific instances of data or objects that have been accessed.", 0, java.lang.Integer.MAX_VALUE, entity)); } @@ -2974,11 +2963,8 @@ public class AuditEvent extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (subtype == null || subtype.isEmpty()) - && (action == null || action.isEmpty()) && (recorded == null || recorded.isEmpty()) && (outcome == null || outcome.isEmpty()) - && (outcomeDesc == null || outcomeDesc.isEmpty()) && (purposeOfEvent == null || purposeOfEvent.isEmpty()) - && (agent == null || agent.isEmpty()) && (source == null || source.isEmpty()) && (entity == null || entity.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, subtype, action, recorded + , outcome, outcomeDesc, purposeOfEvent, agent, source, entity); } @Override @@ -3006,6 +2992,52 @@ public class AuditEvent extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); + /** + * Search parameter: entity-type + *

+ * Description: Type of object involved
+ * Type: token
+ * Path: AuditEvent.entity.type
+ *

+ */ + @SearchParamDefinition(name="entity-type", path="AuditEvent.entity.type", description="Type of object involved", type="token" ) + public static final String SP_ENTITY_TYPE = "entity-type"; + /** + * Fluent Client search parameter constant for entity-type + *

+ * Description: Type of object involved
+ * Type: token
+ * Path: AuditEvent.entity.type
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam ENTITY_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ENTITY_TYPE); + + /** + * Search parameter: agent + *

+ * Description: Direct reference to resource
+ * Type: reference
+ * Path: AuditEvent.agent.reference
+ *

+ */ + @SearchParamDefinition(name="agent", path="AuditEvent.agent.reference", description="Direct reference to resource", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) + public static final String SP_AGENT = "agent"; + /** + * Fluent Client search parameter constant for agent + *

+ * Description: Direct reference to resource
+ * Type: reference
+ * Path: AuditEvent.agent.reference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AGENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AGENT); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "AuditEvent:agent". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_AGENT = new ca.uhn.fhir.model.api.Include("AuditEvent:agent").toLocked(); + /** * Search parameter: address *

@@ -3086,58 +3118,6 @@ public class AuditEvent extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam ALTID = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ALTID); - /** - * Search parameter: participant - *

- * Description: Direct reference to resource
- * Type: reference
- * Path: AuditEvent.agent.reference
- *

- */ - @SearchParamDefinition(name="participant", path="AuditEvent.agent.reference", description="Direct reference to resource", type="reference" ) - public static final String SP_PARTICIPANT = "participant"; - /** - * Fluent Client search parameter constant for participant - *

- * Description: Direct reference to resource
- * Type: reference
- * Path: AuditEvent.agent.reference
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARTICIPANT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARTICIPANT); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "AuditEvent:participant". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTICIPANT = new ca.uhn.fhir.model.api.Include("AuditEvent:participant").toLocked(); - - /** - * Search parameter: reference - *

- * Description: Specific instance of resource (e.g. versioned)
- * Type: reference
- * Path: AuditEvent.entity.reference
- *

- */ - @SearchParamDefinition(name="reference", path="AuditEvent.entity.reference", description="Specific instance of resource (e.g. versioned)", type="reference" ) - public static final String SP_REFERENCE = "reference"; - /** - * Fluent Client search parameter constant for reference - *

- * Description: Specific instance of resource (e.g. versioned)
- * Type: reference
- * Path: AuditEvent.entity.reference
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REFERENCE); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "AuditEvent:reference". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_REFERENCE = new ca.uhn.fhir.model.api.Include("AuditEvent:reference").toLocked(); - /** * Search parameter: site *

@@ -3158,6 +3138,46 @@ public class AuditEvent extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam SITE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SITE); + /** + * Search parameter: agent-name + *

+ * Description: Human-meaningful name for the agent
+ * Type: string
+ * Path: AuditEvent.agent.name
+ *

+ */ + @SearchParamDefinition(name="agent-name", path="AuditEvent.agent.name", description="Human-meaningful name for the agent", type="string" ) + public static final String SP_AGENT_NAME = "agent-name"; + /** + * Fluent Client search parameter constant for agent-name + *

+ * Description: Human-meaningful name for the agent
+ * Type: string
+ * Path: AuditEvent.agent.name
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam AGENT_NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_AGENT_NAME); + + /** + * Search parameter: entity-name + *

+ * Description: Descriptor for entity
+ * Type: string
+ * Path: AuditEvent.entity.name
+ *

+ */ + @SearchParamDefinition(name="entity-name", path="AuditEvent.entity.name", description="Descriptor for entity", type="string" ) + public static final String SP_ENTITY_NAME = "entity-name"; + /** + * Fluent Client search parameter constant for entity-name + *

+ * Description: Descriptor for entity
+ * Type: string
+ * Path: AuditEvent.entity.name
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam ENTITY_NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ENTITY_NAME); + /** * Search parameter: subtype *

@@ -3178,26 +3198,6 @@ public class AuditEvent extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam SUBTYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SUBTYPE); - /** - * Search parameter: identity - *

- * Description: Specific instance of object (e.g. versioned)
- * Type: token
- * Path: AuditEvent.entity.identifier
- *

- */ - @SearchParamDefinition(name="identity", path="AuditEvent.entity.identifier", description="Specific instance of object (e.g. versioned)", type="token" ) - public static final String SP_IDENTITY = "identity"; - /** - * Fluent Client search parameter constant for identity - *

- * Description: Specific instance of object (e.g. versioned)
- * Type: token
- * Path: AuditEvent.entity.identifier
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTITY); - /** * Search parameter: patient *

@@ -3206,7 +3206,7 @@ public class AuditEvent extends DomainResource { * Path: AuditEvent.agent.reference, AuditEvent.entity.reference
*

*/ - @SearchParamDefinition(name="patient", path="AuditEvent.agent.reference | AuditEvent.entity.reference", description="Direct reference to resource", type="reference" ) + @SearchParamDefinition(name="patient", path="AuditEvent.agent.reference | AuditEvent.entity.reference", description="Direct reference to resource", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient @@ -3224,46 +3224,6 @@ public class AuditEvent extends DomainResource { */ public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("AuditEvent:patient").toLocked(); - /** - * Search parameter: object-type - *

- * Description: Type of object involved
- * Type: token
- * Path: AuditEvent.entity.type
- *

- */ - @SearchParamDefinition(name="object-type", path="AuditEvent.entity.type", description="Type of object involved", type="token" ) - public static final String SP_OBJECT_TYPE = "object-type"; - /** - * Fluent Client search parameter constant for object-type - *

- * Description: Type of object involved
- * Type: token
- * Path: AuditEvent.entity.type
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam OBJECT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_OBJECT_TYPE); - - /** - * Search parameter: name - *

- * Description: Human-meaningful name for the user
- * Type: string
- * Path: AuditEvent.agent.name
- *

- */ - @SearchParamDefinition(name="name", path="AuditEvent.agent.name", description="Human-meaningful name for the user", type="string" ) - public static final String SP_NAME = "name"; - /** - * Fluent Client search parameter constant for name - *

- * Description: Human-meaningful name for the user
- * Type: string
- * Path: AuditEvent.agent.name
- *

- */ - public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); - /** * Search parameter: action *

@@ -3305,24 +3265,50 @@ public class AuditEvent extends DomainResource { public static final ca.uhn.fhir.rest.gclient.TokenClientParam USER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_USER); /** - * Search parameter: desc + * Search parameter: entity *

- * Description: Descriptor for entity
- * Type: string
- * Path: AuditEvent.entity.name
+ * Description: Specific instance of resource (e.g. versioned)
+ * Type: reference
+ * Path: AuditEvent.entity.reference
*

*/ - @SearchParamDefinition(name="desc", path="AuditEvent.entity.name", description="Descriptor for entity", type="string" ) - public static final String SP_DESC = "desc"; + @SearchParamDefinition(name="entity", path="AuditEvent.entity.reference", description="Specific instance of resource (e.g. versioned)", type="reference" ) + public static final String SP_ENTITY = "entity"; /** - * Fluent Client search parameter constant for desc + * Fluent Client search parameter constant for entity *

- * Description: Descriptor for entity
- * Type: string
- * Path: AuditEvent.entity.name
+ * Description: Specific instance of resource (e.g. versioned)
+ * Type: reference
+ * Path: AuditEvent.entity.reference
*

*/ - public static final ca.uhn.fhir.rest.gclient.StringClientParam DESC = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESC); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENTITY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENTITY); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "AuditEvent:entity". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_ENTITY = new ca.uhn.fhir.model.api.Include("AuditEvent:entity").toLocked(); + + /** + * Search parameter: entity-id + *

+ * Description: Specific instance of object (e.g. versioned)
+ * Type: token
+ * Path: AuditEvent.entity.identifier
+ *

+ */ + @SearchParamDefinition(name="entity-id", path="AuditEvent.entity.identifier", description="Specific instance of object (e.g. versioned)", type="token" ) + public static final String SP_ENTITY_ID = "entity-id"; + /** + * Fluent Client search parameter constant for entity-id + *

+ * Description: Specific instance of object (e.g. versioned)
+ * Type: token
+ * Path: AuditEvent.entity.identifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam ENTITY_ID = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ENTITY_ID); /** * Search parameter: policy diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BackboneElement.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BackboneElement.java index dc4924e0230..a7188eb88f8 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BackboneElement.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BackboneElement.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -37,9 +37,8 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Base definition for all elements that are defined inside a resource - but not those in a data type. */ @@ -159,7 +158,7 @@ public abstract class BackboneElement extends Element implements IBaseBackboneEl } public boolean isEmpty() { - return super.isEmpty() && (modifierExtension == null || modifierExtension.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( modifierExtension); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Base.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Base.java index 20f87273e91..30f1e13bf23 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Base.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Base.java @@ -68,19 +68,16 @@ private Map userData; return (Integer) getUserData(name); } - @Override public boolean hasFormatComment() { return (formatCommentsPre != null && !formatCommentsPre.isEmpty()) || (formatCommentsPost != null && !formatCommentsPost.isEmpty()); } - @Override public List getFormatCommentsPre() { if (formatCommentsPre == null) formatCommentsPre = new ArrayList(); return formatCommentsPre; } - - @Override + public List getFormatCommentsPost() { if (formatCommentsPost == null) formatCommentsPost = new ArrayList(); @@ -489,7 +486,7 @@ private Map userData; else throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a Meta"); } - + public Extension castToExtension(Base b) throws FHIRException { if (b instanceof Extension) return (Extension) b; @@ -518,7 +515,42 @@ private Map userData; else throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a ElementDefinition"); } - + + public ModuleMetadata castToModuleMetadata(Base b) throws FHIRException { + if (b instanceof ModuleMetadata) + return (ModuleMetadata) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a ModuleMetadata"); + } + + public ActionDefinition castToActionDefinition(Base b) throws FHIRException { + if (b instanceof ActionDefinition) + return (ActionDefinition) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a ActionDefinition"); + } + + public DataRequirement castToDataRequirement(Base b) throws FHIRException { + if (b instanceof DataRequirement) + return (DataRequirement) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a DataRequirement"); + } + + public ParameterDefinition castToParameterDefinition(Base b) throws FHIRException { + if (b instanceof ParameterDefinition) + return (ParameterDefinition) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a ParameterDefinition"); + } + + public TriggerDefinition castToTriggerDefinition(Base b) throws FHIRException { + if (b instanceof TriggerDefinition) + return (TriggerDefinition) b; + else + throw new FHIRException("Unable to convert a "+b.getClass().getName()+" to a TriggerDefinition"); + } + protected boolean isMetadataBased() { return false; } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BaseNarrative.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BaseNarrative.java index 25d1b7f9cc9..ae5d68d7539 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BaseNarrative.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BaseNarrative.java @@ -38,13 +38,11 @@ public abstract class BaseNarrative extends Type implements INarrative { public abstract Enumeration getStatusElement(); - @Override public INarrative setStatusAsString(String theString) { getStatusElement().setValueAsString(theString); return this; } - @Override public String getStatusAsString() { return getStatusElement().getValueAsString(); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BaseResource.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BaseResource.java index fb5a6f17312..d9b4044981a 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BaseResource.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BaseResource.java @@ -24,11 +24,11 @@ public abstract class BaseResource extends Base implements IAnyResource, IElemen return this; } + public abstract BaseResource setIdElement(IdType theIdType); + @Override public FhirVersionEnum getStructureFhirVersionEnum() { return FhirVersionEnum.DSTU3; } - public abstract BaseResource setIdElement(IdType theIdType); - } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Basic.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Basic.java index cfe1be531e3..4b17d22fa5a 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Basic.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Basic.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -38,9 +38,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification. */ @@ -395,9 +394,8 @@ public class Basic extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (code == null || code.isEmpty()) - && (subject == null || subject.isEmpty()) && (created == null || created.isEmpty()) && (author == null || author.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, code, subject, created + , author); } @Override @@ -499,7 +497,7 @@ public class Basic extends DomainResource { * Path: Basic.subject
*

*/ - @SearchParamDefinition(name="patient", path="Basic.subject", description="Identifies the focus of this resource", type="reference" ) + @SearchParamDefinition(name="patient", path="Basic.subject", description="Identifies the focus of this resource", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient @@ -525,7 +523,7 @@ public class Basic extends DomainResource { * Path: Basic.author
*

*/ - @SearchParamDefinition(name="author", path="Basic.author", description="Who created", type="reference" ) + @SearchParamDefinition(name="author", path="Basic.author", description="Who created", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_AUTHOR = "author"; /** * Fluent Client search parameter constant for author diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Binary.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Binary.java index 2021d4de134..57ef2badb8e 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Binary.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Binary.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A binary resource can contain any content, whether text, image, pdf, zip archive, etc. */ @@ -238,8 +236,7 @@ public class Binary extends BaseBinary implements IBaseBinary { } public boolean isEmpty() { - return super.isEmpty() && (contentType == null || contentType.isEmpty()) && (content == null || content.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( contentType, content); } @Override diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BodySite.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BodySite.java index ad422413515..82264a2a4eb 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BodySite.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BodySite.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Record details about the anatomical location of a specimen or body part. This resource may be used when a coded concept does not provide the necessary detail needed for the use case. */ @@ -459,9 +458,8 @@ public class BodySite extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (patient == null || patient.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (code == null || code.isEmpty()) && (modifier == null || modifier.isEmpty()) && (description == null || description.isEmpty()) - && (image == null || image.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( patient, identifier, code, modifier + , description, image); } @Override @@ -517,7 +515,7 @@ public class BodySite extends DomainResource { * Path: BodySite.patient
*

*/ - @SearchParamDefinition(name="patient", path="BodySite.patient", description="Patient to whom bodysite belongs", type="reference" ) + @SearchParamDefinition(name="patient", path="BodySite.patient", description="Patient to whom bodysite belongs", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Bundle.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Bundle.java index 44506819364..368226e0ac1 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Bundle.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Bundle.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -40,9 +40,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A container for a collection of resources. */ @@ -651,8 +650,7 @@ public class Bundle extends Resource implements IBaseBundle { } public boolean isEmpty() { - return super.isEmpty() && (relation == null || relation.isEmpty()) && (url == null || url.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( relation, url); } public String fhirType() { @@ -672,10 +670,12 @@ public class Bundle extends Resource implements IBaseBundle { protected List link; /** - * The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. + * The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: +* fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) +* Results from operations might involve resources that are not identified. */ @Child(name = "fullUrl", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Absolute URL for resource (server address, or UUID/OID)", formalDefinition="The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource." ) + @Description(shortDefinition="Absolute URL for resource (server address, or UUID/OID)", formalDefinition="The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: \n* fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle)\n* Results from operations might involve resources that are not identified." ) protected UriType fullUrl; /** @@ -756,7 +756,9 @@ public class Bundle extends Resource implements IBaseBundle { } /** - * @return {@link #fullUrl} (The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource.). This is the underlying object with id, value and extensions. The accessor "getFullUrl" gives direct access to the value + * @return {@link #fullUrl} (The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: +* fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) +* Results from operations might involve resources that are not identified.). This is the underlying object with id, value and extensions. The accessor "getFullUrl" gives direct access to the value */ public UriType getFullUrlElement() { if (this.fullUrl == null) @@ -776,7 +778,9 @@ public class Bundle extends Resource implements IBaseBundle { } /** - * @param value {@link #fullUrl} (The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource.). This is the underlying object with id, value and extensions. The accessor "getFullUrl" gives direct access to the value + * @param value {@link #fullUrl} (The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: +* fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) +* Results from operations might involve resources that are not identified.). This is the underlying object with id, value and extensions. The accessor "getFullUrl" gives direct access to the value */ public BundleEntryComponent setFullUrlElement(UriType value) { this.fullUrl = value; @@ -784,14 +788,18 @@ public class Bundle extends Resource implements IBaseBundle { } /** - * @return The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. + * @return The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: +* fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) +* Results from operations might involve resources that are not identified. */ public String getFullUrl() { return this.fullUrl == null ? null : this.fullUrl.getValue(); } /** - * @param value The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. + * @param value The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: +* fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) +* Results from operations might involve resources that are not identified. */ public BundleEntryComponent setFullUrl(String value) { if (Utilities.noString(value)) @@ -945,7 +953,7 @@ public class Bundle extends Resource implements IBaseBundle { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("link", "@Bundle.link", "A series of links that provide context to this entry.", 0, java.lang.Integer.MAX_VALUE, link)); - childrenList.add(new Property("fullUrl", "uri", "The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource.", 0, java.lang.Integer.MAX_VALUE, fullUrl)); + childrenList.add(new Property("fullUrl", "uri", "The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: \n* fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle)\n* Results from operations might involve resources that are not identified.", 0, java.lang.Integer.MAX_VALUE, fullUrl)); childrenList.add(new Property("resource", "Resource", "The Resources for the entry.", 0, java.lang.Integer.MAX_VALUE, resource)); childrenList.add(new Property("search", "", "Information about the search process that lead to the creation of this entry.", 0, java.lang.Integer.MAX_VALUE, search)); childrenList.add(new Property("request", "", "Additional information about how this entry should be processed as part of a transaction.", 0, java.lang.Integer.MAX_VALUE, request)); @@ -1036,9 +1044,8 @@ public class Bundle extends Resource implements IBaseBundle { } public boolean isEmpty() { - return super.isEmpty() && (link == null || link.isEmpty()) && (fullUrl == null || fullUrl.isEmpty()) - && (resource == null || resource.isEmpty()) && (search == null || search.isEmpty()) && (request == null || request.isEmpty()) - && (response == null || response.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( link, fullUrl, resource, search + , request, response); } public String fhirType() { @@ -1246,8 +1253,7 @@ public class Bundle extends Resource implements IBaseBundle { } public boolean isEmpty() { - return super.isEmpty() && (mode == null || mode.isEmpty()) && (score == null || score.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mode, score); } public String fhirType() { @@ -1260,10 +1266,10 @@ public class Bundle extends Resource implements IBaseBundle { @Block() public static class BundleEntryRequestComponent extends BackboneElement implements IBaseBackboneElement { /** - * The HTTP verb for this entry in either a update history, or a transaction/ transaction response. + * The HTTP verb for this entry in either a change history, or a transaction/ transaction response. */ @Child(name = "method", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="GET | POST | PUT | DELETE", formalDefinition="The HTTP verb for this entry in either a update history, or a transaction/ transaction response." ) + @Description(shortDefinition="GET | POST | PUT | DELETE", formalDefinition="The HTTP verb for this entry in either a change history, or a transaction/ transaction response." ) protected Enumeration method; /** @@ -1320,7 +1326,7 @@ public class Bundle extends Resource implements IBaseBundle { } /** - * @return {@link #method} (The HTTP verb for this entry in either a update history, or a transaction/ transaction response.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value + * @return {@link #method} (The HTTP verb for this entry in either a change history, or a transaction/ transaction response.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value */ public Enumeration getMethodElement() { if (this.method == null) @@ -1340,7 +1346,7 @@ public class Bundle extends Resource implements IBaseBundle { } /** - * @param value {@link #method} (The HTTP verb for this entry in either a update history, or a transaction/ transaction response.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value + * @param value {@link #method} (The HTTP verb for this entry in either a change history, or a transaction/ transaction response.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value */ public BundleEntryRequestComponent setMethodElement(Enumeration value) { this.method = value; @@ -1348,14 +1354,14 @@ public class Bundle extends Resource implements IBaseBundle { } /** - * @return The HTTP verb for this entry in either a update history, or a transaction/ transaction response. + * @return The HTTP verb for this entry in either a change history, or a transaction/ transaction response. */ public HTTPVerb getMethod() { return this.method == null ? null : this.method.getValue(); } /** - * @param value The HTTP verb for this entry in either a update history, or a transaction/ transaction response. + * @param value The HTTP verb for this entry in either a change history, or a transaction/ transaction response. */ public BundleEntryRequestComponent setMethod(HTTPVerb value) { if (this.method == null) @@ -1607,7 +1613,7 @@ public class Bundle extends Resource implements IBaseBundle { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("method", "code", "The HTTP verb for this entry in either a update history, or a transaction/ transaction response.", 0, java.lang.Integer.MAX_VALUE, method)); + childrenList.add(new Property("method", "code", "The HTTP verb for this entry in either a change history, or a transaction/ transaction response.", 0, java.lang.Integer.MAX_VALUE, method)); childrenList.add(new Property("url", "uri", "The URL for this entry, relative to the root (the address to which the request is posted).", 0, java.lang.Integer.MAX_VALUE, url)); childrenList.add(new Property("ifNoneMatch", "string", "If the ETag values match, return a 304 Not modified status. See the API documentation for [\"Conditional Read\"](http.html#cread).", 0, java.lang.Integer.MAX_VALUE, ifNoneMatch)); childrenList.add(new Property("ifModifiedSince", "instant", "Only perform the operation if the last updated date matches. See the API documentation for [\"Conditional Read\"](http.html#cread).", 0, java.lang.Integer.MAX_VALUE, ifModifiedSince)); @@ -1694,10 +1700,8 @@ public class Bundle extends Resource implements IBaseBundle { } public boolean isEmpty() { - return super.isEmpty() && (method == null || method.isEmpty()) && (url == null || url.isEmpty()) - && (ifNoneMatch == null || ifNoneMatch.isEmpty()) && (ifModifiedSince == null || ifModifiedSince.isEmpty()) - && (ifMatch == null || ifMatch.isEmpty()) && (ifNoneExist == null || ifNoneExist.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( method, url, ifNoneMatch, ifModifiedSince + , ifMatch, ifNoneExist); } public String fhirType() { @@ -1710,10 +1714,10 @@ public class Bundle extends Resource implements IBaseBundle { @Block() public static class BundleEntryResponseComponent extends BackboneElement implements IBaseBackboneElement { /** - * The status code returned by processing this entry. + * The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code. */ @Child(name = "status", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Status return code for entry", formalDefinition="The status code returned by processing this entry." ) + @Description(shortDefinition="Status response code (text optional)", formalDefinition="The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code." ) protected StringType status; /** @@ -1755,7 +1759,7 @@ public class Bundle extends Resource implements IBaseBundle { } /** - * @return {@link #status} (The status code returned by processing this entry.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + * @return {@link #status} (The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value */ public StringType getStatusElement() { if (this.status == null) @@ -1775,7 +1779,7 @@ public class Bundle extends Resource implements IBaseBundle { } /** - * @param value {@link #status} (The status code returned by processing this entry.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + * @param value {@link #status} (The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value */ public BundleEntryResponseComponent setStatusElement(StringType value) { this.status = value; @@ -1783,14 +1787,14 @@ public class Bundle extends Resource implements IBaseBundle { } /** - * @return The status code returned by processing this entry. + * @return The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code. */ public String getStatus() { return this.status == null ? null : this.status.getValue(); } /** - * @param value The status code returned by processing this entry. + * @param value The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code. */ public BundleEntryResponseComponent setStatus(String value) { if (this.status == null) @@ -1948,7 +1952,7 @@ public class Bundle extends Resource implements IBaseBundle { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("status", "string", "The status code returned by processing this entry.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("status", "string", "The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("location", "uri", "The location header created by processing this operation.", 0, java.lang.Integer.MAX_VALUE, location)); childrenList.add(new Property("etag", "string", "The etag for the resource, it the operation for the entry produced a versioned resource.", 0, java.lang.Integer.MAX_VALUE, etag)); childrenList.add(new Property("lastModified", "instant", "The date/time that the resource was modified on the server.", 0, java.lang.Integer.MAX_VALUE, lastModified)); @@ -2019,8 +2023,8 @@ public class Bundle extends Resource implements IBaseBundle { } public boolean isEmpty() { - return super.isEmpty() && (status == null || status.isEmpty()) && (location == null || location.isEmpty()) - && (etag == null || etag.isEmpty()) && (lastModified == null || lastModified.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( status, location, etag, lastModified + ); } public String fhirType() { @@ -2420,9 +2424,8 @@ public class Bundle extends Resource implements IBaseBundle { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (total == null || total.isEmpty()) - && (link == null || link.isEmpty()) && (entry == null || entry.isEmpty()) && (signature == null || signature.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, total, link, entry, signature + ); } @Override @@ -2438,7 +2441,7 @@ public class Bundle extends Resource implements IBaseBundle { * Path: Bundle.entry.resource(0)
*

*/ - @SearchParamDefinition(name="composition", path="Bundle.entry.resource.item(0)", description="The first resource in the bundle, if the bundle type is \"document\" - this is a composition, and this parameter provides access to searches its contents", type="reference" ) + @SearchParamDefinition(name="composition", path="Bundle.entry.resource[0]", description="The first resource in the bundle, if the bundle type is \"document\" - this is a composition, and this parameter provides access to searches its contents", type="reference" ) public static final String SP_COMPOSITION = "composition"; /** * Fluent Client search parameter constant for composition @@ -2484,7 +2487,7 @@ public class Bundle extends Resource implements IBaseBundle { * Path: Bundle.entry.resource(0)
*

*/ - @SearchParamDefinition(name="message", path="Bundle.entry.resource.item(0)", description="The first resource in the bundle, if the bundle type is \"message\" - this is a message header, and this parameter provides access to search its contents", type="reference" ) + @SearchParamDefinition(name="message", path="Bundle.entry.resource[0]", description="The first resource in the bundle, if the bundle type is \"message\" - this is a message header, and this parameter provides access to search its contents", type="reference" ) public static final String SP_MESSAGE = "message"; /** * Fluent Client search parameter constant for message diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CarePlan.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CarePlan.java index d118deefb77..d78974936f9 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CarePlan.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CarePlan.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions. */ @@ -626,8 +625,7 @@ public class CarePlan extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (plan == null || plan.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, plan); } public String fhirType() { @@ -789,8 +787,7 @@ public class CarePlan extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (role == null || role.isEmpty()) && (member == null || member.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( role, member); } public String fhirType() { @@ -1083,8 +1080,8 @@ public class CarePlan extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (actionResulting == null || actionResulting.isEmpty()) && (progress == null || progress.isEmpty()) - && (reference == null || reference.isEmpty()) && (detail == null || detail.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( actionResulting, progress, reference + , detail); } public String fhirType() { @@ -2049,14 +2046,9 @@ public class CarePlan extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (category == null || category.isEmpty()) && (code == null || code.isEmpty()) - && (reasonCode == null || reasonCode.isEmpty()) && (reasonReference == null || reasonReference.isEmpty()) - && (goal == null || goal.isEmpty()) && (status == null || status.isEmpty()) && (statusReason == null || statusReason.isEmpty()) - && (prohibited == null || prohibited.isEmpty()) && (scheduled == null || scheduled.isEmpty()) - && (location == null || location.isEmpty()) && (performer == null || performer.isEmpty()) - && (product == null || product.isEmpty()) && (dailyAmount == null || dailyAmount.isEmpty()) - && (quantity == null || quantity.isEmpty()) && (description == null || description.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( category, code, reasonCode, reasonReference + , goal, status, statusReason, prohibited, scheduled, location, performer, product, dailyAmount + , quantity, description); } public String fhirType() { @@ -3124,13 +3116,9 @@ public class CarePlan extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (subject == null || subject.isEmpty()) - && (status == null || status.isEmpty()) && (context == null || context.isEmpty()) && (period == null || period.isEmpty()) - && (author == null || author.isEmpty()) && (modified == null || modified.isEmpty()) && (category == null || category.isEmpty()) - && (description == null || description.isEmpty()) && (addresses == null || addresses.isEmpty()) - && (support == null || support.isEmpty()) && (relatedPlan == null || relatedPlan.isEmpty()) - && (participant == null || participant.isEmpty()) && (goal == null || goal.isEmpty()) && (activity == null || activity.isEmpty()) - && (note == null || note.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, subject, status, context + , period, author, modified, category, description, addresses, support, relatedPlan, participant + , goal, activity, note); } @Override @@ -3232,7 +3220,7 @@ public class CarePlan extends DomainResource { * Path: CarePlan.activity.detail.performer
*

*/ - @SearchParamDefinition(name="performer", path="CarePlan.activity.detail.performer", description="Matches if the practitioner is listed as a performer in any of the \"simple\" activities. (For performers of the detailed activities, chain through the activitydetail search parameter.)", type="reference" ) + @SearchParamDefinition(name="performer", path="CarePlan.activity.detail.performer", description="Matches if the practitioner is listed as a performer in any of the \"simple\" activities. (For performers of the detailed activities, chain through the activitydetail search parameter.)", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_PERFORMER = "performer"; /** * Fluent Client search parameter constant for performer @@ -3330,7 +3318,7 @@ public class CarePlan extends DomainResource { * Path: CarePlan.participant.member
*

*/ - @SearchParamDefinition(name="participant", path="CarePlan.participant.member", description="Who is involved", type="reference" ) + @SearchParamDefinition(name="participant", path="CarePlan.participant.member", description="Who is involved", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_PARTICIPANT = "participant"; /** * Fluent Client search parameter constant for participant @@ -3428,7 +3416,7 @@ public class CarePlan extends DomainResource { * Path: CarePlan.subject
*

*/ - @SearchParamDefinition(name="patient", path="CarePlan.subject", description="Who care plan is for", type="reference" ) + @SearchParamDefinition(name="patient", path="CarePlan.subject", description="Who care plan is for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CareTeam.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CareTeam.java new file mode 100644 index 00000000000..a0ca6588e7b --- /dev/null +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CareTeam.java @@ -0,0 +1,923 @@ +package org.hl7.fhir.dstu3.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; +/** + * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient. + */ +@ResourceDef(name="CareTeam", profile="http://hl7.org/fhir/Profile/CareTeam") +public class CareTeam extends DomainResource { + + @Block() + public static class CareTeamParticipantComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Indicates specific responsibility of an individual within the care team, such as "Primary physician", "Team coordinator", "Caregiver", etc. + */ + @Child(name = "role", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type of involvement", formalDefinition="Indicates specific responsibility of an individual within the care team, such as \"Primary physician\", \"Team coordinator\", \"Caregiver\", etc." ) + protected CodeableConcept role; + + /** + * The specific person or organization who is participating/expected to participate in the care team. + */ + @Child(name = "member", type = {Practitioner.class, RelatedPerson.class, Patient.class, Organization.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who is involved", formalDefinition="The specific person or organization who is participating/expected to participate in the care team." ) + protected Reference member; + + /** + * The actual object that is the target of the reference (The specific person or organization who is participating/expected to participate in the care team.) + */ + protected Resource memberTarget; + + /** + * Indicates when the specific member or organization did (or is intended to) come into effect and end. + */ + @Child(name = "period", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Time period of participant", formalDefinition="Indicates when the specific member or organization did (or is intended to) come into effect and end." ) + protected Period period; + + private static final long serialVersionUID = -1416929603L; + + /** + * Constructor + */ + public CareTeamParticipantComponent() { + super(); + } + + /** + * @return {@link #role} (Indicates specific responsibility of an individual within the care team, such as "Primary physician", "Team coordinator", "Caregiver", etc.) + */ + public CodeableConcept getRole() { + if (this.role == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CareTeamParticipantComponent.role"); + else if (Configuration.doAutoCreate()) + this.role = new CodeableConcept(); // cc + return this.role; + } + + public boolean hasRole() { + return this.role != null && !this.role.isEmpty(); + } + + /** + * @param value {@link #role} (Indicates specific responsibility of an individual within the care team, such as "Primary physician", "Team coordinator", "Caregiver", etc.) + */ + public CareTeamParticipantComponent setRole(CodeableConcept value) { + this.role = value; + return this; + } + + /** + * @return {@link #member} (The specific person or organization who is participating/expected to participate in the care team.) + */ + public Reference getMember() { + if (this.member == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CareTeamParticipantComponent.member"); + else if (Configuration.doAutoCreate()) + this.member = new Reference(); // cc + return this.member; + } + + public boolean hasMember() { + return this.member != null && !this.member.isEmpty(); + } + + /** + * @param value {@link #member} (The specific person or organization who is participating/expected to participate in the care team.) + */ + public CareTeamParticipantComponent setMember(Reference value) { + this.member = value; + return this; + } + + /** + * @return {@link #member} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The specific person or organization who is participating/expected to participate in the care team.) + */ + public Resource getMemberTarget() { + return this.memberTarget; + } + + /** + * @param value {@link #member} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The specific person or organization who is participating/expected to participate in the care team.) + */ + public CareTeamParticipantComponent setMemberTarget(Resource value) { + this.memberTarget = value; + return this; + } + + /** + * @return {@link #period} (Indicates when the specific member or organization did (or is intended to) come into effect and end.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CareTeamParticipantComponent.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (Indicates when the specific member or organization did (or is intended to) come into effect and end.) + */ + public CareTeamParticipantComponent setPeriod(Period value) { + this.period = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("role", "CodeableConcept", "Indicates specific responsibility of an individual within the care team, such as \"Primary physician\", \"Team coordinator\", \"Caregiver\", etc.", 0, java.lang.Integer.MAX_VALUE, role)); + childrenList.add(new Property("member", "Reference(Practitioner|RelatedPerson|Patient|Organization)", "The specific person or organization who is participating/expected to participate in the care team.", 0, java.lang.Integer.MAX_VALUE, member)); + childrenList.add(new Property("period", "Period", "Indicates when the specific member or organization did (or is intended to) come into effect and end.", 0, java.lang.Integer.MAX_VALUE, period)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("role")) + this.role = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("member")) + this.member = castToReference(value); // Reference + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("role")) { + this.role = new CodeableConcept(); + return this.role; + } + else if (name.equals("member")) { + this.member = new Reference(); + return this.member; + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else + return super.addChild(name); + } + + public CareTeamParticipantComponent copy() { + CareTeamParticipantComponent dst = new CareTeamParticipantComponent(); + copyValues(dst); + dst.role = role == null ? null : role.copy(); + dst.member = member == null ? null : member.copy(); + dst.period = period == null ? null : period.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CareTeamParticipantComponent)) + return false; + CareTeamParticipantComponent o = (CareTeamParticipantComponent) other; + return compareDeep(role, o.role, true) && compareDeep(member, o.member, true) && compareDeep(period, o.period, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CareTeamParticipantComponent)) + return false; + CareTeamParticipantComponent o = (CareTeamParticipantComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( role, member, period); + } + + public String fhirType() { + return "CareTeam.participant"; + + } + + } + + /** + * This records identifiers associated with this care team that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="External Ids for this team", formalDefinition="This records identifiers associated with this care team that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate." ) + protected List identifier; + + /** + * Indicates whether the care team is currently active, suspended, inactive, or entered in error. + */ + @Child(name = "status", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="active | suspended | inactive | entered in error", formalDefinition="Indicates whether the care team is currently active, suspended, inactive, or entered in error." ) + protected CodeableConcept status; + + /** + * Identifies what kind of team. This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Type of team", formalDefinition="Identifies what kind of team. This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team." ) + protected List type; + + /** + * Name of the care team. + */ + @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the team, such as crisis assessment team", formalDefinition="Name of the care team." ) + protected StringType name; + + /** + * Identifies the patient or group whose intended care is handled by the team. + */ + @Child(name = "subject", type = {Patient.class, Group.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who care team is for", formalDefinition="Identifies the patient or group whose intended care is handled by the team." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (Identifies the patient or group whose intended care is handled by the team.) + */ + protected Resource subjectTarget; + + /** + * Indicates when the team did (or is intended to) come into effect and end. + */ + @Child(name = "period", type = {Period.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Time period team covers", formalDefinition="Indicates when the team did (or is intended to) come into effect and end." ) + protected Period period; + + /** + * Identifies all people and organizations who are expected to be involved in the care team. + */ + @Child(name = "participant", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Members of the team", formalDefinition="Identifies all people and organizations who are expected to be involved in the care team." ) + protected List participant; + + /** + * The organization responsible for the care team. + */ + @Child(name = "managingOrganization", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Organization responsible for the care team", formalDefinition="The organization responsible for the care team." ) + protected Reference managingOrganization; + + /** + * The actual object that is the target of the reference (The organization responsible for the care team.) + */ + protected Organization managingOrganizationTarget; + + private static final long serialVersionUID = -917605050L; + + /** + * Constructor + */ + public CareTeam() { + super(); + } + + /** + * @return {@link #identifier} (This records identifiers associated with this care team that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (This records identifiers associated with this care team that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public CareTeam addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #status} (Indicates whether the care team is currently active, suspended, inactive, or entered in error.) + */ + public CodeableConcept getStatus() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CareTeam.status"); + else if (Configuration.doAutoCreate()) + this.status = new CodeableConcept(); // cc + return this.status; + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (Indicates whether the care team is currently active, suspended, inactive, or entered in error.) + */ + public CareTeam setStatus(CodeableConcept value) { + this.status = value; + return this; + } + + /** + * @return {@link #type} (Identifies what kind of team. This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team.) + */ + public List getType() { + if (this.type == null) + this.type = new ArrayList(); + return this.type; + } + + public boolean hasType() { + if (this.type == null) + return false; + for (CodeableConcept item : this.type) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #type} (Identifies what kind of team. This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team.) + */ + // syntactic sugar + public CodeableConcept addType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return t; + } + + // syntactic sugar + public CareTeam addType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.type == null) + this.type = new ArrayList(); + this.type.add(t); + return this; + } + + /** + * @return {@link #name} (Name of the care team.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CareTeam.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Name of the care team.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public CareTeam setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return Name of the care team. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Name of the care team. + */ + public CareTeam setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #subject} (Identifies the patient or group whose intended care is handled by the team.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CareTeam.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (Identifies the patient or group whose intended care is handled by the team.) + */ + public CareTeam setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the patient or group whose intended care is handled by the team.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the patient or group whose intended care is handled by the team.) + */ + public CareTeam setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #period} (Indicates when the team did (or is intended to) come into effect and end.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CareTeam.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (Indicates when the team did (or is intended to) come into effect and end.) + */ + public CareTeam setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #participant} (Identifies all people and organizations who are expected to be involved in the care team.) + */ + public List getParticipant() { + if (this.participant == null) + this.participant = new ArrayList(); + return this.participant; + } + + public boolean hasParticipant() { + if (this.participant == null) + return false; + for (CareTeamParticipantComponent item : this.participant) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #participant} (Identifies all people and organizations who are expected to be involved in the care team.) + */ + // syntactic sugar + public CareTeamParticipantComponent addParticipant() { //3 + CareTeamParticipantComponent t = new CareTeamParticipantComponent(); + if (this.participant == null) + this.participant = new ArrayList(); + this.participant.add(t); + return t; + } + + // syntactic sugar + public CareTeam addParticipant(CareTeamParticipantComponent t) { //3 + if (t == null) + return this; + if (this.participant == null) + this.participant = new ArrayList(); + this.participant.add(t); + return this; + } + + /** + * @return {@link #managingOrganization} (The organization responsible for the care team.) + */ + public Reference getManagingOrganization() { + if (this.managingOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CareTeam.managingOrganization"); + else if (Configuration.doAutoCreate()) + this.managingOrganization = new Reference(); // cc + return this.managingOrganization; + } + + public boolean hasManagingOrganization() { + return this.managingOrganization != null && !this.managingOrganization.isEmpty(); + } + + /** + * @param value {@link #managingOrganization} (The organization responsible for the care team.) + */ + public CareTeam setManagingOrganization(Reference value) { + this.managingOrganization = value; + return this; + } + + /** + * @return {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization responsible for the care team.) + */ + public Organization getManagingOrganizationTarget() { + if (this.managingOrganizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CareTeam.managingOrganization"); + else if (Configuration.doAutoCreate()) + this.managingOrganizationTarget = new Organization(); // aa + return this.managingOrganizationTarget; + } + + /** + * @param value {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization responsible for the care team.) + */ + public CareTeam setManagingOrganizationTarget(Organization value) { + this.managingOrganizationTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this care team that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("status", "CodeableConcept", "Indicates whether the care team is currently active, suspended, inactive, or entered in error.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("type", "CodeableConcept", "Identifies what kind of team. This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("name", "string", "Name of the care team.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("subject", "Reference(Patient|Group)", "Identifies the patient or group whose intended care is handled by the team.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("period", "Period", "Indicates when the team did (or is intended to) come into effect and end.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("participant", "", "Identifies all people and organizations who are expected to be involved in the care team.", 0, java.lang.Integer.MAX_VALUE, participant)); + childrenList.add(new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the care team.", 0, java.lang.Integer.MAX_VALUE, managingOrganization)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("status")) + this.status = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("type")) + this.getType().add(castToCodeableConcept(value)); + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("participant")) + this.getParticipant().add((CareTeamParticipantComponent) value); + else if (name.equals("managingOrganization")) + this.managingOrganization = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("status")) { + this.status = new CodeableConcept(); + return this.status; + } + else if (name.equals("type")) { + return addType(); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type CareTeam.name"); + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("participant")) { + return addParticipant(); + } + else if (name.equals("managingOrganization")) { + this.managingOrganization = new Reference(); + return this.managingOrganization; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "CareTeam"; + + } + + public CareTeam copy() { + CareTeam dst = new CareTeam(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.status = status == null ? null : status.copy(); + if (type != null) { + dst.type = new ArrayList(); + for (CodeableConcept i : type) + dst.type.add(i.copy()); + }; + dst.name = name == null ? null : name.copy(); + dst.subject = subject == null ? null : subject.copy(); + dst.period = period == null ? null : period.copy(); + if (participant != null) { + dst.participant = new ArrayList(); + for (CareTeamParticipantComponent i : participant) + dst.participant.add(i.copy()); + }; + dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy(); + return dst; + } + + protected CareTeam typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CareTeam)) + return false; + CareTeam o = (CareTeam) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(type, o.type, true) + && compareDeep(name, o.name, true) && compareDeep(subject, o.subject, true) && compareDeep(period, o.period, true) + && compareDeep(participant, o.participant, true) && compareDeep(managingOrganization, o.managingOrganization, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CareTeam)) + return false; + CareTeam o = (CareTeam) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, type, name + , subject, period, participant, managingOrganization); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.CareTeam; + } + + /** + * Search parameter: date + *

+ * Description: Time period team covers
+ * Type: date
+ * Path: CareTeam.period
+ *

+ */ + @SearchParamDefinition(name="date", path="CareTeam.period", description="Time period team covers", type="date" ) + public static final String SP_DATE = "date"; + /** + * Fluent Client search parameter constant for date + *

+ * Description: Time period team covers
+ * Type: date
+ * Path: CareTeam.period
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); + + /** + * Search parameter: identifier + *

+ * Description: External Ids for this team
+ * Type: token
+ * Path: CareTeam.identifier
+ *

+ */ + @SearchParamDefinition(name="identifier", path="CareTeam.identifier", description="External Ids for this team", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + /** + * Fluent Client search parameter constant for identifier + *

+ * Description: External Ids for this team
+ * Type: token
+ * Path: CareTeam.identifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); + + /** + * Search parameter: patient + *

+ * Description: Who care team is for
+ * Type: reference
+ * Path: CareTeam.subject
+ *

+ */ + @SearchParamDefinition(name="patient", path="CareTeam.subject", description="Who care team is for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) + public static final String SP_PATIENT = "patient"; + /** + * Fluent Client search parameter constant for patient + *

+ * Description: Who care team is for
+ * Type: reference
+ * Path: CareTeam.subject
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "CareTeam:patient". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("CareTeam:patient").toLocked(); + + /** + * Search parameter: subject + *

+ * Description: Who care team is for
+ * Type: reference
+ * Path: CareTeam.subject
+ *

+ */ + @SearchParamDefinition(name="subject", path="CareTeam.subject", description="Who care team is for", type="reference" ) + public static final String SP_SUBJECT = "subject"; + /** + * Fluent Client search parameter constant for subject + *

+ * Description: Who care team is for
+ * Type: reference
+ * Path: CareTeam.subject
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "CareTeam:subject". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("CareTeam:subject").toLocked(); + + /** + * Search parameter: type + *

+ * Description: Type of team
+ * Type: token
+ * Path: CareTeam.type
+ *

+ */ + @SearchParamDefinition(name="type", path="CareTeam.type", description="Type of team", type="token" ) + public static final String SP_TYPE = "type"; + /** + * Fluent Client search parameter constant for type + *

+ * Description: Type of team
+ * Type: token
+ * Path: CareTeam.type
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); + + /** + * Search parameter: participant + *

+ * Description: Who is involved
+ * Type: reference
+ * Path: CareTeam.participant.member
+ *

+ */ + @SearchParamDefinition(name="participant", path="CareTeam.participant.member", description="Who is involved", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) + public static final String SP_PARTICIPANT = "participant"; + /** + * Fluent Client search parameter constant for participant + *

+ * Description: Who is involved
+ * Type: reference
+ * Path: CareTeam.participant.member
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARTICIPANT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARTICIPANT); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "CareTeam:participant". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTICIPANT = new ca.uhn.fhir.model.api.Include("CareTeam:participant").toLocked(); + + /** + * Search parameter: status + *

+ * Description: active | suspended | inactive | entered in error
+ * Type: token
+ * Path: CareTeam.status
+ *

+ */ + @SearchParamDefinition(name="status", path="CareTeam.status", description="active | suspended | inactive | entered in error", type="token" ) + public static final String SP_STATUS = "status"; + /** + * Fluent Client search parameter constant for status + *

+ * Description: active | suspended | inactive | entered in error
+ * Type: token
+ * Path: CareTeam.status
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); + + +} + diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Claim.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Claim.java index df6d3449f2e..c0d346264b0 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Claim.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Claim.java @@ -29,22 +29,20 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import java.math.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery. */ @@ -305,52 +303,231 @@ public class Claim extends DomainResource { } } + @Block() + public static class RelatedClaimsComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Other claims which are related to this claim such as prior claim versions or for related services. + */ + @Child(name = "claim", type = {Identifier.class, Claim.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reference to the related claim", formalDefinition="Other claims which are related to this claim such as prior claim versions or for related services." ) + protected Type claim; + + /** + * For example prior or umbrella. + */ + @Child(name = "relationship", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="How the reference claim is related", formalDefinition="For example prior or umbrella." ) + protected Coding relationship; + + /** + * An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # . + */ + @Child(name = "reference", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Related file or case reference", formalDefinition="An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # ." ) + protected Identifier reference; + + private static final long serialVersionUID = -2033217402L; + + /** + * Constructor + */ + public RelatedClaimsComponent() { + super(); + } + + /** + * @return {@link #claim} (Other claims which are related to this claim such as prior claim versions or for related services.) + */ + public Type getClaim() { + return this.claim; + } + + /** + * @return {@link #claim} (Other claims which are related to this claim such as prior claim versions or for related services.) + */ + public Identifier getClaimIdentifier() throws FHIRException { + if (!(this.claim instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.claim.getClass().getName()+" was encountered"); + return (Identifier) this.claim; + } + + public boolean hasClaimIdentifier() { + return this.claim instanceof Identifier; + } + + /** + * @return {@link #claim} (Other claims which are related to this claim such as prior claim versions or for related services.) + */ + public Reference getClaimReference() throws FHIRException { + if (!(this.claim instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.claim.getClass().getName()+" was encountered"); + return (Reference) this.claim; + } + + public boolean hasClaimReference() { + return this.claim instanceof Reference; + } + + public boolean hasClaim() { + return this.claim != null && !this.claim.isEmpty(); + } + + /** + * @param value {@link #claim} (Other claims which are related to this claim such as prior claim versions or for related services.) + */ + public RelatedClaimsComponent setClaim(Type value) { + this.claim = value; + return this; + } + + /** + * @return {@link #relationship} (For example prior or umbrella.) + */ + public Coding getRelationship() { + if (this.relationship == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RelatedClaimsComponent.relationship"); + else if (Configuration.doAutoCreate()) + this.relationship = new Coding(); // cc + return this.relationship; + } + + public boolean hasRelationship() { + return this.relationship != null && !this.relationship.isEmpty(); + } + + /** + * @param value {@link #relationship} (For example prior or umbrella.) + */ + public RelatedClaimsComponent setRelationship(Coding value) { + this.relationship = value; + return this; + } + + /** + * @return {@link #reference} (An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # .) + */ + public Identifier getReference() { + if (this.reference == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RelatedClaimsComponent.reference"); + else if (Configuration.doAutoCreate()) + this.reference = new Identifier(); // cc + return this.reference; + } + + public boolean hasReference() { + return this.reference != null && !this.reference.isEmpty(); + } + + /** + * @param value {@link #reference} (An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # .) + */ + public RelatedClaimsComponent setReference(Identifier value) { + this.reference = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("claim[x]", "Identifier|Reference(Claim)", "Other claims which are related to this claim such as prior claim versions or for related services.", 0, java.lang.Integer.MAX_VALUE, claim)); + childrenList.add(new Property("relationship", "Coding", "For example prior or umbrella.", 0, java.lang.Integer.MAX_VALUE, relationship)); + childrenList.add(new Property("reference", "Identifier", "An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # .", 0, java.lang.Integer.MAX_VALUE, reference)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("claim[x]")) + this.claim = (Type) value; // Type + else if (name.equals("relationship")) + this.relationship = castToCoding(value); // Coding + else if (name.equals("reference")) + this.reference = castToIdentifier(value); // Identifier + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("claimIdentifier")) { + this.claim = new Identifier(); + return this.claim; + } + else if (name.equals("claimReference")) { + this.claim = new Reference(); + return this.claim; + } + else if (name.equals("relationship")) { + this.relationship = new Coding(); + return this.relationship; + } + else if (name.equals("reference")) { + this.reference = new Identifier(); + return this.reference; + } + else + return super.addChild(name); + } + + public RelatedClaimsComponent copy() { + RelatedClaimsComponent dst = new RelatedClaimsComponent(); + copyValues(dst); + dst.claim = claim == null ? null : claim.copy(); + dst.relationship = relationship == null ? null : relationship.copy(); + dst.reference = reference == null ? null : reference.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof RelatedClaimsComponent)) + return false; + RelatedClaimsComponent o = (RelatedClaimsComponent) other; + return compareDeep(claim, o.claim, true) && compareDeep(relationship, o.relationship, true) && compareDeep(reference, o.reference, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof RelatedClaimsComponent)) + return false; + RelatedClaimsComponent o = (RelatedClaimsComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( claim, relationship, reference + ); + } + + public String fhirType() { + return "Claim.related"; + + } + + } + @Block() public static class PayeeComponent extends BackboneElement implements IBaseBackboneElement { /** - * Party to be reimbursed: Subscriber, provider, other. + * Type of Party to be reimbursed: Subscriber, provider, other. */ - @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Party to be paid any benefits payable", formalDefinition="Party to be reimbursed: Subscriber, provider, other." ) + @Child(name = "type", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type of party: Subscriber, Provider, other", formalDefinition="Type of Party to be reimbursed: Subscriber, provider, other." ) protected Coding type; /** - * The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned). + * Party to be reimbursed: Subscriber, provider, other. */ - @Child(name = "provider", type = {Practitioner.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Provider who is the payee", formalDefinition="The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference provider; + @Child(name = "party", type = {Identifier.class, Practitioner.class, Organization.class, Patient.class, RelatedPerson.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Party to receive the payable", formalDefinition="Party to be reimbursed: Subscriber, provider, other." ) + protected Type party; - /** - * The actual object that is the target of the reference (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Practitioner providerTarget; - - /** - * The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name = "organization", type = {Organization.class}, order=3, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Organization who is the payee", formalDefinition="The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Organization organizationTarget; - - /** - * The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name = "person", type = {Patient.class}, order=4, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Other person who is the payee", formalDefinition="The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference person; - - /** - * The actual object that is the target of the reference (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Patient personTarget; - - private static final long serialVersionUID = -503108488L; + private static final long serialVersionUID = 1304353420L; /** * Constructor @@ -359,8 +536,16 @@ public class Claim extends DomainResource { super(); } + /** + * Constructor + */ + public PayeeComponent(Coding type) { + super(); + this.type = type; + } + /** - * @return {@link #type} (Party to be reimbursed: Subscriber, provider, other.) + * @return {@link #type} (Type of Party to be reimbursed: Subscriber, provider, other.) */ public Coding getType() { if (this.type == null) @@ -376,7 +561,7 @@ public class Claim extends DomainResource { } /** - * @param value {@link #type} (Party to be reimbursed: Subscriber, provider, other.) + * @param value {@link #type} (Type of Party to be reimbursed: Subscriber, provider, other.) */ public PayeeComponent setType(Coding value) { this.type = value; @@ -384,155 +569,62 @@ public class Claim extends DomainResource { } /** - * @return {@link #provider} (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + * @return {@link #party} (Party to be reimbursed: Subscriber, provider, other.) */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); + public Type getParty() { + return this.party; } /** - * @param value {@link #provider} (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + * @return {@link #party} (Party to be reimbursed: Subscriber, provider, other.) */ - public PayeeComponent setProvider(Reference value) { - this.provider = value; - return this; + public Identifier getPartyIdentifier() throws FHIRException { + if (!(this.party instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.party.getClass().getName()+" was encountered"); + return (Identifier) this.party; + } + + public boolean hasPartyIdentifier() { + return this.party instanceof Identifier; } /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + * @return {@link #party} (Party to be reimbursed: Subscriber, provider, other.) */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; + public Reference getPartyReference() throws FHIRException { + if (!(this.party instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.party.getClass().getName()+" was encountered"); + return (Reference) this.party; + } + + public boolean hasPartyReference() { + return this.party instanceof Reference; + } + + public boolean hasParty() { + return this.party != null && !this.party.isEmpty(); } /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + * @param value {@link #party} (Party to be reimbursed: Subscriber, provider, other.) */ - public PayeeComponent setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #organization} (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; - } - - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #person} (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getPerson() { - if (this.person == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.person"); - else if (Configuration.doAutoCreate()) - this.person = new Reference(); // cc - return this.person; - } - - public boolean hasPerson() { - return this.person != null && !this.person.isEmpty(); - } - - /** - * @param value {@link #person} (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setPerson(Reference value) { - this.person = value; - return this; - } - - /** - * @return {@link #person} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Patient getPersonTarget() { - if (this.personTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.person"); - else if (Configuration.doAutoCreate()) - this.personTarget = new Patient(); // aa - return this.personTarget; - } - - /** - * @param value {@link #person} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setPersonTarget(Patient value) { - this.personTarget = value; + public PayeeComponent setParty(Type value) { + this.party = value; return this; } protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("type", "Coding", "Party to be reimbursed: Subscriber, provider, other.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("person", "Reference(Patient)", "The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, person)); + childrenList.add(new Property("type", "Coding", "Type of Party to be reimbursed: Subscriber, provider, other.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("party[x]", "Identifier|Reference(Practitioner|Organization|Patient|RelatedPerson)", "Party to be reimbursed: Subscriber, provider, other.", 0, java.lang.Integer.MAX_VALUE, party)); } @Override public void setProperty(String name, Base value) throws FHIRException { if (name.equals("type")) this.type = castToCoding(value); // Coding - else if (name.equals("provider")) - this.provider = castToReference(value); // Reference - else if (name.equals("organization")) - this.organization = castToReference(value); // Reference - else if (name.equals("person")) - this.person = castToReference(value); // Reference + else if (name.equals("party[x]")) + this.party = (Type) value; // Type else super.setProperty(name, value); } @@ -543,17 +635,13 @@ public class Claim extends DomainResource { this.type = new Coding(); return this.type; } - else if (name.equals("provider")) { - this.provider = new Reference(); - return this.provider; + else if (name.equals("partyIdentifier")) { + this.party = new Identifier(); + return this.party; } - else if (name.equals("organization")) { - this.organization = new Reference(); - return this.organization; - } - else if (name.equals("person")) { - this.person = new Reference(); - return this.person; + else if (name.equals("partyReference")) { + this.party = new Reference(); + return this.party; } else return super.addChild(name); @@ -563,9 +651,7 @@ public class Claim extends DomainResource { PayeeComponent dst = new PayeeComponent(); copyValues(dst); dst.type = type == null ? null : type.copy(); - dst.provider = provider == null ? null : provider.copy(); - dst.organization = organization == null ? null : organization.copy(); - dst.person = person == null ? null : person.copy(); + dst.party = party == null ? null : party.copy(); return dst; } @@ -576,8 +662,7 @@ public class Claim extends DomainResource { if (!(other instanceof PayeeComponent)) return false; PayeeComponent o = (PayeeComponent) other; - return compareDeep(type, o.type, true) && compareDeep(provider, o.provider, true) && compareDeep(organization, o.organization, true) - && compareDeep(person, o.person, true); + return compareDeep(type, o.type, true) && compareDeep(party, o.party, true); } @Override @@ -591,9 +676,7 @@ public class Claim extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (provider == null || provider.isEmpty()) - && (organization == null || organization.isEmpty()) && (person == null || person.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, party); } public String fhirType() { @@ -609,7 +692,7 @@ public class Claim extends DomainResource { * Sequence of diagnosis which serves to order and provide a link. */ @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Sequence of diagnosis", formalDefinition="Sequence of diagnosis which serves to order and provide a link." ) + @Description(shortDefinition="Number to covey order of diagnosis", formalDefinition="Sequence of diagnosis which serves to order and provide a link." ) protected PositiveIntType sequence; /** @@ -764,8 +847,7 @@ public class Claim extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (diagnosis == null || diagnosis.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequence, diagnosis); } public String fhirType() { @@ -773,6 +855,266 @@ public class Claim extends DomainResource { } + } + + @Block() + public static class ProcedureComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Sequence of procedures which serves to order and provide a link. + */ + @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Procedure sequence for reference", formalDefinition="Sequence of procedures which serves to order and provide a link." ) + protected PositiveIntType sequence; + + /** + * Date and optionally time the procedure was performed . + */ + @Child(name = "date", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the procedure was performed", formalDefinition="Date and optionally time the procedure was performed ." ) + protected DateTimeType date; + + /** + * The procedure code. + */ + @Child(name = "procedure", type = {Coding.class, Procedure.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Patient's list of procedures performed", formalDefinition="The procedure code." ) + protected Type procedure; + + private static final long serialVersionUID = 864307347L; + + /** + * Constructor + */ + public ProcedureComponent() { + super(); + } + + /** + * Constructor + */ + public ProcedureComponent(PositiveIntType sequence, Type procedure) { + super(); + this.sequence = sequence; + this.procedure = procedure; + } + + /** + * @return {@link #sequence} (Sequence of procedures which serves to order and provide a link.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public PositiveIntType getSequenceElement() { + if (this.sequence == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureComponent.sequence"); + else if (Configuration.doAutoCreate()) + this.sequence = new PositiveIntType(); // bb + return this.sequence; + } + + public boolean hasSequenceElement() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + public boolean hasSequence() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + /** + * @param value {@link #sequence} (Sequence of procedures which serves to order and provide a link.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public ProcedureComponent setSequenceElement(PositiveIntType value) { + this.sequence = value; + return this; + } + + /** + * @return Sequence of procedures which serves to order and provide a link. + */ + public int getSequence() { + return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); + } + + /** + * @param value Sequence of procedures which serves to order and provide a link. + */ + public ProcedureComponent setSequence(int value) { + if (this.sequence == null) + this.sequence = new PositiveIntType(); + this.sequence.setValue(value); + return this; + } + + /** + * @return {@link #date} (Date and optionally time the procedure was performed .). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureComponent.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (Date and optionally time the procedure was performed .). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public ProcedureComponent setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return Date and optionally time the procedure was performed . + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value Date and optionally time the procedure was performed . + */ + public ProcedureComponent setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #procedure} (The procedure code.) + */ + public Type getProcedure() { + return this.procedure; + } + + /** + * @return {@link #procedure} (The procedure code.) + */ + public Coding getProcedureCoding() throws FHIRException { + if (!(this.procedure instanceof Coding)) + throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.procedure.getClass().getName()+" was encountered"); + return (Coding) this.procedure; + } + + public boolean hasProcedureCoding() { + return this.procedure instanceof Coding; + } + + /** + * @return {@link #procedure} (The procedure code.) + */ + public Reference getProcedureReference() throws FHIRException { + if (!(this.procedure instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.procedure.getClass().getName()+" was encountered"); + return (Reference) this.procedure; + } + + public boolean hasProcedureReference() { + return this.procedure instanceof Reference; + } + + public boolean hasProcedure() { + return this.procedure != null && !this.procedure.isEmpty(); + } + + /** + * @param value {@link #procedure} (The procedure code.) + */ + public ProcedureComponent setProcedure(Type value) { + this.procedure = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("sequence", "positiveInt", "Sequence of procedures which serves to order and provide a link.", 0, java.lang.Integer.MAX_VALUE, sequence)); + childrenList.add(new Property("date", "dateTime", "Date and optionally time the procedure was performed .", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("procedure[x]", "Coding|Reference(Procedure)", "The procedure code.", 0, java.lang.Integer.MAX_VALUE, procedure)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("sequence")) + this.sequence = castToPositiveInt(value); // PositiveIntType + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("procedure[x]")) + this.procedure = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sequence")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.sequence"); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type Claim.date"); + } + else if (name.equals("procedureCoding")) { + this.procedure = new Coding(); + return this.procedure; + } + else if (name.equals("procedureReference")) { + this.procedure = new Reference(); + return this.procedure; + } + else + return super.addChild(name); + } + + public ProcedureComponent copy() { + ProcedureComponent dst = new ProcedureComponent(); + copyValues(dst); + dst.sequence = sequence == null ? null : sequence.copy(); + dst.date = date == null ? null : date.copy(); + dst.procedure = procedure == null ? null : procedure.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ProcedureComponent)) + return false; + ProcedureComponent o = (ProcedureComponent) other; + return compareDeep(sequence, o.sequence, true) && compareDeep(date, o.date, true) && compareDeep(procedure, o.procedure, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ProcedureComponent)) + return false; + ProcedureComponent o = (ProcedureComponent) other; + return compareValues(sequence, o.sequence, true) && compareValues(date, o.date, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequence, date, procedure); + } + + public String fhirType() { + return "Claim.procedure"; + + } + } @Block() @@ -794,14 +1136,9 @@ public class Claim extends DomainResource { /** * Reference to the program or plan identification, underwriter or payor. */ - @Child(name = "coverage", type = {Coverage.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Child(name = "coverage", type = {Identifier.class, Coverage.class}, order=3, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Insurance information", formalDefinition="Reference to the program or plan identification, underwriter or payor." ) - protected Reference coverage; - - /** - * The actual object that is the target of the reference (Reference to the program or plan identification, underwriter or payor.) - */ - protected Coverage coverageTarget; + protected Type coverage; /** * The contract number of a business agreement which describes the terms and conditions. @@ -810,24 +1147,17 @@ public class Claim extends DomainResource { @Description(shortDefinition="Business agreement", formalDefinition="The contract number of a business agreement which describes the terms and conditions." ) protected StringType businessArrangement; - /** - * The relationship of the patient to the subscriber. - */ - @Child(name = "relationship", type = {Coding.class}, order=5, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Patient relationship to subscriber", formalDefinition="The relationship of the patient to the subscriber." ) - protected Coding relationship; - /** * A list of references from the Insurer to which these services pertain. */ - @Child(name = "preAuthRef", type = {StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "preAuthRef", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Pre-Authorization/Determination Reference", formalDefinition="A list of references from the Insurer to which these services pertain." ) protected List preAuthRef; /** * The Coverages adjudication details. */ - @Child(name = "claimResponse", type = {ClaimResponse.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "claimResponse", type = {ClaimResponse.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Adjudication results", formalDefinition="The Coverages adjudication details." ) protected Reference claimResponse; @@ -839,11 +1169,11 @@ public class Claim extends DomainResource { /** * The style (standard) and version of the original material which was converted into this resource. */ - @Child(name = "originalRuleset", type = {Coding.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "originalRuleset", type = {Coding.class}, order=7, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) protected Coding originalRuleset; - private static final long serialVersionUID = 621250924L; + private static final long serialVersionUID = 2031704818L; /** * Constructor @@ -855,12 +1185,11 @@ public class Claim extends DomainResource { /** * Constructor */ - public CoverageComponent(PositiveIntType sequence, BooleanType focal, Reference coverage, Coding relationship) { + public CoverageComponent(PositiveIntType sequence, BooleanType focal, Type coverage) { super(); this.sequence = sequence; this.focal = focal; this.coverage = coverage; - this.relationship = relationship; } /** @@ -956,15 +1285,36 @@ public class Claim extends DomainResource { /** * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) */ - public Reference getCoverage() { - if (this.coverage == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.coverage"); - else if (Configuration.doAutoCreate()) - this.coverage = new Reference(); // cc + public Type getCoverage() { return this.coverage; } + /** + * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) + */ + public Identifier getCoverageIdentifier() throws FHIRException { + if (!(this.coverage instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.coverage.getClass().getName()+" was encountered"); + return (Identifier) this.coverage; + } + + public boolean hasCoverageIdentifier() { + return this.coverage instanceof Identifier; + } + + /** + * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) + */ + public Reference getCoverageReference() throws FHIRException { + if (!(this.coverage instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.coverage.getClass().getName()+" was encountered"); + return (Reference) this.coverage; + } + + public boolean hasCoverageReference() { + return this.coverage instanceof Reference; + } + public boolean hasCoverage() { return this.coverage != null && !this.coverage.isEmpty(); } @@ -972,31 +1322,11 @@ public class Claim extends DomainResource { /** * @param value {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) */ - public CoverageComponent setCoverage(Reference value) { + public CoverageComponent setCoverage(Type value) { this.coverage = value; return this; } - /** - * @return {@link #coverage} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) - */ - public Coverage getCoverageTarget() { - if (this.coverageTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.coverage"); - else if (Configuration.doAutoCreate()) - this.coverageTarget = new Coverage(); // aa - return this.coverageTarget; - } - - /** - * @param value {@link #coverage} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) - */ - public CoverageComponent setCoverageTarget(Coverage value) { - this.coverageTarget = value; - return this; - } - /** * @return {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value */ @@ -1046,30 +1376,6 @@ public class Claim extends DomainResource { return this; } - /** - * @return {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public Coding getRelationship() { - if (this.relationship == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.relationship"); - else if (Configuration.doAutoCreate()) - this.relationship = new Coding(); // cc - return this.relationship; - } - - public boolean hasRelationship() { - return this.relationship != null && !this.relationship.isEmpty(); - } - - /** - * @param value {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public CoverageComponent setRelationship(Coding value) { - this.relationship = value; - return this; - } - /** * @return {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) */ @@ -1196,9 +1502,8 @@ public class Claim extends DomainResource { super.listChildren(childrenList); childrenList.add(new Property("sequence", "positiveInt", "A service line item.", 0, java.lang.Integer.MAX_VALUE, sequence)); childrenList.add(new Property("focal", "boolean", "The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.", 0, java.lang.Integer.MAX_VALUE, focal)); - childrenList.add(new Property("coverage", "Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, coverage)); + childrenList.add(new Property("coverage[x]", "Identifier|Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, coverage)); childrenList.add(new Property("businessArrangement", "string", "The contract number of a business agreement which describes the terms and conditions.", 0, java.lang.Integer.MAX_VALUE, businessArrangement)); - childrenList.add(new Property("relationship", "Coding", "The relationship of the patient to the subscriber.", 0, java.lang.Integer.MAX_VALUE, relationship)); childrenList.add(new Property("preAuthRef", "string", "A list of references from the Insurer to which these services pertain.", 0, java.lang.Integer.MAX_VALUE, preAuthRef)); childrenList.add(new Property("claimResponse", "Reference(ClaimResponse)", "The Coverages adjudication details.", 0, java.lang.Integer.MAX_VALUE, claimResponse)); childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); @@ -1210,12 +1515,10 @@ public class Claim extends DomainResource { this.sequence = castToPositiveInt(value); // PositiveIntType else if (name.equals("focal")) this.focal = castToBoolean(value); // BooleanType - else if (name.equals("coverage")) - this.coverage = castToReference(value); // Reference + else if (name.equals("coverage[x]")) + this.coverage = (Type) value; // Type else if (name.equals("businessArrangement")) this.businessArrangement = castToString(value); // StringType - else if (name.equals("relationship")) - this.relationship = castToCoding(value); // Coding else if (name.equals("preAuthRef")) this.getPreAuthRef().add(castToString(value)); else if (name.equals("claimResponse")) @@ -1234,17 +1537,17 @@ public class Claim extends DomainResource { else if (name.equals("focal")) { throw new FHIRException("Cannot call addChild on a primitive type Claim.focal"); } - else if (name.equals("coverage")) { + else if (name.equals("coverageIdentifier")) { + this.coverage = new Identifier(); + return this.coverage; + } + else if (name.equals("coverageReference")) { this.coverage = new Reference(); return this.coverage; } else if (name.equals("businessArrangement")) { throw new FHIRException("Cannot call addChild on a primitive type 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"); } @@ -1267,7 +1570,6 @@ public class Claim extends DomainResource { dst.focal = focal == null ? null : focal.copy(); dst.coverage = coverage == null ? null : coverage.copy(); dst.businessArrangement = businessArrangement == null ? null : businessArrangement.copy(); - dst.relationship = relationship == null ? null : relationship.copy(); if (preAuthRef != null) { dst.preAuthRef = new ArrayList(); for (StringType i : preAuthRef) @@ -1286,9 +1588,9 @@ public class Claim extends DomainResource { return false; CoverageComponent o = (CoverageComponent) other; return compareDeep(sequence, o.sequence, true) && compareDeep(focal, o.focal, true) && compareDeep(coverage, o.coverage, true) - && compareDeep(businessArrangement, o.businessArrangement, true) && compareDeep(relationship, o.relationship, true) - && compareDeep(preAuthRef, o.preAuthRef, true) && compareDeep(claimResponse, o.claimResponse, true) - && compareDeep(originalRuleset, o.originalRuleset, true); + && compareDeep(businessArrangement, o.businessArrangement, true) && compareDeep(preAuthRef, o.preAuthRef, true) + && compareDeep(claimResponse, o.claimResponse, true) && compareDeep(originalRuleset, o.originalRuleset, true) + ; } @Override @@ -1303,11 +1605,8 @@ public class Claim extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (focal == null || focal.isEmpty()) - && (coverage == null || coverage.isEmpty()) && (businessArrangement == null || businessArrangement.isEmpty()) - && (relationship == null || relationship.isEmpty()) && (preAuthRef == null || preAuthRef.isEmpty()) - && (claimResponse == null || claimResponse.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequence, focal, coverage, businessArrangement + , preAuthRef, claimResponse, originalRuleset); } public String fhirType() { @@ -1315,6 +1614,173 @@ public class Claim extends DomainResource { } + } + + @Block() + public static class OnsetComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The start or start and end dates for the treatable condition. + */ + @Child(name = "time", type = {DateType.class, Period.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Illness, injury or treatable condition date", formalDefinition="The start or start and end dates for the treatable condition." ) + protected Type time; + + /** + * Onset typifications eg. Start of pregnancy, start of illnes, etc. + */ + @Child(name = "type", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Onset of what", formalDefinition="Onset typifications eg. Start of pregnancy, start of illnes, etc." ) + protected Coding type; + + private static final long serialVersionUID = -560173231L; + + /** + * Constructor + */ + public OnsetComponent() { + super(); + } + + /** + * @return {@link #time} (The start or start and end dates for the treatable condition.) + */ + public Type getTime() { + return this.time; + } + + /** + * @return {@link #time} (The start or start and end dates for the treatable condition.) + */ + public DateType getTimeDateType() throws FHIRException { + if (!(this.time instanceof DateType)) + throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.time.getClass().getName()+" was encountered"); + return (DateType) this.time; + } + + public boolean hasTimeDateType() { + return this.time instanceof DateType; + } + + /** + * @return {@link #time} (The start or start and end dates for the treatable condition.) + */ + public Period getTimePeriod() throws FHIRException { + if (!(this.time instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.time.getClass().getName()+" was encountered"); + return (Period) this.time; + } + + public boolean hasTimePeriod() { + return this.time instanceof Period; + } + + public boolean hasTime() { + return this.time != null && !this.time.isEmpty(); + } + + /** + * @param value {@link #time} (The start or start and end dates for the treatable condition.) + */ + public OnsetComponent setTime(Type value) { + this.time = value; + return this; + } + + /** + * @return {@link #type} (Onset typifications eg. Start of pregnancy, start of illnes, etc.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OnsetComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Onset typifications eg. Start of pregnancy, start of illnes, etc.) + */ + public OnsetComponent setType(Coding value) { + this.type = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("time[x]", "date|Period", "The start or start and end dates for the treatable condition.", 0, java.lang.Integer.MAX_VALUE, time)); + childrenList.add(new Property("type", "Coding", "Onset typifications eg. Start of pregnancy, start of illnes, etc.", 0, java.lang.Integer.MAX_VALUE, type)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("time[x]")) + this.time = (Type) value; // Type + else if (name.equals("type")) + this.type = castToCoding(value); // Coding + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("timeDate")) { + this.time = new DateType(); + return this.time; + } + else if (name.equals("timePeriod")) { + this.time = new Period(); + return this.time; + } + else if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else + return super.addChild(name); + } + + public OnsetComponent copy() { + OnsetComponent dst = new OnsetComponent(); + copyValues(dst); + dst.time = time == null ? null : time.copy(); + dst.type = type == null ? null : type.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof OnsetComponent)) + return false; + OnsetComponent o = (OnsetComponent) other; + return compareDeep(time, o.time, true) && compareDeep(type, o.type, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof OnsetComponent)) + return false; + OnsetComponent o = (OnsetComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( time, type); + } + + public String fhirType() { + return "Claim.onset"; + + } + } @Block() @@ -1336,121 +1802,149 @@ public class Claim extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name = "provider", type = {Practitioner.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "provider", type = {Identifier.class, Practitioner.class}, order=3, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference provider; + protected Type provider; /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) + * The practitioner who is supervising the work of the servicing provider(s). */ - protected Practitioner providerTarget; + @Child(name = "supervisor", type = {Identifier.class, Practitioner.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Supervising Practitioner", formalDefinition="The practitioner who is supervising the work of the servicing provider(s)." ) + protected Type supervisor; + + /** + * The qualification which is applicable for this service. + */ + @Child(name = "providerQualification", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type, classification or Specialization", formalDefinition="The qualification which is applicable for this service." ) + protected Coding providerQualification; /** * Diagnosis applicable for this service or product line. */ - @Child(name = "diagnosisLinkId", type = {PositiveIntType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Diagnosis Link", formalDefinition="Diagnosis applicable for this service or product line." ) + @Child(name = "diagnosisLinkId", type = {PositiveIntType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Applicable diagnoses", formalDefinition="Diagnosis applicable for this service or product line." ) protected List diagnosisLinkId; /** * If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied. */ - @Child(name = "service", type = {Coding.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Child(name = "service", type = {Coding.class}, order=7, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Item Code", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied." ) protected Coding service; + /** + * Unusual circumstances which may influence adjudication. + */ + @Child(name = "serviceModifier", type = {Coding.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Service/Product modifiers", formalDefinition="Unusual circumstances which may influence adjudication." ) + protected List serviceModifier; + + /** + * Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. + */ + @Child(name = "modifier", type = {Coding.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." ) + protected List modifier; + + /** + * For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program. + */ + @Child(name = "programCode", type = {Coding.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Program specific reason for item inclusion", formalDefinition="For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program." ) + protected List programCode; + /** * The date or dates when the enclosed suite of services were performed or completed. */ - @Child(name = "serviced", type = {DateType.class, Period.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "serviced", type = {DateType.class, Period.class}, order=11, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Date or dates of Service", formalDefinition="The date or dates when the enclosed suite of services were performed or completed." ) protected Type serviced; /** * Where the service was provided. */ - @Child(name = "place", type = {Coding.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "place", type = {Coding.class}, order=12, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Place of service", formalDefinition="Where the service was provided." ) protected Coding place; /** * The number of repetitions of a service or product. */ - @Child(name = "quantity", type = {SimpleQuantity.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "quantity", type = {SimpleQuantity.class}, order=13, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) protected SimpleQuantity quantity; /** * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. */ - @Child(name = "unitPrice", type = {Money.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Child(name = "unitPrice", type = {Money.class}, order=14, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) protected Money unitPrice; /** * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. */ - @Child(name = "factor", type = {DecimalType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Child(name = "factor", type = {DecimalType.class}, order=15, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) protected DecimalType factor; /** * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. */ - @Child(name = "points", type = {DecimalType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Child(name = "points", type = {DecimalType.class}, order=16, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) protected DecimalType points; /** * The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. */ - @Child(name = "net", type = {Money.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Child(name = "net", type = {Money.class}, order=17, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Total item cost", formalDefinition="The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) protected Money net; /** * List of Unique Device Identifiers associated with this line item. */ - @Child(name = "udi", type = {Coding.class}, order=13, min=0, max=1, modifier=false, summary=true) + @Child(name = "udi", type = {Device.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; + protected List udi; + /** + * The actual objects that are the target of the reference (List of Unique Device Identifiers associated with this line item.) + */ + protected List udiTarget; + /** * Physical service site on the patient (limb, tooth, etc). */ - @Child(name = "bodySite", type = {Coding.class}, order=14, min=0, max=1, modifier=false, summary=true) + @Child(name = "bodySite", type = {Coding.class}, order=19, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Service Location", formalDefinition="Physical service site on the patient (limb, tooth, etc)." ) protected Coding bodySite; /** * A region or surface of the site, eg. limb region or tooth surface(s). */ - @Child(name = "subSite", type = {Coding.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "subSite", type = {Coding.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Service Sub-location", formalDefinition="A region or surface of the site, eg. limb region or tooth surface(s)." ) protected List subSite; - /** - * Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. - */ - @Child(name = "modifier", type = {Coding.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." ) - protected List modifier; - /** * Second tier of goods and services. */ - @Child(name = "detail", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "detail", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Additional items", formalDefinition="Second tier of goods and services." ) protected List detail; /** * The materials and placement date of prior fixed prosthesis. */ - @Child(name = "prosthesis", type = {}, order=18, min=0, max=1, modifier=false, summary=true) + @Child(name = "prosthesis", type = {}, order=22, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Prosthetic details", formalDefinition="The materials and placement date of prior fixed prosthesis." ) protected ProsthesisComponent prosthesis; - private static final long serialVersionUID = -1914609123L; + private static final long serialVersionUID = 1007480127L; /** * Constructor @@ -1541,15 +2035,36 @@ public class Claim extends DomainResource { /** * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc + public Type getProvider() { return this.provider; } + /** + * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Identifier getProviderIdentifier() throws FHIRException { + if (!(this.provider instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.provider.getClass().getName()+" was encountered"); + return (Identifier) this.provider; + } + + public boolean hasProviderIdentifier() { + return this.provider instanceof Identifier; + } + + /** + * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getProviderReference() throws FHIRException { + if (!(this.provider instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.provider.getClass().getName()+" was encountered"); + return (Reference) this.provider; + } + + public boolean hasProviderReference() { + return this.provider instanceof Reference; + } + public boolean hasProvider() { return this.provider != null && !this.provider.isEmpty(); } @@ -1557,28 +2072,77 @@ public class Claim extends DomainResource { /** * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) */ - public ItemsComponent setProvider(Reference value) { + public ItemsComponent setProvider(Type value) { this.provider = value; return this; } /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + * @return {@link #supervisor} (The practitioner who is supervising the work of the servicing provider(s).) */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; + public Type getSupervisor() { + return this.supervisor; } /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + * @return {@link #supervisor} (The practitioner who is supervising the work of the servicing provider(s).) */ - public ItemsComponent setProviderTarget(Practitioner value) { - this.providerTarget = value; + public Identifier getSupervisorIdentifier() throws FHIRException { + if (!(this.supervisor instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.supervisor.getClass().getName()+" was encountered"); + return (Identifier) this.supervisor; + } + + public boolean hasSupervisorIdentifier() { + return this.supervisor instanceof Identifier; + } + + /** + * @return {@link #supervisor} (The practitioner who is supervising the work of the servicing provider(s).) + */ + public Reference getSupervisorReference() throws FHIRException { + if (!(this.supervisor instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.supervisor.getClass().getName()+" was encountered"); + return (Reference) this.supervisor; + } + + public boolean hasSupervisorReference() { + return this.supervisor instanceof Reference; + } + + public boolean hasSupervisor() { + return this.supervisor != null && !this.supervisor.isEmpty(); + } + + /** + * @param value {@link #supervisor} (The practitioner who is supervising the work of the servicing provider(s).) + */ + public ItemsComponent setSupervisor(Type value) { + this.supervisor = value; + return this; + } + + /** + * @return {@link #providerQualification} (The qualification which is applicable for this service.) + */ + public Coding getProviderQualification() { + if (this.providerQualification == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.providerQualification"); + else if (Configuration.doAutoCreate()) + this.providerQualification = new Coding(); // cc + return this.providerQualification; + } + + public boolean hasProviderQualification() { + return this.providerQualification != null && !this.providerQualification.isEmpty(); + } + + /** + * @param value {@link #providerQualification} (The qualification which is applicable for this service.) + */ + public ItemsComponent setProviderQualification(Coding value) { + this.providerQualification = value; return this; } @@ -1660,6 +2224,126 @@ public class Claim extends DomainResource { return this; } + /** + * @return {@link #serviceModifier} (Unusual circumstances which may influence adjudication.) + */ + public List getServiceModifier() { + if (this.serviceModifier == null) + this.serviceModifier = new ArrayList(); + return this.serviceModifier; + } + + public boolean hasServiceModifier() { + if (this.serviceModifier == null) + return false; + for (Coding item : this.serviceModifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #serviceModifier} (Unusual circumstances which may influence adjudication.) + */ + // syntactic sugar + public Coding addServiceModifier() { //3 + Coding t = new Coding(); + if (this.serviceModifier == null) + this.serviceModifier = new ArrayList(); + this.serviceModifier.add(t); + return t; + } + + // syntactic sugar + public ItemsComponent addServiceModifier(Coding t) { //3 + if (t == null) + return this; + if (this.serviceModifier == null) + this.serviceModifier = new ArrayList(); + this.serviceModifier.add(t); + return this; + } + + /** + * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) + */ + public List getModifier() { + if (this.modifier == null) + this.modifier = new ArrayList(); + return this.modifier; + } + + public boolean hasModifier() { + if (this.modifier == null) + return false; + for (Coding item : this.modifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) + */ + // syntactic sugar + public Coding addModifier() { //3 + Coding t = new Coding(); + if (this.modifier == null) + this.modifier = new ArrayList(); + this.modifier.add(t); + return t; + } + + // syntactic sugar + public ItemsComponent addModifier(Coding t) { //3 + if (t == null) + return this; + if (this.modifier == null) + this.modifier = new ArrayList(); + this.modifier.add(t); + return this; + } + + /** + * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) + */ + public List getProgramCode() { + if (this.programCode == null) + this.programCode = new ArrayList(); + return this.programCode; + } + + public boolean hasProgramCode() { + if (this.programCode == null) + return false; + for (Coding item : this.programCode) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) + */ + // syntactic sugar + public Coding addProgramCode() { //3 + Coding t = new Coding(); + if (this.programCode == null) + this.programCode = new ArrayList(); + this.programCode.add(t); + return t; + } + + // syntactic sugar + public ItemsComponent addProgramCode(Coding t) { //3 + if (t == null) + return this; + if (this.programCode == null) + this.programCode = new ArrayList(); + this.programCode.add(t); + return this; + } + /** * @return {@link #serviced} (The date or dates when the enclosed suite of services were performed or completed.) */ @@ -1938,27 +2622,64 @@ public class Claim extends DomainResource { /** * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) */ - public Coding getUdi() { + public List getUdi() { if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc + this.udi = new ArrayList(); return this.udi; } public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); + if (this.udi == null) + return false; + for (Reference item : this.udi) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) + * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) */ - public ItemsComponent setUdi(Coding value) { - this.udi = value; + // syntactic sugar + public Reference addUdi() { //3 + Reference t = new Reference(); + if (this.udi == null) + this.udi = new ArrayList(); + this.udi.add(t); + return t; + } + + // syntactic sugar + public ItemsComponent addUdi(Reference t) { //3 + if (t == null) + return this; + if (this.udi == null) + this.udi = new ArrayList(); + this.udi.add(t); return this; } + /** + * @return {@link #udi} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) + */ + public List getUdiTarget() { + if (this.udiTarget == null) + this.udiTarget = new ArrayList(); + return this.udiTarget; + } + + // syntactic sugar + /** + * @return {@link #udi} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) + */ + public Device addUdiTarget() { + Device r = new Device(); + if (this.udiTarget == null) + this.udiTarget = new ArrayList(); + this.udiTarget.add(r); + return r; + } + /** * @return {@link #bodySite} (Physical service site on the patient (limb, tooth, etc).) */ @@ -2023,46 +2744,6 @@ public class Claim extends DomainResource { return this; } - /** - * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) - */ - public List getModifier() { - if (this.modifier == null) - this.modifier = new ArrayList(); - return this.modifier; - } - - public boolean hasModifier() { - if (this.modifier == null) - return false; - for (Coding item : this.modifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) - */ - // syntactic sugar - public Coding addModifier() { //3 - Coding t = new Coding(); - if (this.modifier == null) - this.modifier = new ArrayList(); - this.modifier.add(t); - return t; - } - - // syntactic sugar - public ItemsComponent addModifier(Coding t) { //3 - if (t == null) - return this; - if (this.modifier == null) - this.modifier = new ArrayList(); - this.modifier.add(t); - return this; - } - /** * @return {@link #detail} (Second tier of goods and services.) */ @@ -2131,9 +2812,14 @@ public class Claim extends DomainResource { super.listChildren(childrenList); childrenList.add(new Property("sequence", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); + childrenList.add(new Property("provider[x]", "Identifier|Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); + childrenList.add(new Property("supervisor[x]", "Identifier|Reference(Practitioner)", "The practitioner who is supervising the work of the servicing provider(s).", 0, java.lang.Integer.MAX_VALUE, supervisor)); + childrenList.add(new Property("providerQualification", "Coding", "The qualification which is applicable for this service.", 0, java.lang.Integer.MAX_VALUE, providerQualification)); childrenList.add(new Property("diagnosisLinkId", "positiveInt", "Diagnosis applicable for this service or product line.", 0, java.lang.Integer.MAX_VALUE, diagnosisLinkId)); childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); + childrenList.add(new Property("serviceModifier", "Coding", "Unusual circumstances which may influence adjudication.", 0, java.lang.Integer.MAX_VALUE, serviceModifier)); + childrenList.add(new Property("modifier", "Coding", "Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.", 0, java.lang.Integer.MAX_VALUE, modifier)); + childrenList.add(new Property("programCode", "Coding", "For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.", 0, java.lang.Integer.MAX_VALUE, programCode)); childrenList.add(new Property("serviced[x]", "date|Period", "The date or dates when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, serviced)); childrenList.add(new Property("place", "Coding", "Where the service was provided.", 0, java.lang.Integer.MAX_VALUE, place)); childrenList.add(new Property("quantity", "SimpleQuantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); @@ -2141,10 +2827,9 @@ public class Claim extends DomainResource { childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); childrenList.add(new Property("net", "Money", "The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); + childrenList.add(new Property("udi", "Reference(Device)", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); childrenList.add(new Property("bodySite", "Coding", "Physical service site on the patient (limb, tooth, etc).", 0, java.lang.Integer.MAX_VALUE, bodySite)); childrenList.add(new Property("subSite", "Coding", "A region or surface of the site, eg. limb region or tooth surface(s).", 0, java.lang.Integer.MAX_VALUE, subSite)); - childrenList.add(new Property("modifier", "Coding", "Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.", 0, java.lang.Integer.MAX_VALUE, modifier)); childrenList.add(new Property("detail", "", "Second tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, detail)); childrenList.add(new Property("prosthesis", "", "The materials and placement date of prior fixed prosthesis.", 0, java.lang.Integer.MAX_VALUE, prosthesis)); } @@ -2155,12 +2840,22 @@ public class Claim extends DomainResource { this.sequence = castToPositiveInt(value); // PositiveIntType else if (name.equals("type")) this.type = castToCoding(value); // Coding - else if (name.equals("provider")) - this.provider = castToReference(value); // Reference + else if (name.equals("provider[x]")) + this.provider = (Type) value; // Type + else if (name.equals("supervisor[x]")) + this.supervisor = (Type) value; // Type + else if (name.equals("providerQualification")) + this.providerQualification = castToCoding(value); // Coding else if (name.equals("diagnosisLinkId")) this.getDiagnosisLinkId().add(castToPositiveInt(value)); else if (name.equals("service")) this.service = castToCoding(value); // Coding + else if (name.equals("serviceModifier")) + this.getServiceModifier().add(castToCoding(value)); + else if (name.equals("modifier")) + this.getModifier().add(castToCoding(value)); + else if (name.equals("programCode")) + this.getProgramCode().add(castToCoding(value)); else if (name.equals("serviced[x]")) this.serviced = (Type) value; // Type else if (name.equals("place")) @@ -2176,13 +2871,11 @@ public class Claim extends DomainResource { else if (name.equals("net")) this.net = castToMoney(value); // Money else if (name.equals("udi")) - this.udi = castToCoding(value); // Coding + this.getUdi().add(castToReference(value)); else if (name.equals("bodySite")) this.bodySite = castToCoding(value); // Coding else if (name.equals("subSite")) this.getSubSite().add(castToCoding(value)); - else if (name.equals("modifier")) - this.getModifier().add(castToCoding(value)); else if (name.equals("detail")) this.getDetail().add((DetailComponent) value); else if (name.equals("prosthesis")) @@ -2200,10 +2893,26 @@ public class Claim extends DomainResource { this.type = new Coding(); return this.type; } - else if (name.equals("provider")) { + else if (name.equals("providerIdentifier")) { + this.provider = new Identifier(); + return this.provider; + } + else if (name.equals("providerReference")) { this.provider = new Reference(); return this.provider; } + else if (name.equals("supervisorIdentifier")) { + this.supervisor = new Identifier(); + return this.supervisor; + } + else if (name.equals("supervisorReference")) { + this.supervisor = new Reference(); + return this.supervisor; + } + else if (name.equals("providerQualification")) { + this.providerQualification = new Coding(); + return this.providerQualification; + } else if (name.equals("diagnosisLinkId")) { throw new FHIRException("Cannot call addChild on a primitive type Claim.diagnosisLinkId"); } @@ -2211,6 +2920,15 @@ public class Claim extends DomainResource { this.service = new Coding(); return this.service; } + else if (name.equals("serviceModifier")) { + return addServiceModifier(); + } + else if (name.equals("modifier")) { + return addModifier(); + } + else if (name.equals("programCode")) { + return addProgramCode(); + } else if (name.equals("servicedDate")) { this.serviced = new DateType(); return this.serviced; @@ -2242,8 +2960,7 @@ public class Claim extends DomainResource { return this.net; } else if (name.equals("udi")) { - this.udi = new Coding(); - return this.udi; + return addUdi(); } else if (name.equals("bodySite")) { this.bodySite = new Coding(); @@ -2252,9 +2969,6 @@ public class Claim extends DomainResource { else if (name.equals("subSite")) { return addSubSite(); } - else if (name.equals("modifier")) { - return addModifier(); - } else if (name.equals("detail")) { return addDetail(); } @@ -2272,12 +2986,29 @@ public class Claim extends DomainResource { dst.sequence = sequence == null ? null : sequence.copy(); dst.type = type == null ? null : type.copy(); dst.provider = provider == null ? null : provider.copy(); + dst.supervisor = supervisor == null ? null : supervisor.copy(); + dst.providerQualification = providerQualification == null ? null : providerQualification.copy(); if (diagnosisLinkId != null) { dst.diagnosisLinkId = new ArrayList(); for (PositiveIntType i : diagnosisLinkId) dst.diagnosisLinkId.add(i.copy()); }; dst.service = service == null ? null : service.copy(); + if (serviceModifier != null) { + dst.serviceModifier = new ArrayList(); + for (Coding i : serviceModifier) + dst.serviceModifier.add(i.copy()); + }; + if (modifier != null) { + dst.modifier = new ArrayList(); + for (Coding i : modifier) + dst.modifier.add(i.copy()); + }; + if (programCode != null) { + dst.programCode = new ArrayList(); + for (Coding i : programCode) + dst.programCode.add(i.copy()); + }; dst.serviced = serviced == null ? null : serviced.copy(); dst.place = place == null ? null : place.copy(); dst.quantity = quantity == null ? null : quantity.copy(); @@ -2285,18 +3016,17 @@ public class Claim extends DomainResource { dst.factor = factor == null ? null : factor.copy(); dst.points = points == null ? null : points.copy(); dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); + if (udi != null) { + dst.udi = new ArrayList(); + for (Reference i : udi) + dst.udi.add(i.copy()); + }; dst.bodySite = bodySite == null ? null : bodySite.copy(); if (subSite != null) { dst.subSite = new ArrayList(); for (Coding i : subSite) dst.subSite.add(i.copy()); }; - if (modifier != null) { - dst.modifier = new ArrayList(); - for (Coding i : modifier) - dst.modifier.add(i.copy()); - }; if (detail != null) { dst.detail = new ArrayList(); for (DetailComponent i : detail) @@ -2314,11 +3044,13 @@ public class Claim extends DomainResource { return false; ItemsComponent o = (ItemsComponent) other; return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(provider, o.provider, true) + && compareDeep(supervisor, o.supervisor, true) && compareDeep(providerQualification, o.providerQualification, true) && compareDeep(diagnosisLinkId, o.diagnosisLinkId, true) && compareDeep(service, o.service, true) - && compareDeep(serviced, o.serviced, true) && compareDeep(place, o.place, true) && compareDeep(quantity, o.quantity, true) - && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) && compareDeep(points, o.points, true) - && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) && compareDeep(bodySite, o.bodySite, true) - && compareDeep(subSite, o.subSite, true) && compareDeep(modifier, o.modifier, true) && compareDeep(detail, o.detail, true) + && compareDeep(serviceModifier, o.serviceModifier, true) && compareDeep(modifier, o.modifier, true) + && compareDeep(programCode, o.programCode, true) && compareDeep(serviced, o.serviced, true) && compareDeep(place, o.place, true) + && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) + && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) + && compareDeep(bodySite, o.bodySite, true) && compareDeep(subSite, o.subSite, true) && compareDeep(detail, o.detail, true) && compareDeep(prosthesis, o.prosthesis, true); } @@ -2334,14 +3066,10 @@ public class Claim extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (provider == null || provider.isEmpty()) && (diagnosisLinkId == null || diagnosisLinkId.isEmpty()) - && (service == null || service.isEmpty()) && (serviced == null || serviced.isEmpty()) && (place == null || place.isEmpty()) - && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()) && (bodySite == null || bodySite.isEmpty()) && (subSite == null || subSite.isEmpty()) - && (modifier == null || modifier.isEmpty()) && (detail == null || detail.isEmpty()) && (prosthesis == null || prosthesis.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequence, type, provider, supervisor + , providerQualification, diagnosisLinkId, service, serviceModifier, modifier, programCode + , serviced, place, quantity, unitPrice, factor, points, net, udi, bodySite, subSite + , detail, prosthesis); } public String fhirType() { @@ -2374,56 +3102,68 @@ public class Claim extends DomainResource { @Description(shortDefinition="Additional item codes", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied." ) protected Coding service; + /** + * For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program. + */ + @Child(name = "programCode", type = {Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Program specific reason for item inclusion", formalDefinition="For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program." ) + protected List programCode; + /** * The number of repetitions of a service or product. */ - @Child(name = "quantity", type = {SimpleQuantity.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "quantity", type = {SimpleQuantity.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) protected SimpleQuantity quantity; /** * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. */ - @Child(name = "unitPrice", type = {Money.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "unitPrice", type = {Money.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) protected Money unitPrice; /** * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. */ - @Child(name = "factor", type = {DecimalType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "factor", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) protected DecimalType factor; /** * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. */ - @Child(name = "points", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "points", type = {DecimalType.class}, order=8, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) protected DecimalType points; /** * The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. */ - @Child(name = "net", type = {Money.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "net", type = {Money.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Total additional item cost", formalDefinition="The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) protected Money net; /** * List of Unique Device Identifiers associated with this line item. */ - @Child(name = "udi", type = {Coding.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Child(name = "udi", type = {Device.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; + protected List udi; + /** + * The actual objects that are the target of the reference (List of Unique Device Identifiers associated with this line item.) + */ + protected List udiTarget; + /** * Third tier of goods and services. */ - @Child(name = "subDetail", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "subDetail", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Additional items", formalDefinition="Third tier of goods and services." ) protected List subDetail; - private static final long serialVersionUID = 5768017L; + private static final long serialVersionUID = -1099698352L; /** * Constructor @@ -2535,6 +3275,46 @@ public class Claim extends DomainResource { return this; } + /** + * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) + */ + public List getProgramCode() { + if (this.programCode == null) + this.programCode = new ArrayList(); + return this.programCode; + } + + public boolean hasProgramCode() { + if (this.programCode == null) + return false; + for (Coding item : this.programCode) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) + */ + // syntactic sugar + public Coding addProgramCode() { //3 + Coding t = new Coding(); + if (this.programCode == null) + this.programCode = new ArrayList(); + this.programCode.add(t); + return t; + } + + // syntactic sugar + public DetailComponent addProgramCode(Coding t) { //3 + if (t == null) + return this; + if (this.programCode == null) + this.programCode = new ArrayList(); + this.programCode.add(t); + return this; + } + /** * @return {@link #quantity} (The number of repetitions of a service or product.) */ @@ -2744,27 +3524,64 @@ public class Claim extends DomainResource { /** * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) */ - public Coding getUdi() { + public List getUdi() { if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc + this.udi = new ArrayList(); return this.udi; } public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); + if (this.udi == null) + return false; + for (Reference item : this.udi) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) + * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) */ - public DetailComponent setUdi(Coding value) { - this.udi = value; + // syntactic sugar + public Reference addUdi() { //3 + Reference t = new Reference(); + if (this.udi == null) + this.udi = new ArrayList(); + this.udi.add(t); + return t; + } + + // syntactic sugar + public DetailComponent addUdi(Reference t) { //3 + if (t == null) + return this; + if (this.udi == null) + this.udi = new ArrayList(); + this.udi.add(t); return this; } + /** + * @return {@link #udi} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) + */ + public List getUdiTarget() { + if (this.udiTarget == null) + this.udiTarget = new ArrayList(); + return this.udiTarget; + } + + // syntactic sugar + /** + * @return {@link #udi} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) + */ + public Device addUdiTarget() { + Device r = new Device(); + if (this.udiTarget == null) + this.udiTarget = new ArrayList(); + this.udiTarget.add(r); + return r; + } + /** * @return {@link #subDetail} (Third tier of goods and services.) */ @@ -2810,12 +3627,13 @@ public class Claim extends DomainResource { childrenList.add(new Property("sequence", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); + childrenList.add(new Property("programCode", "Coding", "For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.", 0, java.lang.Integer.MAX_VALUE, programCode)); childrenList.add(new Property("quantity", "SimpleQuantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); childrenList.add(new Property("unitPrice", "Money", "If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); childrenList.add(new Property("net", "Money", "The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); + childrenList.add(new Property("udi", "Reference(Device)", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); childrenList.add(new Property("subDetail", "", "Third tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, subDetail)); } @@ -2827,6 +3645,8 @@ public class Claim extends DomainResource { this.type = castToCoding(value); // Coding else if (name.equals("service")) this.service = castToCoding(value); // Coding + else if (name.equals("programCode")) + this.getProgramCode().add(castToCoding(value)); else if (name.equals("quantity")) this.quantity = castToSimpleQuantity(value); // SimpleQuantity else if (name.equals("unitPrice")) @@ -2838,7 +3658,7 @@ public class Claim extends DomainResource { else if (name.equals("net")) this.net = castToMoney(value); // Money else if (name.equals("udi")) - this.udi = castToCoding(value); // Coding + this.getUdi().add(castToReference(value)); else if (name.equals("subDetail")) this.getSubDetail().add((SubDetailComponent) value); else @@ -2858,6 +3678,9 @@ public class Claim extends DomainResource { this.service = new Coding(); return this.service; } + else if (name.equals("programCode")) { + return addProgramCode(); + } else if (name.equals("quantity")) { this.quantity = new SimpleQuantity(); return this.quantity; @@ -2877,8 +3700,7 @@ public class Claim extends DomainResource { return this.net; } else if (name.equals("udi")) { - this.udi = new Coding(); - return this.udi; + return addUdi(); } else if (name.equals("subDetail")) { return addSubDetail(); @@ -2893,12 +3715,21 @@ public class Claim extends DomainResource { dst.sequence = sequence == null ? null : sequence.copy(); dst.type = type == null ? null : type.copy(); dst.service = service == null ? null : service.copy(); + if (programCode != null) { + dst.programCode = new ArrayList(); + for (Coding i : programCode) + dst.programCode.add(i.copy()); + }; dst.quantity = quantity == null ? null : quantity.copy(); dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); dst.factor = factor == null ? null : factor.copy(); dst.points = points == null ? null : points.copy(); dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); + if (udi != null) { + dst.udi = new ArrayList(); + for (Reference i : udi) + dst.udi.add(i.copy()); + }; if (subDetail != null) { dst.subDetail = new ArrayList(); for (SubDetailComponent i : subDetail) @@ -2915,9 +3746,9 @@ public class Claim extends DomainResource { return false; DetailComponent o = (DetailComponent) other; return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(service, o.service, true) - && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) - && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) - && compareDeep(subDetail, o.subDetail, true); + && compareDeep(programCode, o.programCode, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) + && compareDeep(factor, o.factor, true) && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) + && compareDeep(udi, o.udi, true) && compareDeep(subDetail, o.subDetail, true); } @Override @@ -2932,10 +3763,8 @@ public class Claim extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (service == null || service.isEmpty()) && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()) && (subDetail == null || subDetail.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequence, type, service, programCode + , quantity, unitPrice, factor, points, net, udi, subDetail); } public String fhirType() { @@ -2968,49 +3797,61 @@ public class Claim extends DomainResource { @Description(shortDefinition="Additional item codes", formalDefinition="The fee for an addittional service or product or charge." ) protected Coding service; + /** + * For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program. + */ + @Child(name = "programCode", type = {Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Program specific reason for item inclusion", formalDefinition="For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program." ) + protected List programCode; + /** * The number of repetitions of a service or product. */ - @Child(name = "quantity", type = {SimpleQuantity.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "quantity", type = {SimpleQuantity.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) protected SimpleQuantity quantity; /** * The fee for an addittional service or product or charge. */ - @Child(name = "unitPrice", type = {Money.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "unitPrice", type = {Money.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="The fee for an addittional service or product or charge." ) protected Money unitPrice; /** * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. */ - @Child(name = "factor", type = {DecimalType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "factor", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) protected DecimalType factor; /** * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. */ - @Child(name = "points", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "points", type = {DecimalType.class}, order=8, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) protected DecimalType points; /** * The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. */ - @Child(name = "net", type = {Money.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "net", type = {Money.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Net additional item cost", formalDefinition="The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) protected Money net; /** * List of Unique Device Identifiers associated with this line item. */ - @Child(name = "udi", type = {Coding.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Child(name = "udi", type = {Device.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; + protected List udi; + /** + * The actual objects that are the target of the reference (List of Unique Device Identifiers associated with this line item.) + */ + protected List udiTarget; - private static final long serialVersionUID = 623567568L; + + private static final long serialVersionUID = 846630321L; /** * Constructor @@ -3122,6 +3963,46 @@ public class Claim extends DomainResource { return this; } + /** + * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) + */ + public List getProgramCode() { + if (this.programCode == null) + this.programCode = new ArrayList(); + return this.programCode; + } + + public boolean hasProgramCode() { + if (this.programCode == null) + return false; + for (Coding item : this.programCode) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) + */ + // syntactic sugar + public Coding addProgramCode() { //3 + Coding t = new Coding(); + if (this.programCode == null) + this.programCode = new ArrayList(); + this.programCode.add(t); + return t; + } + + // syntactic sugar + public SubDetailComponent addProgramCode(Coding t) { //3 + if (t == null) + return this; + if (this.programCode == null) + this.programCode = new ArrayList(); + this.programCode.add(t); + return this; + } + /** * @return {@link #quantity} (The number of repetitions of a service or product.) */ @@ -3331,38 +4212,76 @@ public class Claim extends DomainResource { /** * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) */ - public Coding getUdi() { + public List getUdi() { if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc + this.udi = new ArrayList(); return this.udi; } public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); + if (this.udi == null) + return false; + for (Reference item : this.udi) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) + * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) */ - public SubDetailComponent setUdi(Coding value) { - this.udi = value; + // syntactic sugar + public Reference addUdi() { //3 + Reference t = new Reference(); + if (this.udi == null) + this.udi = new ArrayList(); + this.udi.add(t); + return t; + } + + // syntactic sugar + public SubDetailComponent addUdi(Reference t) { //3 + if (t == null) + return this; + if (this.udi == null) + this.udi = new ArrayList(); + this.udi.add(t); return this; } + /** + * @return {@link #udi} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) + */ + public List getUdiTarget() { + if (this.udiTarget == null) + this.udiTarget = new ArrayList(); + return this.udiTarget; + } + + // syntactic sugar + /** + * @return {@link #udi} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) + */ + public Device addUdiTarget() { + Device r = new Device(); + if (this.udiTarget == null) + this.udiTarget = new ArrayList(); + this.udiTarget.add(r); + return r; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("sequence", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("service", "Coding", "The fee for an addittional service or product or charge.", 0, java.lang.Integer.MAX_VALUE, service)); + childrenList.add(new Property("programCode", "Coding", "For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.", 0, java.lang.Integer.MAX_VALUE, programCode)); childrenList.add(new Property("quantity", "SimpleQuantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); childrenList.add(new Property("unitPrice", "Money", "The fee for an addittional service or product or charge.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); childrenList.add(new Property("net", "Money", "The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); + childrenList.add(new Property("udi", "Reference(Device)", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); } @Override @@ -3373,6 +4292,8 @@ public class Claim extends DomainResource { this.type = castToCoding(value); // Coding else if (name.equals("service")) this.service = castToCoding(value); // Coding + else if (name.equals("programCode")) + this.getProgramCode().add(castToCoding(value)); else if (name.equals("quantity")) this.quantity = castToSimpleQuantity(value); // SimpleQuantity else if (name.equals("unitPrice")) @@ -3384,7 +4305,7 @@ public class Claim extends DomainResource { else if (name.equals("net")) this.net = castToMoney(value); // Money else if (name.equals("udi")) - this.udi = castToCoding(value); // Coding + this.getUdi().add(castToReference(value)); else super.setProperty(name, value); } @@ -3402,6 +4323,9 @@ public class Claim extends DomainResource { this.service = new Coding(); return this.service; } + else if (name.equals("programCode")) { + return addProgramCode(); + } else if (name.equals("quantity")) { this.quantity = new SimpleQuantity(); return this.quantity; @@ -3421,8 +4345,7 @@ public class Claim extends DomainResource { return this.net; } else if (name.equals("udi")) { - this.udi = new Coding(); - return this.udi; + return addUdi(); } else return super.addChild(name); @@ -3434,12 +4357,21 @@ public class Claim extends DomainResource { dst.sequence = sequence == null ? null : sequence.copy(); dst.type = type == null ? null : type.copy(); dst.service = service == null ? null : service.copy(); + if (programCode != null) { + dst.programCode = new ArrayList(); + for (Coding i : programCode) + dst.programCode.add(i.copy()); + }; dst.quantity = quantity == null ? null : quantity.copy(); dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); dst.factor = factor == null ? null : factor.copy(); dst.points = points == null ? null : points.copy(); dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); + if (udi != null) { + dst.udi = new ArrayList(); + for (Reference i : udi) + dst.udi.add(i.copy()); + }; return dst; } @@ -3451,9 +4383,9 @@ public class Claim extends DomainResource { return false; SubDetailComponent o = (SubDetailComponent) other; return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(service, o.service, true) - && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) - && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) - ; + && compareDeep(programCode, o.programCode, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) + && compareDeep(factor, o.factor, true) && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) + && compareDeep(udi, o.udi, true); } @Override @@ -3468,10 +4400,8 @@ public class Claim extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (service == null || service.isEmpty()) && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequence, type, service, programCode + , quantity, unitPrice, factor, points, net, udi); } public String fhirType() { @@ -3697,8 +4627,8 @@ public class Claim extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (initial == null || initial.isEmpty()) && (priorDate == null || priorDate.isEmpty()) - && (priorMaterial == null || priorMaterial.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( initial, priorDate, priorMaterial + ); } public String fhirType() { @@ -3721,14 +4651,14 @@ public class Claim extends DomainResource { * Missing reason may be: E-extraction, O-other. */ @Child(name = "reason", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Reason for missing", formalDefinition="Missing reason may be: E-extraction, O-other." ) + @Description(shortDefinition="Indicates whether it was extracted or other reason", formalDefinition="Missing reason may be: E-extraction, O-other." ) protected Coding reason; /** * The date of the extraction either known from records or patient reported estimate. */ @Child(name = "extractionDate", type = {DateType.class}, order=3, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Date of Extraction", formalDefinition="The date of the extraction either known from records or patient reported estimate." ) + @Description(shortDefinition="Date tooth was extracted if known", formalDefinition="The date of the extraction either known from records or patient reported estimate." ) protected DateType extractionDate; private static final long serialVersionUID = 352913313L; @@ -3912,8 +4842,8 @@ public class Claim extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (tooth == null || tooth.isEmpty()) && (reason == null || reason.isEmpty()) - && (extractionDate == null || extractionDate.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( tooth, reason, extractionDate + ); } public String fhirType() { @@ -3924,308 +4854,279 @@ public class Claim extends DomainResource { } /** - * The category of claim this is. + * The category of claim. */ @Child(name = "type", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="institutional | oral | pharmacy | professional | vision", formalDefinition="The category of claim this is." ) + @Description(shortDefinition="institutional | oral | pharmacy | professional | vision", formalDefinition="The category of claim." ) protected Enumeration type; /** - * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. + * A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType. */ - @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) + @Child(name = "subType", type = {Coding.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Finer grained claim type information", formalDefinition="A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType." ) + protected List subType; + + /** + * The business identifier for the instance: claim number, pre-determination or pre-authorization number. + */ + @Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: claim number, pre-determination or pre-authorization number." ) protected List identifier; /** * The version of the specification on which this instance relies. */ - @Child(name = "ruleset", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Child(name = "ruleset", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) protected Coding ruleset; /** * The version of the specification from which the original instance was created. */ - @Child(name = "originalRuleset", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "originalRuleset", type = {Coding.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) protected Coding originalRuleset; /** * The date when the enclosed suite of services were performed or completed. */ - @Child(name = "created", type = {DateTimeType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "created", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) protected DateTimeType created; /** * The billable period for which charges are being submitted. */ - @Child(name = "billablePeriod", type = {Period.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "billablePeriod", type = {Period.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Period for charge submission", formalDefinition="The billable period for which charges are being submitted." ) protected Period billablePeriod; /** * Insurer Identifier, typical BIN number (6 digit). */ - @Child(name = "target", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "target", type = {Identifier.class, Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) - protected Reference target; - - /** - * The actual object that is the target of the reference (Insurer Identifier, typical BIN number (6 digit).) - */ - protected Organization targetTarget; + protected Type target; /** * The provider which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name = "provider", type = {Practitioner.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "provider", type = {Identifier.class, Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - protected Practitioner providerTarget; + protected Type provider; /** * The organization which is responsible for the bill, claim pre-determination, pre-authorization. */ - @Child(name = "organization", type = {Organization.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "organization", type = {Identifier.class, Organization.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - protected Organization organizationTarget; + protected Type organization; /** * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). */ - @Child(name = "use", type = {CodeType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Child(name = "use", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) protected Enumeration use; /** * Immediate (STAT), best effort (NORMAL), deferred (DEFER). */ - @Child(name = "priority", type = {Coding.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Child(name = "priority", type = {Coding.class}, order=11, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (STAT), best effort (NORMAL), deferred (DEFER)." ) protected Coding priority; /** * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. */ - @Child(name = "fundsReserve", type = {Coding.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Child(name = "fundsReserve", type = {Coding.class}, order=12, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) protected Coding fundsReserve; /** * Person who created the invoice/claim/pre-determination or pre-authorization. */ - @Child(name = "enterer", type = {Practitioner.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Child(name = "enterer", type = {Identifier.class, Practitioner.class}, order=13, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) - protected Reference enterer; - - /** - * The actual object that is the target of the reference (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - protected Practitioner entererTarget; + protected Type enterer; /** * Facility where the services were provided. */ - @Child(name = "facility", type = {Location.class}, order=13, min=0, max=1, modifier=false, summary=true) + @Child(name = "facility", type = {Identifier.class, Location.class}, order=14, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) - protected Reference facility; - - /** - * The actual object that is the target of the reference (Facility where the services were provided.) - */ - protected Location facilityTarget; + protected Type facility; /** * Other claims which are related to this claim such as prior claim versions or for related services. */ - @Child(name = "relatedClaim", type = {Claim.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Related Claims", formalDefinition="Other claims which are related to this claim such as prior claim versions or for related services." ) - protected List relatedClaim; - /** - * The actual objects that are the target of the reference (Other claims which are related to this claim such as prior claim versions or for related services.) - */ - protected List relatedClaimTarget; - + @Child(name = "related", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Related Claims which may be revelant to processing this claimn", formalDefinition="Other claims which are related to this claim such as prior claim versions or for related services." ) + protected List related; /** * Prescription to support the dispensing of Pharmacy or Vision products. */ - @Child(name = "prescription", type = {MedicationOrder.class, VisionPrescription.class}, order=15, min=0, max=1, modifier=false, summary=true) + @Child(name = "prescription", type = {Identifier.class, MedicationOrder.class, VisionPrescription.class}, order=16, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Prescription", formalDefinition="Prescription to support the dispensing of Pharmacy or Vision products." ) - protected Reference prescription; - - /** - * The actual object that is the target of the reference (Prescription to support the dispensing of Pharmacy or Vision products.) - */ - protected Resource prescriptionTarget; + protected Type prescription; /** * Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products. */ - @Child(name = "originalPrescription", type = {MedicationOrder.class}, order=16, min=0, max=1, modifier=false, summary=true) + @Child(name = "originalPrescription", type = {Identifier.class, MedicationOrder.class}, order=17, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Original Prescription", formalDefinition="Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products." ) - protected Reference originalPrescription; - - /** - * The actual object that is the target of the reference (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) - */ - protected MedicationOrder originalPrescriptionTarget; + protected Type originalPrescription; /** * The party to be reimbursed for the services. */ - @Child(name = "payee", type = {}, order=17, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) + @Child(name = "payee", type = {}, order=18, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Party to be paid any benefits payable", formalDefinition="The party to be reimbursed for the services." ) protected PayeeComponent payee; /** * The referral resource which lists the date, practitioner, reason and other supporting information. */ - @Child(name = "referral", type = {ReferralRequest.class}, order=18, min=0, max=1, modifier=false, summary=true) + @Child(name = "referral", type = {Identifier.class, ReferralRequest.class}, order=19, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) - protected Reference referral; + protected Type referral; /** - * The actual object that is the target of the reference (The referral resource which lists the date, practitioner, reason and other supporting information.) + * **Insert definition of Occurrence codes. */ - protected ReferralRequest referralTarget; + @Child(name = "occurrenceCode", type = {Coding.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Occurrence Codes", formalDefinition="**Insert definition of Occurrence codes." ) + protected List occurrenceCode; + + /** + * **Insert definition of Occurrence Span codes. + */ + @Child(name = "occurenceSpanCode", type = {Coding.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Occurrence Span Codes", formalDefinition="**Insert definition of Occurrence Span codes." ) + protected List occurenceSpanCode; + + /** + * **Insert definition of Value codes. + */ + @Child(name = "valueCode", type = {Coding.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Value Codes", formalDefinition="**Insert definition of Value codes." ) + protected List valueCode; /** * Ordered list of patient diagnosis for which care is sought. */ - @Child(name = "diagnosis", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "diagnosis", type = {}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) protected List diagnosis; + /** + * Ordered list of patient procedures performed to support the adjudication. + */ + @Child(name = "procedure", type = {}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Procedures performed", formalDefinition="Ordered list of patient procedures performed to support the adjudication." ) + protected List procedure; + /** * List of special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication. */ - @Child(name = "specialCondition", type = {Coding.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "specialCondition", type = {Coding.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="List of special Conditions", formalDefinition="List of special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication." ) protected List specialCondition; /** * Patient Resource. */ - @Child(name = "patient", type = {Patient.class}, order=21, min=1, max=1, modifier=false, summary=true) + @Child(name = "patient", type = {Identifier.class, Patient.class}, order=26, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) - protected Reference patient; - - /** - * The actual object that is the target of the reference (Patient Resource.) - */ - protected Patient patientTarget; + protected Type patient; /** * Financial instrument by which payment information for health care. */ - @Child(name = "coverage", type = {}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "coverage", type = {}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) protected List coverage; - /** - * Factors which may influence the applicability of coverage. - */ - @Child(name = "exception", type = {Coding.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) - protected List exception; - - /** - * Name of school for over-aged dependants. - */ - @Child(name = "school", type = {StringType.class}, order=24, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) - protected StringType school; - /** * Date of an accident which these services are addressing. */ - @Child(name = "accidentDate", type = {DateType.class}, order=25, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) + @Child(name = "accidentDate", type = {DateType.class}, order=28, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the accident occurred", formalDefinition="Date of an accident which these services are addressing." ) protected DateType accidentDate; /** * Type of accident: work, auto, etc. */ - @Child(name = "accidentType", type = {Coding.class}, order=26, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) + @Child(name = "accidentType", type = {Coding.class}, order=29, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The nature of the accident", formalDefinition="Type of accident: work, auto, etc." ) protected Coding accidentType; /** * Accident Place. */ - @Child(name = "accidentLocation", type = {StringType.class, Address.class, Location.class}, order=27, min=0, max=1, modifier=false, summary=true) + @Child(name = "accidentLocation", type = {Address.class, Location.class}, order=30, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Accident Place", formalDefinition="Accident Place." ) protected Type accidentLocation; /** * A list of intervention and exception codes which may influence the adjudication of the claim. */ - @Child(name = "interventionException", type = {Coding.class}, order=28, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "interventionException", type = {Coding.class}, order=31, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) protected List interventionException; /** - * The start or start and end dates for the treatable condition. + * Period, start and last dates of aspects of the Condition or related services. */ - @Child(name = "onset", type = {DateType.class, Period.class}, order=29, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Illness, injury or treatable condition date", formalDefinition="The start or start and end dates for the treatable condition." ) - protected Type onset; + @Child(name = "onset", type = {}, order=32, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Condition related Onset related dates and codes", formalDefinition="Period, start and last dates of aspects of the Condition or related services." ) + protected List onset; /** * The start and optional end dates of when the patient was precluded from working due to the treatable condition(s). */ - @Child(name = "employmentImpacted", type = {Period.class}, order=30, min=0, max=1, modifier=false, summary=true) + @Child(name = "employmentImpacted", type = {Period.class}, order=33, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Period unable to work", formalDefinition="The start and optional end dates of when the patient was precluded from working due to the treatable condition(s)." ) protected Period employmentImpacted; /** * The start and optional end dates of when the patient was confined to a treatment center. */ - @Child(name = "hospitalization", type = {Period.class}, order=31, min=0, max=1, modifier=false, summary=true) + @Child(name = "hospitalization", type = {Period.class}, order=34, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Period in hospital", formalDefinition="The start and optional end dates of when the patient was confined to a treatment center." ) protected Period hospitalization; /** * First tier of goods and services. */ - @Child(name = "item", type = {}, order=32, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "item", type = {}, order=35, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) protected List item; /** * The total value of the claim. */ - @Child(name = "total", type = {Money.class}, order=33, min=0, max=1, modifier=false, summary=true) + @Child(name = "total", type = {Money.class}, order=36, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Total claim cost", formalDefinition="The total value of the claim." ) protected Money total; /** * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. */ - @Child(name = "additionalMaterials", type = {Coding.class}, order=34, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Additional materials, documents, etc.", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) - protected List additionalMaterials; + @Child(name = "additionalMaterial", type = {Coding.class}, order=37, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Additional supporting materials and documents", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) + protected List additionalMaterial; /** * A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons. */ - @Child(name = "missingTeeth", type = {}, order=35, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "missingTeeth", type = {}, order=38, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Only if type = oral", formalDefinition="A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons." ) protected List missingTeeth; - private static final long serialVersionUID = -763997683L; + private static final long serialVersionUID = 1478562254L; /** * Constructor @@ -4237,14 +5138,14 @@ public class Claim extends DomainResource { /** * Constructor */ - public Claim(Enumeration type, Reference patient) { + public Claim(Enumeration type, Type patient) { super(); this.type = type; this.patient = patient; } /** - * @return {@link #type} (The category of claim this is.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + * @return {@link #type} (The category of claim.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value */ public Enumeration getTypeElement() { if (this.type == null) @@ -4264,7 +5165,7 @@ public class Claim extends DomainResource { } /** - * @param value {@link #type} (The category of claim this is.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + * @param value {@link #type} (The category of claim.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value */ public Claim setTypeElement(Enumeration value) { this.type = value; @@ -4272,14 +5173,14 @@ public class Claim extends DomainResource { } /** - * @return The category of claim this is. + * @return The category of claim. */ public ClaimType getType() { return this.type == null ? null : this.type.getValue(); } /** - * @param value The category of claim this is. + * @param value The category of claim. */ public Claim setType(ClaimType value) { if (this.type == null) @@ -4289,7 +5190,47 @@ public class Claim extends DomainResource { } /** - * @return {@link #identifier} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) + * @return {@link #subType} (A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType.) + */ + public List getSubType() { + if (this.subType == null) + this.subType = new ArrayList(); + return this.subType; + } + + public boolean hasSubType() { + if (this.subType == null) + return false; + for (Coding item : this.subType) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #subType} (A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType.) + */ + // syntactic sugar + public Coding addSubType() { //3 + Coding t = new Coding(); + if (this.subType == null) + this.subType = new ArrayList(); + this.subType.add(t); + return t; + } + + // syntactic sugar + public Claim addSubType(Coding t) { //3 + if (t == null) + return this; + if (this.subType == null) + this.subType = new ArrayList(); + this.subType.add(t); + return this; + } + + /** + * @return {@link #identifier} (The business identifier for the instance: claim number, pre-determination or pre-authorization number.) */ public List getIdentifier() { if (this.identifier == null) @@ -4307,7 +5248,7 @@ public class Claim extends DomainResource { } /** - * @return {@link #identifier} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) + * @return {@link #identifier} (The business identifier for the instance: claim number, pre-determination or pre-authorization number.) */ // syntactic sugar public Identifier addIdentifier() { //3 @@ -4452,15 +5393,36 @@ public class Claim extends DomainResource { /** * @return {@link #target} (Insurer Identifier, typical BIN number (6 digit).) */ - public Reference getTarget() { - if (this.target == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.target"); - else if (Configuration.doAutoCreate()) - this.target = new Reference(); // cc + public Type getTarget() { return this.target; } + /** + * @return {@link #target} (Insurer Identifier, typical BIN number (6 digit).) + */ + public Identifier getTargetIdentifier() throws FHIRException { + if (!(this.target instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.target.getClass().getName()+" was encountered"); + return (Identifier) this.target; + } + + public boolean hasTargetIdentifier() { + return this.target instanceof Identifier; + } + + /** + * @return {@link #target} (Insurer Identifier, typical BIN number (6 digit).) + */ + public Reference getTargetReference() throws FHIRException { + if (!(this.target instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.target.getClass().getName()+" was encountered"); + return (Reference) this.target; + } + + public boolean hasTargetReference() { + return this.target instanceof Reference; + } + public boolean hasTarget() { return this.target != null && !this.target.isEmpty(); } @@ -4468,43 +5430,44 @@ public class Claim extends DomainResource { /** * @param value {@link #target} (Insurer Identifier, typical BIN number (6 digit).) */ - public Claim setTarget(Reference value) { + public Claim setTarget(Type value) { this.target = value; return this; } - /** - * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Insurer Identifier, typical BIN number (6 digit).) - */ - public Organization getTargetTarget() { - if (this.targetTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.target"); - else if (Configuration.doAutoCreate()) - this.targetTarget = new Organization(); // aa - return this.targetTarget; - } - - /** - * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Insurer Identifier, typical BIN number (6 digit).) - */ - public Claim setTargetTarget(Organization value) { - this.targetTarget = value; - return this; - } - /** * @return {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc + public Type getProvider() { return this.provider; } + /** + * @return {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) + */ + public Identifier getProviderIdentifier() throws FHIRException { + if (!(this.provider instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.provider.getClass().getName()+" was encountered"); + return (Identifier) this.provider; + } + + public boolean hasProviderIdentifier() { + return this.provider instanceof Identifier; + } + + /** + * @return {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) + */ + public Reference getProviderReference() throws FHIRException { + if (!(this.provider instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.provider.getClass().getName()+" was encountered"); + return (Reference) this.provider; + } + + public boolean hasProviderReference() { + return this.provider instanceof Reference; + } + public boolean hasProvider() { return this.provider != null && !this.provider.isEmpty(); } @@ -4512,43 +5475,44 @@ public class Claim extends DomainResource { /** * @param value {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) */ - public Claim setProvider(Reference value) { + public Claim setProvider(Type value) { this.provider = value; return this; } - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Claim setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - /** * @return {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc + public Type getOrganization() { return this.organization; } + /** + * @return {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) + */ + public Identifier getOrganizationIdentifier() throws FHIRException { + if (!(this.organization instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Identifier) this.organization; + } + + public boolean hasOrganizationIdentifier() { + return this.organization instanceof Identifier; + } + + /** + * @return {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) + */ + public Reference getOrganizationReference() throws FHIRException { + if (!(this.organization instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Reference) this.organization; + } + + public boolean hasOrganizationReference() { + return this.organization instanceof Reference; + } + public boolean hasOrganization() { return this.organization != null && !this.organization.isEmpty(); } @@ -4556,31 +5520,11 @@ public class Claim extends DomainResource { /** * @param value {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) */ - public Claim setOrganization(Reference value) { + public Claim setOrganization(Type value) { this.organization = value; return this; } - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) - */ - public Claim setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - /** * @return {@link #use} (Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value */ @@ -4681,15 +5625,36 @@ public class Claim extends DomainResource { /** * @return {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) */ - public Reference getEnterer() { - if (this.enterer == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.enterer"); - else if (Configuration.doAutoCreate()) - this.enterer = new Reference(); // cc + public Type getEnterer() { return this.enterer; } + /** + * @return {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) + */ + public Identifier getEntererIdentifier() throws FHIRException { + if (!(this.enterer instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.enterer.getClass().getName()+" was encountered"); + return (Identifier) this.enterer; + } + + public boolean hasEntererIdentifier() { + return this.enterer instanceof Identifier; + } + + /** + * @return {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) + */ + public Reference getEntererReference() throws FHIRException { + if (!(this.enterer instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.enterer.getClass().getName()+" was encountered"); + return (Reference) this.enterer; + } + + public boolean hasEntererReference() { + return this.enterer instanceof Reference; + } + public boolean hasEnterer() { return this.enterer != null && !this.enterer.isEmpty(); } @@ -4697,43 +5662,44 @@ public class Claim extends DomainResource { /** * @param value {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) */ - public Claim setEnterer(Reference value) { + public Claim setEnterer(Type value) { this.enterer = value; return this; } - /** - * @return {@link #enterer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public Practitioner getEntererTarget() { - if (this.entererTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.enterer"); - else if (Configuration.doAutoCreate()) - this.entererTarget = new Practitioner(); // aa - return this.entererTarget; - } - - /** - * @param value {@link #enterer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public Claim setEntererTarget(Practitioner value) { - this.entererTarget = value; - return this; - } - /** * @return {@link #facility} (Facility where the services were provided.) */ - public Reference getFacility() { - if (this.facility == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.facility"); - else if (Configuration.doAutoCreate()) - this.facility = new Reference(); // cc + public Type getFacility() { return this.facility; } + /** + * @return {@link #facility} (Facility where the services were provided.) + */ + public Identifier getFacilityIdentifier() throws FHIRException { + if (!(this.facility instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.facility.getClass().getName()+" was encountered"); + return (Identifier) this.facility; + } + + public boolean hasFacilityIdentifier() { + return this.facility instanceof Identifier; + } + + /** + * @return {@link #facility} (Facility where the services were provided.) + */ + public Reference getFacilityReference() throws FHIRException { + if (!(this.facility instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.facility.getClass().getName()+" was encountered"); + return (Reference) this.facility; + } + + public boolean hasFacilityReference() { + return this.facility instanceof Reference; + } + public boolean hasFacility() { return this.facility != null && !this.facility.isEmpty(); } @@ -4741,104 +5707,84 @@ public class Claim extends DomainResource { /** * @param value {@link #facility} (Facility where the services were provided.) */ - public Claim setFacility(Reference value) { + public Claim setFacility(Type value) { this.facility = value; return this; } /** - * @return {@link #facility} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Facility where the services were provided.) + * @return {@link #related} (Other claims which are related to this claim such as prior claim versions or for related services.) */ - public Location getFacilityTarget() { - if (this.facilityTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.facility"); - else if (Configuration.doAutoCreate()) - this.facilityTarget = new Location(); // aa - return this.facilityTarget; + public List getRelated() { + if (this.related == null) + this.related = new ArrayList(); + return this.related; } - /** - * @param value {@link #facility} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Facility where the services were provided.) - */ - public Claim setFacilityTarget(Location value) { - this.facilityTarget = value; - return this; - } - - /** - * @return {@link #relatedClaim} (Other claims which are related to this claim such as prior claim versions or for related services.) - */ - public List getRelatedClaim() { - if (this.relatedClaim == null) - this.relatedClaim = new ArrayList(); - return this.relatedClaim; - } - - public boolean hasRelatedClaim() { - if (this.relatedClaim == null) + public boolean hasRelated() { + if (this.related == null) return false; - for (Reference item : this.relatedClaim) + for (RelatedClaimsComponent item : this.related) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #relatedClaim} (Other claims which are related to this claim such as prior claim versions or for related services.) + * @return {@link #related} (Other claims which are related to this claim such as prior claim versions or for related services.) */ // syntactic sugar - public Reference addRelatedClaim() { //3 - Reference t = new Reference(); - if (this.relatedClaim == null) - this.relatedClaim = new ArrayList(); - this.relatedClaim.add(t); + public RelatedClaimsComponent addRelated() { //3 + RelatedClaimsComponent t = new RelatedClaimsComponent(); + if (this.related == null) + this.related = new ArrayList(); + this.related.add(t); return t; } // syntactic sugar - public Claim addRelatedClaim(Reference t) { //3 + public Claim addRelated(RelatedClaimsComponent t) { //3 if (t == null) return this; - if (this.relatedClaim == null) - this.relatedClaim = new ArrayList(); - this.relatedClaim.add(t); + if (this.related == null) + this.related = new ArrayList(); + this.related.add(t); return this; } - /** - * @return {@link #relatedClaim} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Other claims which are related to this claim such as prior claim versions or for related services.) - */ - public List getRelatedClaimTarget() { - if (this.relatedClaimTarget == null) - this.relatedClaimTarget = new ArrayList(); - return this.relatedClaimTarget; - } - - // syntactic sugar - /** - * @return {@link #relatedClaim} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Other claims which are related to this claim such as prior claim versions or for related services.) - */ - public Claim addRelatedClaimTarget() { - Claim r = new Claim(); - if (this.relatedClaimTarget == null) - this.relatedClaimTarget = new ArrayList(); - this.relatedClaimTarget.add(r); - return r; - } - /** * @return {@link #prescription} (Prescription to support the dispensing of Pharmacy or Vision products.) */ - public Reference getPrescription() { - if (this.prescription == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.prescription"); - else if (Configuration.doAutoCreate()) - this.prescription = new Reference(); // cc + public Type getPrescription() { return this.prescription; } + /** + * @return {@link #prescription} (Prescription to support the dispensing of Pharmacy or Vision products.) + */ + public Identifier getPrescriptionIdentifier() throws FHIRException { + if (!(this.prescription instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.prescription.getClass().getName()+" was encountered"); + return (Identifier) this.prescription; + } + + public boolean hasPrescriptionIdentifier() { + return this.prescription instanceof Identifier; + } + + /** + * @return {@link #prescription} (Prescription to support the dispensing of Pharmacy or Vision products.) + */ + public Reference getPrescriptionReference() throws FHIRException { + if (!(this.prescription instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.prescription.getClass().getName()+" was encountered"); + return (Reference) this.prescription; + } + + public boolean hasPrescriptionReference() { + return this.prescription instanceof Reference; + } + public boolean hasPrescription() { return this.prescription != null && !this.prescription.isEmpty(); } @@ -4846,38 +5792,44 @@ public class Claim extends DomainResource { /** * @param value {@link #prescription} (Prescription to support the dispensing of Pharmacy or Vision products.) */ - public Claim setPrescription(Reference value) { + public Claim setPrescription(Type value) { this.prescription = value; return this; } - /** - * @return {@link #prescription} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Prescription to support the dispensing of Pharmacy or Vision products.) - */ - public Resource getPrescriptionTarget() { - return this.prescriptionTarget; - } - - /** - * @param value {@link #prescription} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Prescription to support the dispensing of Pharmacy or Vision products.) - */ - public Claim setPrescriptionTarget(Resource value) { - this.prescriptionTarget = value; - return this; - } - /** * @return {@link #originalPrescription} (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) */ - public Reference getOriginalPrescription() { - if (this.originalPrescription == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.originalPrescription"); - else if (Configuration.doAutoCreate()) - this.originalPrescription = new Reference(); // cc + public Type getOriginalPrescription() { return this.originalPrescription; } + /** + * @return {@link #originalPrescription} (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) + */ + public Identifier getOriginalPrescriptionIdentifier() throws FHIRException { + if (!(this.originalPrescription instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.originalPrescription.getClass().getName()+" was encountered"); + return (Identifier) this.originalPrescription; + } + + public boolean hasOriginalPrescriptionIdentifier() { + return this.originalPrescription instanceof Identifier; + } + + /** + * @return {@link #originalPrescription} (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) + */ + public Reference getOriginalPrescriptionReference() throws FHIRException { + if (!(this.originalPrescription instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.originalPrescription.getClass().getName()+" was encountered"); + return (Reference) this.originalPrescription; + } + + public boolean hasOriginalPrescriptionReference() { + return this.originalPrescription instanceof Reference; + } + public boolean hasOriginalPrescription() { return this.originalPrescription != null && !this.originalPrescription.isEmpty(); } @@ -4885,31 +5837,11 @@ public class Claim extends DomainResource { /** * @param value {@link #originalPrescription} (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) */ - public Claim setOriginalPrescription(Reference value) { + public Claim setOriginalPrescription(Type value) { this.originalPrescription = value; return this; } - /** - * @return {@link #originalPrescription} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) - */ - public MedicationOrder getOriginalPrescriptionTarget() { - if (this.originalPrescriptionTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.originalPrescription"); - else if (Configuration.doAutoCreate()) - this.originalPrescriptionTarget = new MedicationOrder(); // aa - return this.originalPrescriptionTarget; - } - - /** - * @param value {@link #originalPrescription} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) - */ - public Claim setOriginalPrescriptionTarget(MedicationOrder value) { - this.originalPrescriptionTarget = value; - return this; - } - /** * @return {@link #payee} (The party to be reimbursed for the services.) */ @@ -4937,15 +5869,36 @@ public class Claim extends DomainResource { /** * @return {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) */ - public Reference getReferral() { - if (this.referral == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.referral"); - else if (Configuration.doAutoCreate()) - this.referral = new Reference(); // cc + public Type getReferral() { return this.referral; } + /** + * @return {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) + */ + public Identifier getReferralIdentifier() throws FHIRException { + if (!(this.referral instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.referral.getClass().getName()+" was encountered"); + return (Identifier) this.referral; + } + + public boolean hasReferralIdentifier() { + return this.referral instanceof Identifier; + } + + /** + * @return {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) + */ + public Reference getReferralReference() throws FHIRException { + if (!(this.referral instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.referral.getClass().getName()+" was encountered"); + return (Reference) this.referral; + } + + public boolean hasReferralReference() { + return this.referral instanceof Reference; + } + public boolean hasReferral() { return this.referral != null && !this.referral.isEmpty(); } @@ -4953,28 +5906,128 @@ public class Claim extends DomainResource { /** * @param value {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) */ - public Claim setReferral(Reference value) { + public Claim setReferral(Type value) { this.referral = value; return this; } /** - * @return {@link #referral} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The referral resource which lists the date, practitioner, reason and other supporting information.) + * @return {@link #occurrenceCode} (**Insert definition of Occurrence codes.) */ - public ReferralRequest getReferralTarget() { - if (this.referralTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.referral"); - else if (Configuration.doAutoCreate()) - this.referralTarget = new ReferralRequest(); // aa - return this.referralTarget; + public List getOccurrenceCode() { + if (this.occurrenceCode == null) + this.occurrenceCode = new ArrayList(); + return this.occurrenceCode; + } + + public boolean hasOccurrenceCode() { + if (this.occurrenceCode == null) + return false; + for (Coding item : this.occurrenceCode) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #referral} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The referral resource which lists the date, practitioner, reason and other supporting information.) + * @return {@link #occurrenceCode} (**Insert definition of Occurrence codes.) */ - public Claim setReferralTarget(ReferralRequest value) { - this.referralTarget = value; + // syntactic sugar + public Coding addOccurrenceCode() { //3 + Coding t = new Coding(); + if (this.occurrenceCode == null) + this.occurrenceCode = new ArrayList(); + this.occurrenceCode.add(t); + return t; + } + + // syntactic sugar + public Claim addOccurrenceCode(Coding t) { //3 + if (t == null) + return this; + if (this.occurrenceCode == null) + this.occurrenceCode = new ArrayList(); + this.occurrenceCode.add(t); + return this; + } + + /** + * @return {@link #occurenceSpanCode} (**Insert definition of Occurrence Span codes.) + */ + public List getOccurenceSpanCode() { + if (this.occurenceSpanCode == null) + this.occurenceSpanCode = new ArrayList(); + return this.occurenceSpanCode; + } + + public boolean hasOccurenceSpanCode() { + if (this.occurenceSpanCode == null) + return false; + for (Coding item : this.occurenceSpanCode) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #occurenceSpanCode} (**Insert definition of Occurrence Span codes.) + */ + // syntactic sugar + public Coding addOccurenceSpanCode() { //3 + Coding t = new Coding(); + if (this.occurenceSpanCode == null) + this.occurenceSpanCode = new ArrayList(); + this.occurenceSpanCode.add(t); + return t; + } + + // syntactic sugar + public Claim addOccurenceSpanCode(Coding t) { //3 + if (t == null) + return this; + if (this.occurenceSpanCode == null) + this.occurenceSpanCode = new ArrayList(); + this.occurenceSpanCode.add(t); + return this; + } + + /** + * @return {@link #valueCode} (**Insert definition of Value codes.) + */ + public List getValueCode() { + if (this.valueCode == null) + this.valueCode = new ArrayList(); + return this.valueCode; + } + + public boolean hasValueCode() { + if (this.valueCode == null) + return false; + for (Coding item : this.valueCode) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #valueCode} (**Insert definition of Value codes.) + */ + // syntactic sugar + public Coding addValueCode() { //3 + Coding t = new Coding(); + if (this.valueCode == null) + this.valueCode = new ArrayList(); + this.valueCode.add(t); + return t; + } + + // syntactic sugar + public Claim addValueCode(Coding t) { //3 + if (t == null) + return this; + if (this.valueCode == null) + this.valueCode = new ArrayList(); + this.valueCode.add(t); return this; } @@ -5018,6 +6071,46 @@ public class Claim extends DomainResource { return this; } + /** + * @return {@link #procedure} (Ordered list of patient procedures performed to support the adjudication.) + */ + public List getProcedure() { + if (this.procedure == null) + this.procedure = new ArrayList(); + return this.procedure; + } + + public boolean hasProcedure() { + if (this.procedure == null) + return false; + for (ProcedureComponent item : this.procedure) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #procedure} (Ordered list of patient procedures performed to support the adjudication.) + */ + // syntactic sugar + public ProcedureComponent addProcedure() { //3 + ProcedureComponent t = new ProcedureComponent(); + if (this.procedure == null) + this.procedure = new ArrayList(); + this.procedure.add(t); + return t; + } + + // syntactic sugar + public Claim addProcedure(ProcedureComponent t) { //3 + if (t == null) + return this; + if (this.procedure == null) + this.procedure = new ArrayList(); + this.procedure.add(t); + return this; + } + /** * @return {@link #specialCondition} (List of special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication.) */ @@ -5061,15 +6154,36 @@ public class Claim extends DomainResource { /** * @return {@link #patient} (Patient Resource.) */ - public Reference getPatient() { - if (this.patient == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.patient"); - else if (Configuration.doAutoCreate()) - this.patient = new Reference(); // cc + public Type getPatient() { return this.patient; } + /** + * @return {@link #patient} (Patient Resource.) + */ + public Identifier getPatientIdentifier() throws FHIRException { + if (!(this.patient instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.patient.getClass().getName()+" was encountered"); + return (Identifier) this.patient; + } + + public boolean hasPatientIdentifier() { + return this.patient instanceof Identifier; + } + + /** + * @return {@link #patient} (Patient Resource.) + */ + public Reference getPatientReference() throws FHIRException { + if (!(this.patient instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.patient.getClass().getName()+" was encountered"); + return (Reference) this.patient; + } + + public boolean hasPatientReference() { + return this.patient instanceof Reference; + } + public boolean hasPatient() { return this.patient != null && !this.patient.isEmpty(); } @@ -5077,31 +6191,11 @@ public class Claim extends DomainResource { /** * @param value {@link #patient} (Patient Resource.) */ - public Claim setPatient(Reference value) { + public Claim setPatient(Type value) { this.patient = value; return this; } - /** - * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Patient Resource.) - */ - public Patient getPatientTarget() { - if (this.patientTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.patient"); - else if (Configuration.doAutoCreate()) - this.patientTarget = new Patient(); // aa - return this.patientTarget; - } - - /** - * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Patient Resource.) - */ - public Claim setPatientTarget(Patient value) { - this.patientTarget = value; - return this; - } - /** * @return {@link #coverage} (Financial instrument by which payment information for health care.) */ @@ -5142,95 +6236,6 @@ public class Claim extends DomainResource { return this; } - /** - * @return {@link #exception} (Factors which may influence the applicability of coverage.) - */ - public List getException() { - if (this.exception == null) - this.exception = new ArrayList(); - return this.exception; - } - - public boolean hasException() { - if (this.exception == null) - return false; - for (Coding item : this.exception) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #exception} (Factors which may influence the applicability of coverage.) - */ - // syntactic sugar - public Coding addException() { //3 - Coding t = new Coding(); - if (this.exception == null) - this.exception = new ArrayList(); - this.exception.add(t); - return t; - } - - // syntactic sugar - public Claim addException(Coding t) { //3 - if (t == null) - return this; - if (this.exception == null) - this.exception = new ArrayList(); - this.exception.add(t); - return this; - } - - /** - * @return {@link #school} (Name of school for over-aged dependants.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value - */ - public StringType getSchoolElement() { - if (this.school == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Claim.school"); - else if (Configuration.doAutoCreate()) - this.school = new StringType(); // bb - return this.school; - } - - public boolean hasSchoolElement() { - return this.school != null && !this.school.isEmpty(); - } - - public boolean hasSchool() { - return this.school != null && !this.school.isEmpty(); - } - - /** - * @param value {@link #school} (Name of school for over-aged dependants.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value - */ - public Claim setSchoolElement(StringType value) { - this.school = value; - return this; - } - - /** - * @return Name of school for over-aged dependants. - */ - public String getSchool() { - return this.school == null ? null : this.school.getValue(); - } - - /** - * @param value Name of school for over-aged dependants. - */ - public Claim setSchool(String value) { - if (Utilities.noString(value)) - this.school = null; - else { - if (this.school == null) - this.school = new StringType(); - this.school.setValue(value); - } - return this; - } - /** * @return {@link #accidentDate} (Date of an accident which these services are addressing.). This is the underlying object with id, value and extensions. The accessor "getAccidentDate" gives direct access to the value */ @@ -5311,19 +6316,6 @@ public class Claim extends DomainResource { return this.accidentLocation; } - /** - * @return {@link #accidentLocation} (Accident Place.) - */ - public StringType getAccidentLocationStringType() throws FHIRException { - if (!(this.accidentLocation instanceof StringType)) - throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.accidentLocation.getClass().getName()+" was encountered"); - return (StringType) this.accidentLocation; - } - - public boolean hasAccidentLocationStringType() { - return this.accidentLocation instanceof StringType; - } - /** * @return {@link #accidentLocation} (Accident Place.) */ @@ -5403,47 +6395,42 @@ public class Claim extends DomainResource { } /** - * @return {@link #onset} (The start or start and end dates for the treatable condition.) + * @return {@link #onset} (Period, start and last dates of aspects of the Condition or related services.) */ - public Type getOnset() { + public List getOnset() { + if (this.onset == null) + this.onset = new ArrayList(); return this.onset; } - /** - * @return {@link #onset} (The start or start and end dates for the treatable condition.) - */ - public DateType getOnsetDateType() throws FHIRException { - if (!(this.onset instanceof DateType)) - throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.onset.getClass().getName()+" was encountered"); - return (DateType) this.onset; - } - - public boolean hasOnsetDateType() { - return this.onset instanceof DateType; - } - - /** - * @return {@link #onset} (The start or start and end dates for the treatable condition.) - */ - public Period getOnsetPeriod() throws FHIRException { - if (!(this.onset instanceof Period)) - throw new FHIRException("Type mismatch: the type Period was expected, but "+this.onset.getClass().getName()+" was encountered"); - return (Period) this.onset; - } - - public boolean hasOnsetPeriod() { - return this.onset instanceof Period; - } - public boolean hasOnset() { - return this.onset != null && !this.onset.isEmpty(); + if (this.onset == null) + return false; + for (OnsetComponent item : this.onset) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #onset} (The start or start and end dates for the treatable condition.) + * @return {@link #onset} (Period, start and last dates of aspects of the Condition or related services.) */ - public Claim setOnset(Type value) { - this.onset = value; + // syntactic sugar + public OnsetComponent addOnset() { //3 + OnsetComponent t = new OnsetComponent(); + if (this.onset == null) + this.onset = new ArrayList(); + this.onset.add(t); + return t; + } + + // syntactic sugar + public Claim addOnset(OnsetComponent t) { //3 + if (t == null) + return this; + if (this.onset == null) + this.onset = new ArrayList(); + this.onset.add(t); return this; } @@ -5560,42 +6547,42 @@ public class Claim extends DomainResource { } /** - * @return {@link #additionalMaterials} (Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.) + * @return {@link #additionalMaterial} (Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.) */ - public List getAdditionalMaterials() { - if (this.additionalMaterials == null) - this.additionalMaterials = new ArrayList(); - return this.additionalMaterials; + public List getAdditionalMaterial() { + if (this.additionalMaterial == null) + this.additionalMaterial = new ArrayList(); + return this.additionalMaterial; } - public boolean hasAdditionalMaterials() { - if (this.additionalMaterials == null) + public boolean hasAdditionalMaterial() { + if (this.additionalMaterial == null) return false; - for (Coding item : this.additionalMaterials) + for (Coding item : this.additionalMaterial) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #additionalMaterials} (Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.) + * @return {@link #additionalMaterial} (Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.) */ // syntactic sugar - public Coding addAdditionalMaterials() { //3 + public Coding addAdditionalMaterial() { //3 Coding t = new Coding(); - if (this.additionalMaterials == null) - this.additionalMaterials = new ArrayList(); - this.additionalMaterials.add(t); + if (this.additionalMaterial == null) + this.additionalMaterial = new ArrayList(); + this.additionalMaterial.add(t); return t; } // syntactic sugar - public Claim addAdditionalMaterials(Coding t) { //3 + public Claim addAdditionalMaterial(Coding t) { //3 if (t == null) return this; - if (this.additionalMaterials == null) - this.additionalMaterials = new ArrayList(); - this.additionalMaterials.add(t); + if (this.additionalMaterial == null) + this.additionalMaterial = new ArrayList(); + this.additionalMaterial.add(t); return this; } @@ -5641,41 +6628,44 @@ public class Claim extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("type", "code", "The category of claim this is.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("identifier", "Identifier", "The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("type", "code", "The category of claim.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("subType", "Coding", "A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType.", 0, java.lang.Integer.MAX_VALUE, subType)); + childrenList.add(new Property("identifier", "Identifier", "The business identifier for the instance: claim number, pre-determination or pre-authorization number.", 0, java.lang.Integer.MAX_VALUE, identifier)); childrenList.add(new Property("ruleset", "Coding", "The version of the specification on which this instance relies.", 0, java.lang.Integer.MAX_VALUE, ruleset)); childrenList.add(new Property("originalRuleset", "Coding", "The version of the specification from which the original instance was created.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); childrenList.add(new Property("billablePeriod", "Period", "The billable period for which charges are being submitted.", 0, java.lang.Integer.MAX_VALUE, billablePeriod)); - childrenList.add(new Property("target", "Reference(Organization)", "Insurer Identifier, typical BIN number (6 digit).", 0, java.lang.Integer.MAX_VALUE, target)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The provider which is responsible for the bill, claim pre-determination, pre-authorization.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the bill, claim pre-determination, pre-authorization.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("target[x]", "Identifier|Reference(Organization)", "Insurer Identifier, typical BIN number (6 digit).", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("provider[x]", "Identifier|Reference(Practitioner)", "The provider which is responsible for the bill, claim pre-determination, pre-authorization.", 0, java.lang.Integer.MAX_VALUE, provider)); + childrenList.add(new Property("organization[x]", "Identifier|Reference(Organization)", "The organization which is responsible for the bill, claim pre-determination, pre-authorization.", 0, java.lang.Integer.MAX_VALUE, organization)); childrenList.add(new Property("use", "code", "Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).", 0, java.lang.Integer.MAX_VALUE, use)); childrenList.add(new Property("priority", "Coding", "Immediate (STAT), best effort (NORMAL), deferred (DEFER).", 0, java.lang.Integer.MAX_VALUE, priority)); childrenList.add(new Property("fundsReserve", "Coding", "In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.", 0, java.lang.Integer.MAX_VALUE, fundsReserve)); - childrenList.add(new Property("enterer", "Reference(Practitioner)", "Person who created the invoice/claim/pre-determination or pre-authorization.", 0, java.lang.Integer.MAX_VALUE, enterer)); - childrenList.add(new Property("facility", "Reference(Location)", "Facility where the services were provided.", 0, java.lang.Integer.MAX_VALUE, facility)); - childrenList.add(new Property("relatedClaim", "Reference(Claim)", "Other claims which are related to this claim such as prior claim versions or for related services.", 0, java.lang.Integer.MAX_VALUE, relatedClaim)); - childrenList.add(new Property("prescription", "Reference(MedicationOrder|VisionPrescription)", "Prescription to support the dispensing of Pharmacy or Vision products.", 0, java.lang.Integer.MAX_VALUE, prescription)); - childrenList.add(new Property("originalPrescription", "Reference(MedicationOrder)", "Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.", 0, java.lang.Integer.MAX_VALUE, originalPrescription)); + childrenList.add(new Property("enterer[x]", "Identifier|Reference(Practitioner)", "Person who created the invoice/claim/pre-determination or pre-authorization.", 0, java.lang.Integer.MAX_VALUE, enterer)); + childrenList.add(new Property("facility[x]", "Identifier|Reference(Location)", "Facility where the services were provided.", 0, java.lang.Integer.MAX_VALUE, facility)); + childrenList.add(new Property("related", "", "Other claims which are related to this claim such as prior claim versions or for related services.", 0, java.lang.Integer.MAX_VALUE, related)); + childrenList.add(new Property("prescription[x]", "Identifier|Reference(MedicationOrder|VisionPrescription)", "Prescription to support the dispensing of Pharmacy or Vision products.", 0, java.lang.Integer.MAX_VALUE, prescription)); + childrenList.add(new Property("originalPrescription[x]", "Identifier|Reference(MedicationOrder)", "Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.", 0, java.lang.Integer.MAX_VALUE, originalPrescription)); childrenList.add(new Property("payee", "", "The party to be reimbursed for the services.", 0, java.lang.Integer.MAX_VALUE, payee)); - childrenList.add(new Property("referral", "Reference(ReferralRequest)", "The referral resource which lists the date, practitioner, reason and other supporting information.", 0, java.lang.Integer.MAX_VALUE, referral)); + childrenList.add(new Property("referral[x]", "Identifier|Reference(ReferralRequest)", "The referral resource which lists the date, practitioner, reason and other supporting information.", 0, java.lang.Integer.MAX_VALUE, referral)); + childrenList.add(new Property("occurrenceCode", "Coding", "**Insert definition of Occurrence codes.", 0, java.lang.Integer.MAX_VALUE, occurrenceCode)); + childrenList.add(new Property("occurenceSpanCode", "Coding", "**Insert definition of Occurrence Span codes.", 0, java.lang.Integer.MAX_VALUE, occurenceSpanCode)); + childrenList.add(new Property("valueCode", "Coding", "**Insert definition of Value codes.", 0, java.lang.Integer.MAX_VALUE, valueCode)); childrenList.add(new Property("diagnosis", "", "Ordered list of patient diagnosis for which care is sought.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); + childrenList.add(new Property("procedure", "", "Ordered list of patient procedures performed to support the adjudication.", 0, java.lang.Integer.MAX_VALUE, procedure)); childrenList.add(new Property("specialCondition", "Coding", "List of special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication.", 0, java.lang.Integer.MAX_VALUE, specialCondition)); - childrenList.add(new Property("patient", "Reference(Patient)", "Patient Resource.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("patient[x]", "Identifier|Reference(Patient)", "Patient Resource.", 0, java.lang.Integer.MAX_VALUE, patient)); childrenList.add(new Property("coverage", "", "Financial instrument by which payment information for health care.", 0, java.lang.Integer.MAX_VALUE, coverage)); - childrenList.add(new Property("exception", "Coding", "Factors which may influence the applicability of coverage.", 0, java.lang.Integer.MAX_VALUE, exception)); - childrenList.add(new Property("school", "string", "Name of school for over-aged dependants.", 0, java.lang.Integer.MAX_VALUE, school)); childrenList.add(new Property("accidentDate", "date", "Date of an accident which these services are addressing.", 0, java.lang.Integer.MAX_VALUE, accidentDate)); childrenList.add(new Property("accidentType", "Coding", "Type of accident: work, auto, etc.", 0, java.lang.Integer.MAX_VALUE, accidentType)); - childrenList.add(new Property("accidentLocation[x]", "string|Address|Reference(Location)", "Accident Place.", 0, java.lang.Integer.MAX_VALUE, accidentLocation)); + childrenList.add(new Property("accidentLocation[x]", "Address|Reference(Location)", "Accident Place.", 0, java.lang.Integer.MAX_VALUE, accidentLocation)); childrenList.add(new Property("interventionException", "Coding", "A list of intervention and exception codes which may influence the adjudication of the claim.", 0, java.lang.Integer.MAX_VALUE, interventionException)); - childrenList.add(new Property("onset[x]", "date|Period", "The start or start and end dates for the treatable condition.", 0, java.lang.Integer.MAX_VALUE, onset)); + childrenList.add(new Property("onset", "", "Period, start and last dates of aspects of the Condition or related services.", 0, java.lang.Integer.MAX_VALUE, onset)); childrenList.add(new Property("employmentImpacted", "Period", "The start and optional end dates of when the patient was precluded from working due to the treatable condition(s).", 0, java.lang.Integer.MAX_VALUE, employmentImpacted)); childrenList.add(new Property("hospitalization", "Period", "The start and optional end dates of when the patient was confined to a treatment center.", 0, java.lang.Integer.MAX_VALUE, hospitalization)); childrenList.add(new Property("item", "", "First tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, item)); childrenList.add(new Property("total", "Money", "The total value of the claim.", 0, java.lang.Integer.MAX_VALUE, total)); - childrenList.add(new Property("additionalMaterials", "Coding", "Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.", 0, java.lang.Integer.MAX_VALUE, additionalMaterials)); + childrenList.add(new Property("additionalMaterial", "Coding", "Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.", 0, java.lang.Integer.MAX_VALUE, additionalMaterial)); childrenList.add(new Property("missingTeeth", "", "A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.", 0, java.lang.Integer.MAX_VALUE, missingTeeth)); } @@ -5683,6 +6673,8 @@ public class Claim extends DomainResource { public void setProperty(String name, Base value) throws FHIRException { if (name.equals("type")) this.type = new ClaimTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("subType")) + this.getSubType().add(castToCoding(value)); else if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); else if (name.equals("ruleset")) @@ -5693,44 +6685,48 @@ public class Claim extends DomainResource { this.created = castToDateTime(value); // DateTimeType else if (name.equals("billablePeriod")) this.billablePeriod = castToPeriod(value); // Period - else if (name.equals("target")) - this.target = castToReference(value); // Reference - else if (name.equals("provider")) - this.provider = castToReference(value); // Reference - else if (name.equals("organization")) - this.organization = castToReference(value); // Reference + else if (name.equals("target[x]")) + this.target = (Type) value; // Type + else if (name.equals("provider[x]")) + this.provider = (Type) value; // Type + else if (name.equals("organization[x]")) + this.organization = (Type) value; // Type else if (name.equals("use")) this.use = new UseEnumFactory().fromType(value); // Enumeration else if (name.equals("priority")) this.priority = castToCoding(value); // Coding else if (name.equals("fundsReserve")) this.fundsReserve = castToCoding(value); // Coding - else if (name.equals("enterer")) - this.enterer = castToReference(value); // Reference - else if (name.equals("facility")) - this.facility = castToReference(value); // Reference - else if (name.equals("relatedClaim")) - this.getRelatedClaim().add(castToReference(value)); - else if (name.equals("prescription")) - this.prescription = castToReference(value); // Reference - else if (name.equals("originalPrescription")) - this.originalPrescription = castToReference(value); // Reference + else if (name.equals("enterer[x]")) + this.enterer = (Type) value; // Type + else if (name.equals("facility[x]")) + this.facility = (Type) value; // Type + else if (name.equals("related")) + this.getRelated().add((RelatedClaimsComponent) value); + else if (name.equals("prescription[x]")) + this.prescription = (Type) value; // Type + else if (name.equals("originalPrescription[x]")) + this.originalPrescription = (Type) value; // Type else if (name.equals("payee")) this.payee = (PayeeComponent) value; // PayeeComponent - else if (name.equals("referral")) - this.referral = castToReference(value); // Reference + else if (name.equals("referral[x]")) + this.referral = (Type) value; // Type + else if (name.equals("occurrenceCode")) + this.getOccurrenceCode().add(castToCoding(value)); + else if (name.equals("occurenceSpanCode")) + this.getOccurenceSpanCode().add(castToCoding(value)); + else if (name.equals("valueCode")) + this.getValueCode().add(castToCoding(value)); else if (name.equals("diagnosis")) this.getDiagnosis().add((DiagnosisComponent) value); + else if (name.equals("procedure")) + this.getProcedure().add((ProcedureComponent) value); else if (name.equals("specialCondition")) this.getSpecialCondition().add(castToCoding(value)); - else if (name.equals("patient")) - this.patient = castToReference(value); // Reference + else if (name.equals("patient[x]")) + this.patient = (Type) value; // Type else if (name.equals("coverage")) this.getCoverage().add((CoverageComponent) value); - else if (name.equals("exception")) - this.getException().add(castToCoding(value)); - else if (name.equals("school")) - this.school = castToString(value); // StringType else if (name.equals("accidentDate")) this.accidentDate = castToDate(value); // DateType else if (name.equals("accidentType")) @@ -5739,8 +6735,8 @@ public class Claim extends DomainResource { this.accidentLocation = (Type) value; // Type else if (name.equals("interventionException")) this.getInterventionException().add(castToCoding(value)); - else if (name.equals("onset[x]")) - this.onset = (Type) value; // Type + else if (name.equals("onset")) + this.getOnset().add((OnsetComponent) value); else if (name.equals("employmentImpacted")) this.employmentImpacted = castToPeriod(value); // Period else if (name.equals("hospitalization")) @@ -5749,8 +6745,8 @@ public class Claim extends DomainResource { this.getItem().add((ItemsComponent) value); else if (name.equals("total")) this.total = castToMoney(value); // Money - else if (name.equals("additionalMaterials")) - this.getAdditionalMaterials().add(castToCoding(value)); + else if (name.equals("additionalMaterial")) + this.getAdditionalMaterial().add(castToCoding(value)); else if (name.equals("missingTeeth")) this.getMissingTeeth().add((MissingTeethComponent) value); else @@ -5762,6 +6758,9 @@ public class Claim extends DomainResource { if (name.equals("type")) { throw new FHIRException("Cannot call addChild on a primitive type Claim.type"); } + else if (name.equals("subType")) { + return addSubType(); + } else if (name.equals("identifier")) { return addIdentifier(); } @@ -5780,15 +6779,27 @@ public class Claim extends DomainResource { this.billablePeriod = new Period(); return this.billablePeriod; } - else if (name.equals("target")) { + else if (name.equals("targetIdentifier")) { + this.target = new Identifier(); + return this.target; + } + else if (name.equals("targetReference")) { this.target = new Reference(); return this.target; } - else if (name.equals("provider")) { + else if (name.equals("providerIdentifier")) { + this.provider = new Identifier(); + return this.provider; + } + else if (name.equals("providerReference")) { this.provider = new Reference(); return this.provider; } - else if (name.equals("organization")) { + else if (name.equals("organizationIdentifier")) { + this.organization = new Identifier(); + return this.organization; + } + else if (name.equals("organizationReference")) { this.organization = new Reference(); return this.organization; } @@ -5803,22 +6814,38 @@ public class Claim extends DomainResource { this.fundsReserve = new Coding(); return this.fundsReserve; } - else if (name.equals("enterer")) { + else if (name.equals("entererIdentifier")) { + this.enterer = new Identifier(); + return this.enterer; + } + else if (name.equals("entererReference")) { this.enterer = new Reference(); return this.enterer; } - else if (name.equals("facility")) { + else if (name.equals("facilityIdentifier")) { + this.facility = new Identifier(); + return this.facility; + } + else if (name.equals("facilityReference")) { this.facility = new Reference(); return this.facility; } - else if (name.equals("relatedClaim")) { - return addRelatedClaim(); + else if (name.equals("related")) { + return addRelated(); } - else if (name.equals("prescription")) { + else if (name.equals("prescriptionIdentifier")) { + this.prescription = new Identifier(); + return this.prescription; + } + else if (name.equals("prescriptionReference")) { this.prescription = new Reference(); return this.prescription; } - else if (name.equals("originalPrescription")) { + else if (name.equals("originalPrescriptionIdentifier")) { + this.originalPrescription = new Identifier(); + return this.originalPrescription; + } + else if (name.equals("originalPrescriptionReference")) { this.originalPrescription = new Reference(); return this.originalPrescription; } @@ -5826,29 +6853,43 @@ public class Claim extends DomainResource { this.payee = new PayeeComponent(); return this.payee; } - else if (name.equals("referral")) { + else if (name.equals("referralIdentifier")) { + this.referral = new Identifier(); + return this.referral; + } + else if (name.equals("referralReference")) { this.referral = new Reference(); return this.referral; } + else if (name.equals("occurrenceCode")) { + return addOccurrenceCode(); + } + else if (name.equals("occurenceSpanCode")) { + return addOccurenceSpanCode(); + } + else if (name.equals("valueCode")) { + return addValueCode(); + } else if (name.equals("diagnosis")) { return addDiagnosis(); } + else if (name.equals("procedure")) { + return addProcedure(); + } else if (name.equals("specialCondition")) { return addSpecialCondition(); } - else if (name.equals("patient")) { + else if (name.equals("patientIdentifier")) { + this.patient = new Identifier(); + return this.patient; + } + else if (name.equals("patientReference")) { this.patient = new Reference(); return this.patient; } else if (name.equals("coverage")) { return addCoverage(); } - else if (name.equals("exception")) { - return addException(); - } - else if (name.equals("school")) { - throw new FHIRException("Cannot call addChild on a primitive type Claim.school"); - } else if (name.equals("accidentDate")) { throw new FHIRException("Cannot call addChild on a primitive type Claim.accidentDate"); } @@ -5856,10 +6897,6 @@ public class Claim extends DomainResource { this.accidentType = new Coding(); return this.accidentType; } - else if (name.equals("accidentLocationString")) { - this.accidentLocation = new StringType(); - return this.accidentLocation; - } else if (name.equals("accidentLocationAddress")) { this.accidentLocation = new Address(); return this.accidentLocation; @@ -5871,13 +6908,8 @@ public class Claim extends DomainResource { else if (name.equals("interventionException")) { return addInterventionException(); } - else if (name.equals("onsetDate")) { - this.onset = new DateType(); - return this.onset; - } - else if (name.equals("onsetPeriod")) { - this.onset = new Period(); - return this.onset; + else if (name.equals("onset")) { + return addOnset(); } else if (name.equals("employmentImpacted")) { this.employmentImpacted = new Period(); @@ -5894,8 +6926,8 @@ public class Claim extends DomainResource { this.total = new Money(); return this.total; } - else if (name.equals("additionalMaterials")) { - return addAdditionalMaterials(); + else if (name.equals("additionalMaterial")) { + return addAdditionalMaterial(); } else if (name.equals("missingTeeth")) { return addMissingTeeth(); @@ -5913,6 +6945,11 @@ public class Claim extends DomainResource { Claim dst = new Claim(); copyValues(dst); dst.type = type == null ? null : type.copy(); + if (subType != null) { + dst.subType = new ArrayList(); + for (Coding i : subType) + dst.subType.add(i.copy()); + }; if (identifier != null) { dst.identifier = new ArrayList(); for (Identifier i : identifier) @@ -5930,20 +6967,40 @@ public class Claim extends DomainResource { dst.fundsReserve = fundsReserve == null ? null : fundsReserve.copy(); dst.enterer = enterer == null ? null : enterer.copy(); dst.facility = facility == null ? null : facility.copy(); - if (relatedClaim != null) { - dst.relatedClaim = new ArrayList(); - for (Reference i : relatedClaim) - dst.relatedClaim.add(i.copy()); + if (related != null) { + dst.related = new ArrayList(); + for (RelatedClaimsComponent i : related) + dst.related.add(i.copy()); }; dst.prescription = prescription == null ? null : prescription.copy(); dst.originalPrescription = originalPrescription == null ? null : originalPrescription.copy(); dst.payee = payee == null ? null : payee.copy(); dst.referral = referral == null ? null : referral.copy(); + if (occurrenceCode != null) { + dst.occurrenceCode = new ArrayList(); + for (Coding i : occurrenceCode) + dst.occurrenceCode.add(i.copy()); + }; + if (occurenceSpanCode != null) { + dst.occurenceSpanCode = new ArrayList(); + for (Coding i : occurenceSpanCode) + dst.occurenceSpanCode.add(i.copy()); + }; + if (valueCode != null) { + dst.valueCode = new ArrayList(); + for (Coding i : valueCode) + dst.valueCode.add(i.copy()); + }; if (diagnosis != null) { dst.diagnosis = new ArrayList(); for (DiagnosisComponent i : diagnosis) dst.diagnosis.add(i.copy()); }; + if (procedure != null) { + dst.procedure = new ArrayList(); + for (ProcedureComponent i : procedure) + dst.procedure.add(i.copy()); + }; if (specialCondition != null) { dst.specialCondition = new ArrayList(); for (Coding i : specialCondition) @@ -5955,12 +7012,6 @@ public class Claim extends DomainResource { for (CoverageComponent i : coverage) dst.coverage.add(i.copy()); }; - if (exception != null) { - dst.exception = new ArrayList(); - for (Coding i : exception) - dst.exception.add(i.copy()); - }; - dst.school = school == null ? null : school.copy(); dst.accidentDate = accidentDate == null ? null : accidentDate.copy(); dst.accidentType = accidentType == null ? null : accidentType.copy(); dst.accidentLocation = accidentLocation == null ? null : accidentLocation.copy(); @@ -5969,7 +7020,11 @@ public class Claim extends DomainResource { for (Coding i : interventionException) dst.interventionException.add(i.copy()); }; - dst.onset = onset == null ? null : onset.copy(); + if (onset != null) { + dst.onset = new ArrayList(); + for (OnsetComponent i : onset) + dst.onset.add(i.copy()); + }; dst.employmentImpacted = employmentImpacted == null ? null : employmentImpacted.copy(); dst.hospitalization = hospitalization == null ? null : hospitalization.copy(); if (item != null) { @@ -5978,10 +7033,10 @@ public class Claim extends DomainResource { dst.item.add(i.copy()); }; dst.total = total == null ? null : total.copy(); - if (additionalMaterials != null) { - dst.additionalMaterials = new ArrayList(); - for (Coding i : additionalMaterials) - dst.additionalMaterials.add(i.copy()); + if (additionalMaterial != null) { + dst.additionalMaterial = new ArrayList(); + for (Coding i : additionalMaterial) + dst.additionalMaterial.add(i.copy()); }; if (missingTeeth != null) { dst.missingTeeth = new ArrayList(); @@ -6002,21 +7057,22 @@ public class Claim extends DomainResource { if (!(other instanceof Claim)) return false; Claim o = (Claim) other; - return compareDeep(type, o.type, true) && compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) - && compareDeep(originalRuleset, o.originalRuleset, true) && compareDeep(created, o.created, true) - && compareDeep(billablePeriod, o.billablePeriod, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) - && compareDeep(organization, o.organization, true) && compareDeep(use, o.use, true) && compareDeep(priority, o.priority, true) - && compareDeep(fundsReserve, o.fundsReserve, true) && compareDeep(enterer, o.enterer, true) && compareDeep(facility, o.facility, true) - && compareDeep(relatedClaim, o.relatedClaim, true) && compareDeep(prescription, o.prescription, true) - && compareDeep(originalPrescription, o.originalPrescription, true) && compareDeep(payee, o.payee, true) - && compareDeep(referral, o.referral, true) && compareDeep(diagnosis, o.diagnosis, true) && compareDeep(specialCondition, o.specialCondition, true) - && compareDeep(patient, o.patient, true) && compareDeep(coverage, o.coverage, true) && compareDeep(exception, o.exception, true) - && compareDeep(school, o.school, true) && compareDeep(accidentDate, o.accidentDate, true) && compareDeep(accidentType, o.accidentType, true) - && compareDeep(accidentLocation, o.accidentLocation, true) && compareDeep(interventionException, o.interventionException, true) - && compareDeep(onset, o.onset, true) && compareDeep(employmentImpacted, o.employmentImpacted, true) - && compareDeep(hospitalization, o.hospitalization, true) && compareDeep(item, o.item, true) && compareDeep(total, o.total, true) - && compareDeep(additionalMaterials, o.additionalMaterials, true) && compareDeep(missingTeeth, o.missingTeeth, true) - ; + return compareDeep(type, o.type, true) && compareDeep(subType, o.subType, true) && compareDeep(identifier, o.identifier, true) + && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) + && compareDeep(created, o.created, true) && compareDeep(billablePeriod, o.billablePeriod, true) + && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) && compareDeep(organization, o.organization, true) + && compareDeep(use, o.use, true) && compareDeep(priority, o.priority, true) && compareDeep(fundsReserve, o.fundsReserve, true) + && compareDeep(enterer, o.enterer, true) && compareDeep(facility, o.facility, true) && compareDeep(related, o.related, true) + && compareDeep(prescription, o.prescription, true) && compareDeep(originalPrescription, o.originalPrescription, true) + && compareDeep(payee, o.payee, true) && compareDeep(referral, o.referral, true) && compareDeep(occurrenceCode, o.occurrenceCode, true) + && compareDeep(occurenceSpanCode, o.occurenceSpanCode, true) && compareDeep(valueCode, o.valueCode, true) + && compareDeep(diagnosis, o.diagnosis, true) && compareDeep(procedure, o.procedure, true) && compareDeep(specialCondition, o.specialCondition, true) + && compareDeep(patient, o.patient, true) && compareDeep(coverage, o.coverage, true) && compareDeep(accidentDate, o.accidentDate, true) + && compareDeep(accidentType, o.accidentType, true) && compareDeep(accidentLocation, o.accidentLocation, true) + && compareDeep(interventionException, o.interventionException, true) && compareDeep(onset, o.onset, true) + && compareDeep(employmentImpacted, o.employmentImpacted, true) && compareDeep(hospitalization, o.hospitalization, true) + && compareDeep(item, o.item, true) && compareDeep(total, o.total, true) && compareDeep(additionalMaterial, o.additionalMaterial, true) + && compareDeep(missingTeeth, o.missingTeeth, true); } @Override @@ -6027,26 +7083,17 @@ public class Claim extends DomainResource { return false; Claim o = (Claim) other; return compareValues(type, o.type, true) && compareValues(created, o.created, true) && compareValues(use, o.use, true) - && compareValues(school, o.school, true) && compareValues(accidentDate, o.accidentDate, true); + && compareValues(accidentDate, o.accidentDate, true); } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) - && (created == null || created.isEmpty()) && (billablePeriod == null || billablePeriod.isEmpty()) - && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) - && (use == null || use.isEmpty()) && (priority == null || priority.isEmpty()) && (fundsReserve == null || fundsReserve.isEmpty()) - && (enterer == null || enterer.isEmpty()) && (facility == null || facility.isEmpty()) && (relatedClaim == null || relatedClaim.isEmpty()) - && (prescription == null || prescription.isEmpty()) && (originalPrescription == null || originalPrescription.isEmpty()) - && (payee == null || payee.isEmpty()) && (referral == null || referral.isEmpty()) && (diagnosis == null || diagnosis.isEmpty()) - && (specialCondition == null || specialCondition.isEmpty()) && (patient == null || patient.isEmpty()) - && (coverage == null || coverage.isEmpty()) && (exception == null || exception.isEmpty()) - && (school == null || school.isEmpty()) && (accidentDate == null || accidentDate.isEmpty()) - && (accidentType == null || accidentType.isEmpty()) && (accidentLocation == null || accidentLocation.isEmpty()) - && (interventionException == null || interventionException.isEmpty()) && (onset == null || onset.isEmpty()) - && (employmentImpacted == null || employmentImpacted.isEmpty()) && (hospitalization == null || hospitalization.isEmpty()) - && (item == null || item.isEmpty()) && (total == null || total.isEmpty()) && (additionalMaterials == null || additionalMaterials.isEmpty()) - && (missingTeeth == null || missingTeeth.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, subType, identifier, ruleset + , originalRuleset, created, billablePeriod, target, provider, organization, use, priority + , fundsReserve, enterer, facility, related, prescription, originalPrescription, payee + , referral, occurrenceCode, occurenceSpanCode, valueCode, diagnosis, procedure, specialCondition + , patient, coverage, accidentDate, accidentType, accidentLocation, interventionException + , onset, employmentImpacted, hospitalization, item, total, additionalMaterial, missingTeeth + ); } @Override @@ -6075,30 +7122,44 @@ public class Claim extends DomainResource { public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); /** - * Search parameter: provider + * Search parameter: patientidentifier *

- * Description: Provider responsible for the Claim
- * Type: reference
- * Path: Claim.provider
+ * Description: Patient receiving the services
+ * Type: token
+ * Path: Claim.patientIdentifier
*

*/ - @SearchParamDefinition(name="provider", path="Claim.provider", description="Provider responsible for the Claim", type="reference" ) - public static final String SP_PROVIDER = "provider"; + @SearchParamDefinition(name="patientidentifier", path="Claim.patientIdentifier", description="Patient receiving the services", type="token", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) + public static final String SP_PATIENTIDENTIFIER = "patientidentifier"; /** - * Fluent Client search parameter constant for provider + * Fluent Client search parameter constant for patientidentifier *

- * Description: Provider responsible for the Claim
- * Type: reference
- * Path: Claim.provider
+ * Description: Patient receiving the services
+ * Type: token
+ * Path: Claim.patientIdentifier
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDER); + public static final ca.uhn.fhir.rest.gclient.TokenClientParam PATIENTIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PATIENTIDENTIFIER); -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Claim:provider". + /** + * Search parameter: organizationidentifier + *

+ * Description: The reference to the providing organization
+ * Type: token
+ * Path: Claim.organizationIdentifier
+ *

*/ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDER = new ca.uhn.fhir.model.api.Include("Claim:provider").toLocked(); + @SearchParamDefinition(name="organizationidentifier", path="Claim.organizationIdentifier", description="The reference to the providing organization", type="token" ) + public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier"; + /** + * Fluent Client search parameter constant for organizationidentifier + *

+ * Description: The reference to the providing organization
+ * Type: token
+ * Path: Claim.organizationIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam ORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ORGANIZATIONIDENTIFIER); /** * Search parameter: use @@ -6120,32 +7181,6 @@ public class Claim extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam USE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_USE); - /** - * Search parameter: patient - *

- * Description: Patient receiveing the services
- * Type: reference
- * Path: Claim.patient
- *

- */ - @SearchParamDefinition(name="patient", path="Claim.patient", description="Patient receiveing the services", type="reference" ) - public static final String SP_PATIENT = "patient"; - /** - * Fluent Client search parameter constant for patient - *

- * Description: Patient receiveing the services
- * Type: reference
- * Path: Claim.patient
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Claim:patient". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Claim:patient").toLocked(); - /** * Search parameter: created *

@@ -6167,30 +7202,82 @@ public class Claim extends DomainResource { public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED); /** - * Search parameter: organization + * Search parameter: patientreference *

- * Description: The reference to the providing organization
+ * Description: Patient receiving the services
* Type: reference
- * Path: Claim.organization
+ * Path: Claim.patientReference
*

*/ - @SearchParamDefinition(name="organization", path="Claim.organization", description="The reference to the providing organization", type="reference" ) - public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="patientreference", path="Claim.patientReference", description="Patient receiving the services", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) + public static final String SP_PATIENTREFERENCE = "patientreference"; /** - * Fluent Client search parameter constant for organization + * Fluent Client search parameter constant for patientreference *

- * Description: The reference to the providing organization
+ * Description: Patient receiving the services
* Type: reference
- * Path: Claim.organization
+ * Path: Claim.patientReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENTREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENTREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Claim:organization". + * the path value of "Claim:patientreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("Claim:organization").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENTREFERENCE = new ca.uhn.fhir.model.api.Include("Claim:patientreference").toLocked(); + + /** + * Search parameter: providerreference + *

+ * Description: Provider responsible for the Claim
+ * Type: reference
+ * Path: Claim.providerReference
+ *

+ */ + @SearchParamDefinition(name="providerreference", path="Claim.providerReference", description="Provider responsible for the Claim", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) + public static final String SP_PROVIDERREFERENCE = "providerreference"; + /** + * Fluent Client search parameter constant for providerreference + *

+ * Description: Provider responsible for the Claim
+ * Type: reference
+ * Path: Claim.providerReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDERREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDERREFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Claim:providerreference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDERREFERENCE = new ca.uhn.fhir.model.api.Include("Claim:providerreference").toLocked(); + + /** + * Search parameter: organizationreference + *

+ * Description: The reference to the providing organization
+ * Type: reference
+ * Path: Claim.organizationReference
+ *

+ */ + @SearchParamDefinition(name="organizationreference", path="Claim.organizationReference", description="The reference to the providing organization", type="reference" ) + public static final String SP_ORGANIZATIONREFERENCE = "organizationreference"; + /** + * Fluent Client search parameter constant for organizationreference + *

+ * Description: The reference to the providing organization
+ * Type: reference
+ * Path: Claim.organizationReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATIONREFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Claim:organizationreference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("Claim:organizationreference").toLocked(); /** * Search parameter: priority @@ -6213,56 +7300,116 @@ public class Claim extends DomainResource { public static final ca.uhn.fhir.rest.gclient.TokenClientParam PRIORITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PRIORITY); /** - * Search parameter: facility + * Search parameter: provideridentifier + *

+ * Description: Provider responsible for the Claim
+ * Type: token
+ * Path: Claim.providerIdentifier
+ *

+ */ + @SearchParamDefinition(name="provideridentifier", path="Claim.providerIdentifier", description="Provider responsible for the Claim", type="token", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) + public static final String SP_PROVIDERIDENTIFIER = "provideridentifier"; + /** + * Fluent Client search parameter constant for provideridentifier + *

+ * Description: Provider responsible for the Claim
+ * Type: token
+ * Path: Claim.providerIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam PROVIDERIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PROVIDERIDENTIFIER); + + /** + * Search parameter: targetidentifier + *

+ * Description: The target payor/insurer for the Claim
+ * Type: token
+ * Path: Claim.targetIdentifier
+ *

+ */ + @SearchParamDefinition(name="targetidentifier", path="Claim.targetIdentifier", description="The target payor/insurer for the Claim", type="token" ) + public static final String SP_TARGETIDENTIFIER = "targetidentifier"; + /** + * Fluent Client search parameter constant for targetidentifier + *

+ * Description: The target payor/insurer for the Claim
+ * Type: token
+ * Path: Claim.targetIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam TARGETIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TARGETIDENTIFIER); + + /** + * Search parameter: facilityreference *

* Description: Facility responsible for the goods and services
* Type: reference
- * Path: Claim.facility
+ * Path: Claim.facilityReference
*

*/ - @SearchParamDefinition(name="facility", path="Claim.facility", description="Facility responsible for the goods and services", type="reference" ) - public static final String SP_FACILITY = "facility"; + @SearchParamDefinition(name="facilityreference", path="Claim.facilityReference", description="Facility responsible for the goods and services", type="reference" ) + public static final String SP_FACILITYREFERENCE = "facilityreference"; /** - * Fluent Client search parameter constant for facility + * Fluent Client search parameter constant for facilityreference *

* Description: Facility responsible for the goods and services
* Type: reference
- * Path: Claim.facility
+ * Path: Claim.facilityReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FACILITY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FACILITY); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FACILITYREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FACILITYREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Claim:facility". + * the path value of "Claim:facilityreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_FACILITY = new ca.uhn.fhir.model.api.Include("Claim:facility").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_FACILITYREFERENCE = new ca.uhn.fhir.model.api.Include("Claim:facilityreference").toLocked(); /** - * Search parameter: target + * Search parameter: targetreference *

* Description: The target payor/insurer for the Claim
* Type: reference
- * Path: Claim.target
+ * Path: Claim.targetReference
*

*/ - @SearchParamDefinition(name="target", path="Claim.target", description="The target payor/insurer for the Claim", type="reference" ) - public static final String SP_TARGET = "target"; + @SearchParamDefinition(name="targetreference", path="Claim.targetReference", description="The target payor/insurer for the Claim", type="reference" ) + public static final String SP_TARGETREFERENCE = "targetreference"; /** - * Fluent Client search parameter constant for target + * Fluent Client search parameter constant for targetreference *

* Description: The target payor/insurer for the Claim
* Type: reference
- * Path: Claim.target
+ * Path: Claim.targetReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam TARGET = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_TARGET); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam TARGETREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_TARGETREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Claim:target". + * the path value of "Claim:targetreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_TARGET = new ca.uhn.fhir.model.api.Include("Claim:target").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_TARGETREFERENCE = new ca.uhn.fhir.model.api.Include("Claim:targetreference").toLocked(); + + /** + * Search parameter: facilityidentifier + *

+ * Description: Facility responsible for the goods and services
+ * Type: token
+ * Path: Claim.facilityIdentifier
+ *

+ */ + @SearchParamDefinition(name="facilityidentifier", path="Claim.facilityIdentifier", description="Facility responsible for the goods and services", type="token" ) + public static final String SP_FACILITYIDENTIFIER = "facilityidentifier"; + /** + * Fluent Client search parameter constant for facilityidentifier + *

+ * Description: Facility responsible for the goods and services
+ * Type: token
+ * Path: Claim.facilityIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam FACILITYIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FACILITYIDENTIFIER); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ClaimResponse.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ClaimResponse.java index 841bcef0554..4270343e8ba 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ClaimResponse.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ClaimResponse.java @@ -29,22 +29,20 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import java.math.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * This resource provides the adjudication details from the processing of a Claim resource. */ @@ -362,9 +360,8 @@ public class ClaimResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()) && (noteNumber == null || noteNumber.isEmpty()) - && (adjudication == null || adjudication.isEmpty()) && (detail == null || detail.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequenceLinkId, noteNumber, adjudication + , detail); } public String fhirType() { @@ -379,25 +376,32 @@ public class ClaimResponse extends DomainResource { /** * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc. */ - @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Child(name = "category", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Adjudication category such as co-pay, eligible, benefit, etc.", formalDefinition="Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc." ) - protected Coding code; + protected Coding category; + + /** + * Adjudication reason such as limit reached. + */ + @Child(name = "reason", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Adjudication reason", formalDefinition="Adjudication reason such as limit reached." ) + protected Coding reason; /** * Monetary amount associated with the code. */ - @Child(name = "amount", type = {Money.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Child(name = "amount", type = {Money.class}, order=3, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Monetary amount", formalDefinition="Monetary amount associated with the code." ) protected Money amount; /** * A non-monetary value for example a percentage. Mutually exclusive to the amount element above. */ - @Child(name = "value", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "value", type = {DecimalType.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Non-monetary value", formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above." ) protected DecimalType value; - private static final long serialVersionUID = -949880587L; + private static final long serialVersionUID = -1926987562L; /** * Constructor @@ -409,32 +413,56 @@ public class ClaimResponse extends DomainResource { /** * Constructor */ - public ItemAdjudicationComponent(Coding code) { + public ItemAdjudicationComponent(Coding category) { super(); - this.code = code; + this.category = category; } /** - * @return {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + * @return {@link #category} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) */ - public Coding getCode() { - if (this.code == null) + public Coding getCategory() { + if (this.category == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemAdjudicationComponent.code"); + throw new Error("Attempt to auto-create ItemAdjudicationComponent.category"); else if (Configuration.doAutoCreate()) - this.code = new Coding(); // cc - return this.code; + this.category = new Coding(); // cc + return this.category; } - public boolean hasCode() { - return this.code != null && !this.code.isEmpty(); + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); } /** - * @param value {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + * @param value {@link #category} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) */ - public ItemAdjudicationComponent setCode(Coding value) { - this.code = value; + public ItemAdjudicationComponent setCategory(Coding value) { + this.category = value; + return this; + } + + /** + * @return {@link #reason} (Adjudication reason such as limit reached.) + */ + public Coding getReason() { + if (this.reason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemAdjudicationComponent.reason"); + else if (Configuration.doAutoCreate()) + this.reason = new Coding(); // cc + return this.reason; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (Adjudication reason such as limit reached.) + */ + public ItemAdjudicationComponent setReason(Coding value) { + this.reason = value; return this; } @@ -531,15 +559,18 @@ public class ClaimResponse extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("code", "Coding", "Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("category", "Coding", "Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("reason", "Coding", "Adjudication reason such as limit reached.", 0, java.lang.Integer.MAX_VALUE, reason)); childrenList.add(new Property("amount", "Money", "Monetary amount associated with the code.", 0, java.lang.Integer.MAX_VALUE, amount)); childrenList.add(new Property("value", "decimal", "A non-monetary value for example a percentage. Mutually exclusive to the amount element above.", 0, java.lang.Integer.MAX_VALUE, value)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("code")) - this.code = castToCoding(value); // Coding + if (name.equals("category")) + this.category = castToCoding(value); // Coding + else if (name.equals("reason")) + this.reason = castToCoding(value); // Coding else if (name.equals("amount")) this.amount = castToMoney(value); // Money else if (name.equals("value")) @@ -550,9 +581,13 @@ public class ClaimResponse extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("code")) { - this.code = new Coding(); - return this.code; + if (name.equals("category")) { + this.category = new Coding(); + return this.category; + } + else if (name.equals("reason")) { + this.reason = new Coding(); + return this.reason; } else if (name.equals("amount")) { this.amount = new Money(); @@ -568,7 +603,8 @@ public class ClaimResponse extends DomainResource { public ItemAdjudicationComponent copy() { ItemAdjudicationComponent dst = new ItemAdjudicationComponent(); copyValues(dst); - dst.code = code == null ? null : code.copy(); + dst.category = category == null ? null : category.copy(); + dst.reason = reason == null ? null : reason.copy(); dst.amount = amount == null ? null : amount.copy(); dst.value = value == null ? null : value.copy(); return dst; @@ -581,8 +617,8 @@ public class ClaimResponse extends DomainResource { if (!(other instanceof ItemAdjudicationComponent)) return false; ItemAdjudicationComponent o = (ItemAdjudicationComponent) other; - return compareDeep(code, o.code, true) && compareDeep(amount, o.amount, true) && compareDeep(value, o.value, true) - ; + return compareDeep(category, o.category, true) && compareDeep(reason, o.reason, true) && compareDeep(amount, o.amount, true) + && compareDeep(value, o.value, true); } @Override @@ -596,8 +632,8 @@ public class ClaimResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (amount == null || amount.isEmpty()) - && (value == null || value.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( category, reason, amount, value + ); } public String fhirType() { @@ -845,8 +881,8 @@ public class ClaimResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()) && (adjudication == null || adjudication.isEmpty()) - && (subDetail == null || subDetail.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequenceLinkId, adjudication, subDetail + ); } public String fhirType() { @@ -861,25 +897,32 @@ public class ClaimResponse extends DomainResource { /** * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc. */ - @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Child(name = "category", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Adjudication category such as co-pay, eligible, benefit, etc.", formalDefinition="Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc." ) - protected Coding code; + protected Coding category; + + /** + * Adjudication reason such as limit reached. + */ + @Child(name = "reason", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Adjudication reason", formalDefinition="Adjudication reason such as limit reached." ) + protected Coding reason; /** * Monetary amount associated with the code. */ - @Child(name = "amount", type = {Money.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Child(name = "amount", type = {Money.class}, order=3, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Monetary amount", formalDefinition="Monetary amount associated with the code." ) protected Money amount; /** * A non-monetary value for example a percentage. Mutually exclusive to the amount element above. */ - @Child(name = "value", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "value", type = {DecimalType.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Non-monetary value", formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above." ) protected DecimalType value; - private static final long serialVersionUID = -949880587L; + private static final long serialVersionUID = -1926987562L; /** * Constructor @@ -891,32 +934,56 @@ public class ClaimResponse extends DomainResource { /** * Constructor */ - public DetailAdjudicationComponent(Coding code) { + public DetailAdjudicationComponent(Coding category) { super(); - this.code = code; + this.category = category; } /** - * @return {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + * @return {@link #category} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) */ - public Coding getCode() { - if (this.code == null) + public Coding getCategory() { + if (this.category == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailAdjudicationComponent.code"); + throw new Error("Attempt to auto-create DetailAdjudicationComponent.category"); else if (Configuration.doAutoCreate()) - this.code = new Coding(); // cc - return this.code; + this.category = new Coding(); // cc + return this.category; } - public boolean hasCode() { - return this.code != null && !this.code.isEmpty(); + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); } /** - * @param value {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + * @param value {@link #category} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) */ - public DetailAdjudicationComponent setCode(Coding value) { - this.code = value; + public DetailAdjudicationComponent setCategory(Coding value) { + this.category = value; + return this; + } + + /** + * @return {@link #reason} (Adjudication reason such as limit reached.) + */ + public Coding getReason() { + if (this.reason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DetailAdjudicationComponent.reason"); + else if (Configuration.doAutoCreate()) + this.reason = new Coding(); // cc + return this.reason; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (Adjudication reason such as limit reached.) + */ + public DetailAdjudicationComponent setReason(Coding value) { + this.reason = value; return this; } @@ -1013,15 +1080,18 @@ public class ClaimResponse extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("code", "Coding", "Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("category", "Coding", "Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("reason", "Coding", "Adjudication reason such as limit reached.", 0, java.lang.Integer.MAX_VALUE, reason)); childrenList.add(new Property("amount", "Money", "Monetary amount associated with the code.", 0, java.lang.Integer.MAX_VALUE, amount)); childrenList.add(new Property("value", "decimal", "A non-monetary value for example a percentage. Mutually exclusive to the amount element above.", 0, java.lang.Integer.MAX_VALUE, value)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("code")) - this.code = castToCoding(value); // Coding + if (name.equals("category")) + this.category = castToCoding(value); // Coding + else if (name.equals("reason")) + this.reason = castToCoding(value); // Coding else if (name.equals("amount")) this.amount = castToMoney(value); // Money else if (name.equals("value")) @@ -1032,9 +1102,13 @@ public class ClaimResponse extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("code")) { - this.code = new Coding(); - return this.code; + if (name.equals("category")) { + this.category = new Coding(); + return this.category; + } + else if (name.equals("reason")) { + this.reason = new Coding(); + return this.reason; } else if (name.equals("amount")) { this.amount = new Money(); @@ -1050,7 +1124,8 @@ public class ClaimResponse extends DomainResource { public DetailAdjudicationComponent copy() { DetailAdjudicationComponent dst = new DetailAdjudicationComponent(); copyValues(dst); - dst.code = code == null ? null : code.copy(); + dst.category = category == null ? null : category.copy(); + dst.reason = reason == null ? null : reason.copy(); dst.amount = amount == null ? null : amount.copy(); dst.value = value == null ? null : value.copy(); return dst; @@ -1063,8 +1138,8 @@ public class ClaimResponse extends DomainResource { if (!(other instanceof DetailAdjudicationComponent)) return false; DetailAdjudicationComponent o = (DetailAdjudicationComponent) other; - return compareDeep(code, o.code, true) && compareDeep(amount, o.amount, true) && compareDeep(value, o.value, true) - ; + return compareDeep(category, o.category, true) && compareDeep(reason, o.reason, true) && compareDeep(amount, o.amount, true) + && compareDeep(value, o.value, true); } @Override @@ -1078,8 +1153,8 @@ public class ClaimResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (amount == null || amount.isEmpty()) - && (value == null || value.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( category, reason, amount, value + ); } public String fhirType() { @@ -1269,8 +1344,7 @@ public class ClaimResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()) && (adjudication == null || adjudication.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequenceLinkId, adjudication); } public String fhirType() { @@ -1285,25 +1359,32 @@ public class ClaimResponse extends DomainResource { /** * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc. */ - @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Child(name = "category", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Adjudication category such as co-pay, eligible, benefit, etc.", formalDefinition="Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc." ) - protected Coding code; + protected Coding category; + + /** + * Adjudication reason such as limit reached. + */ + @Child(name = "reason", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Adjudication reason", formalDefinition="Adjudication reason such as limit reached." ) + protected Coding reason; /** * Monetary amount associated with the code. */ - @Child(name = "amount", type = {Money.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Child(name = "amount", type = {Money.class}, order=3, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Monetary amount", formalDefinition="Monetary amount associated with the code." ) protected Money amount; /** * A non-monetary value for example a percentage. Mutually exclusive to the amount element above. */ - @Child(name = "value", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "value", type = {DecimalType.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Non-monetary value", formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above." ) protected DecimalType value; - private static final long serialVersionUID = -949880587L; + private static final long serialVersionUID = -1926987562L; /** * Constructor @@ -1315,32 +1396,56 @@ public class ClaimResponse extends DomainResource { /** * Constructor */ - public SubdetailAdjudicationComponent(Coding code) { + public SubdetailAdjudicationComponent(Coding category) { super(); - this.code = code; + this.category = category; } /** - * @return {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + * @return {@link #category} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) */ - public Coding getCode() { - if (this.code == null) + public Coding getCategory() { + if (this.category == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubdetailAdjudicationComponent.code"); + throw new Error("Attempt to auto-create SubdetailAdjudicationComponent.category"); else if (Configuration.doAutoCreate()) - this.code = new Coding(); // cc - return this.code; + this.category = new Coding(); // cc + return this.category; } - public boolean hasCode() { - return this.code != null && !this.code.isEmpty(); + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); } /** - * @param value {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + * @param value {@link #category} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) */ - public SubdetailAdjudicationComponent setCode(Coding value) { - this.code = value; + public SubdetailAdjudicationComponent setCategory(Coding value) { + this.category = value; + return this; + } + + /** + * @return {@link #reason} (Adjudication reason such as limit reached.) + */ + public Coding getReason() { + if (this.reason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SubdetailAdjudicationComponent.reason"); + else if (Configuration.doAutoCreate()) + this.reason = new Coding(); // cc + return this.reason; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (Adjudication reason such as limit reached.) + */ + public SubdetailAdjudicationComponent setReason(Coding value) { + this.reason = value; return this; } @@ -1437,15 +1542,18 @@ public class ClaimResponse extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("code", "Coding", "Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("category", "Coding", "Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("reason", "Coding", "Adjudication reason such as limit reached.", 0, java.lang.Integer.MAX_VALUE, reason)); childrenList.add(new Property("amount", "Money", "Monetary amount associated with the code.", 0, java.lang.Integer.MAX_VALUE, amount)); childrenList.add(new Property("value", "decimal", "A non-monetary value for example a percentage. Mutually exclusive to the amount element above.", 0, java.lang.Integer.MAX_VALUE, value)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("code")) - this.code = castToCoding(value); // Coding + if (name.equals("category")) + this.category = castToCoding(value); // Coding + else if (name.equals("reason")) + this.reason = castToCoding(value); // Coding else if (name.equals("amount")) this.amount = castToMoney(value); // Money else if (name.equals("value")) @@ -1456,9 +1564,13 @@ public class ClaimResponse extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("code")) { - this.code = new Coding(); - return this.code; + if (name.equals("category")) { + this.category = new Coding(); + return this.category; + } + else if (name.equals("reason")) { + this.reason = new Coding(); + return this.reason; } else if (name.equals("amount")) { this.amount = new Money(); @@ -1474,7 +1586,8 @@ public class ClaimResponse extends DomainResource { public SubdetailAdjudicationComponent copy() { SubdetailAdjudicationComponent dst = new SubdetailAdjudicationComponent(); copyValues(dst); - dst.code = code == null ? null : code.copy(); + dst.category = category == null ? null : category.copy(); + dst.reason = reason == null ? null : reason.copy(); dst.amount = amount == null ? null : amount.copy(); dst.value = value == null ? null : value.copy(); return dst; @@ -1487,8 +1600,8 @@ public class ClaimResponse extends DomainResource { if (!(other instanceof SubdetailAdjudicationComponent)) return false; SubdetailAdjudicationComponent o = (SubdetailAdjudicationComponent) other; - return compareDeep(code, o.code, true) && compareDeep(amount, o.amount, true) && compareDeep(value, o.value, true) - ; + return compareDeep(category, o.category, true) && compareDeep(reason, o.reason, true) && compareDeep(amount, o.amount, true) + && compareDeep(value, o.value, true); } @Override @@ -1502,8 +1615,8 @@ public class ClaimResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (amount == null || amount.isEmpty()) - && (value == null || value.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( category, reason, amount, value + ); } public String fhirType() { @@ -1916,10 +2029,8 @@ public class ClaimResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()) && (service == null || service.isEmpty()) - && (fee == null || fee.isEmpty()) && (noteNumberLinkId == null || noteNumberLinkId.isEmpty()) - && (adjudication == null || adjudication.isEmpty()) && (detail == null || detail.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequenceLinkId, service, fee + , noteNumberLinkId, adjudication, detail); } public String fhirType() { @@ -1934,25 +2045,32 @@ public class ClaimResponse extends DomainResource { /** * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc. */ - @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Child(name = "category", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Adjudication category such as co-pay, eligible, benefit, etc.", formalDefinition="Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc." ) - protected Coding code; + protected Coding category; + + /** + * Adjudication reason such as limit reached. + */ + @Child(name = "reason", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Adjudication reason", formalDefinition="Adjudication reason such as limit reached." ) + protected Coding reason; /** * Monetary amount associated with the code. */ - @Child(name = "amount", type = {Money.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Child(name = "amount", type = {Money.class}, order=3, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Monetary amount", formalDefinition="Monetary amount associated with the code." ) protected Money amount; /** * A non-monetary value for example a percentage. Mutually exclusive to the amount element above. */ - @Child(name = "value", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "value", type = {DecimalType.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Non-monetary value", formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above." ) protected DecimalType value; - private static final long serialVersionUID = -949880587L; + private static final long serialVersionUID = -1926987562L; /** * Constructor @@ -1964,32 +2082,56 @@ public class ClaimResponse extends DomainResource { /** * Constructor */ - public AddedItemAdjudicationComponent(Coding code) { + public AddedItemAdjudicationComponent(Coding category) { super(); - this.code = code; + this.category = category; } /** - * @return {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + * @return {@link #category} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) */ - public Coding getCode() { - if (this.code == null) + public Coding getCategory() { + if (this.category == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AddedItemAdjudicationComponent.code"); + throw new Error("Attempt to auto-create AddedItemAdjudicationComponent.category"); else if (Configuration.doAutoCreate()) - this.code = new Coding(); // cc - return this.code; + this.category = new Coding(); // cc + return this.category; } - public boolean hasCode() { - return this.code != null && !this.code.isEmpty(); + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); } /** - * @param value {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + * @param value {@link #category} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) */ - public AddedItemAdjudicationComponent setCode(Coding value) { - this.code = value; + public AddedItemAdjudicationComponent setCategory(Coding value) { + this.category = value; + return this; + } + + /** + * @return {@link #reason} (Adjudication reason such as limit reached.) + */ + public Coding getReason() { + if (this.reason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AddedItemAdjudicationComponent.reason"); + else if (Configuration.doAutoCreate()) + this.reason = new Coding(); // cc + return this.reason; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (Adjudication reason such as limit reached.) + */ + public AddedItemAdjudicationComponent setReason(Coding value) { + this.reason = value; return this; } @@ -2086,15 +2228,18 @@ public class ClaimResponse extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("code", "Coding", "Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("category", "Coding", "Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("reason", "Coding", "Adjudication reason such as limit reached.", 0, java.lang.Integer.MAX_VALUE, reason)); childrenList.add(new Property("amount", "Money", "Monetary amount associated with the code.", 0, java.lang.Integer.MAX_VALUE, amount)); childrenList.add(new Property("value", "decimal", "A non-monetary value for example a percentage. Mutually exclusive to the amount element above.", 0, java.lang.Integer.MAX_VALUE, value)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("code")) - this.code = castToCoding(value); // Coding + if (name.equals("category")) + this.category = castToCoding(value); // Coding + else if (name.equals("reason")) + this.reason = castToCoding(value); // Coding else if (name.equals("amount")) this.amount = castToMoney(value); // Money else if (name.equals("value")) @@ -2105,9 +2250,13 @@ public class ClaimResponse extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("code")) { - this.code = new Coding(); - return this.code; + if (name.equals("category")) { + this.category = new Coding(); + return this.category; + } + else if (name.equals("reason")) { + this.reason = new Coding(); + return this.reason; } else if (name.equals("amount")) { this.amount = new Money(); @@ -2123,7 +2272,8 @@ public class ClaimResponse extends DomainResource { public AddedItemAdjudicationComponent copy() { AddedItemAdjudicationComponent dst = new AddedItemAdjudicationComponent(); copyValues(dst); - dst.code = code == null ? null : code.copy(); + dst.category = category == null ? null : category.copy(); + dst.reason = reason == null ? null : reason.copy(); dst.amount = amount == null ? null : amount.copy(); dst.value = value == null ? null : value.copy(); return dst; @@ -2136,8 +2286,8 @@ public class ClaimResponse extends DomainResource { if (!(other instanceof AddedItemAdjudicationComponent)) return false; AddedItemAdjudicationComponent o = (AddedItemAdjudicationComponent) other; - return compareDeep(code, o.code, true) && compareDeep(amount, o.amount, true) && compareDeep(value, o.value, true) - ; + return compareDeep(category, o.category, true) && compareDeep(reason, o.reason, true) && compareDeep(amount, o.amount, true) + && compareDeep(value, o.value, true); } @Override @@ -2151,8 +2301,8 @@ public class ClaimResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (amount == null || amount.isEmpty()) - && (value == null || value.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( category, reason, amount, value + ); } public String fhirType() { @@ -2361,8 +2511,7 @@ public class ClaimResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (service == null || service.isEmpty()) && (fee == null || fee.isEmpty()) - && (adjudication == null || adjudication.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( service, fee, adjudication); } public String fhirType() { @@ -2377,25 +2526,32 @@ public class ClaimResponse extends DomainResource { /** * Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc. */ - @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Child(name = "category", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Adjudication category such as co-pay, eligible, benefit, etc.", formalDefinition="Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc." ) - protected Coding code; + protected Coding category; + + /** + * Adjudication reason such as limit reached. + */ + @Child(name = "reason", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Adjudication reason", formalDefinition="Adjudication reason such as limit reached." ) + protected Coding reason; /** * Monetary amount associated with the code. */ - @Child(name = "amount", type = {Money.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Child(name = "amount", type = {Money.class}, order=3, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Monetary amount", formalDefinition="Monetary amount associated with the code." ) protected Money amount; /** * A non-monetary value for example a percentage. Mutually exclusive to the amount element above. */ - @Child(name = "value", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "value", type = {DecimalType.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Non-monetary value", formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above." ) protected DecimalType value; - private static final long serialVersionUID = -949880587L; + private static final long serialVersionUID = -1926987562L; /** * Constructor @@ -2407,32 +2563,56 @@ public class ClaimResponse extends DomainResource { /** * Constructor */ - public AddedItemDetailAdjudicationComponent(Coding code) { + public AddedItemDetailAdjudicationComponent(Coding category) { super(); - this.code = code; + this.category = category; } /** - * @return {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + * @return {@link #category} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) */ - public Coding getCode() { - if (this.code == null) + public Coding getCategory() { + if (this.category == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AddedItemDetailAdjudicationComponent.code"); + throw new Error("Attempt to auto-create AddedItemDetailAdjudicationComponent.category"); else if (Configuration.doAutoCreate()) - this.code = new Coding(); // cc - return this.code; + this.category = new Coding(); // cc + return this.category; } - public boolean hasCode() { - return this.code != null && !this.code.isEmpty(); + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); } /** - * @param value {@link #code} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) + * @param value {@link #category} (Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.) */ - public AddedItemDetailAdjudicationComponent setCode(Coding value) { - this.code = value; + public AddedItemDetailAdjudicationComponent setCategory(Coding value) { + this.category = value; + return this; + } + + /** + * @return {@link #reason} (Adjudication reason such as limit reached.) + */ + public Coding getReason() { + if (this.reason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AddedItemDetailAdjudicationComponent.reason"); + else if (Configuration.doAutoCreate()) + this.reason = new Coding(); // cc + return this.reason; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (Adjudication reason such as limit reached.) + */ + public AddedItemDetailAdjudicationComponent setReason(Coding value) { + this.reason = value; return this; } @@ -2529,15 +2709,18 @@ public class ClaimResponse extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("code", "Coding", "Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("category", "Coding", "Code indicating: Co-Pay, deductible, eligible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("reason", "Coding", "Adjudication reason such as limit reached.", 0, java.lang.Integer.MAX_VALUE, reason)); childrenList.add(new Property("amount", "Money", "Monetary amount associated with the code.", 0, java.lang.Integer.MAX_VALUE, amount)); childrenList.add(new Property("value", "decimal", "A non-monetary value for example a percentage. Mutually exclusive to the amount element above.", 0, java.lang.Integer.MAX_VALUE, value)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("code")) - this.code = castToCoding(value); // Coding + if (name.equals("category")) + this.category = castToCoding(value); // Coding + else if (name.equals("reason")) + this.reason = castToCoding(value); // Coding else if (name.equals("amount")) this.amount = castToMoney(value); // Money else if (name.equals("value")) @@ -2548,9 +2731,13 @@ public class ClaimResponse extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("code")) { - this.code = new Coding(); - return this.code; + if (name.equals("category")) { + this.category = new Coding(); + return this.category; + } + else if (name.equals("reason")) { + this.reason = new Coding(); + return this.reason; } else if (name.equals("amount")) { this.amount = new Money(); @@ -2566,7 +2753,8 @@ public class ClaimResponse extends DomainResource { public AddedItemDetailAdjudicationComponent copy() { AddedItemDetailAdjudicationComponent dst = new AddedItemDetailAdjudicationComponent(); copyValues(dst); - dst.code = code == null ? null : code.copy(); + dst.category = category == null ? null : category.copy(); + dst.reason = reason == null ? null : reason.copy(); dst.amount = amount == null ? null : amount.copy(); dst.value = value == null ? null : value.copy(); return dst; @@ -2579,8 +2767,8 @@ public class ClaimResponse extends DomainResource { if (!(other instanceof AddedItemDetailAdjudicationComponent)) return false; AddedItemDetailAdjudicationComponent o = (AddedItemDetailAdjudicationComponent) other; - return compareDeep(code, o.code, true) && compareDeep(amount, o.amount, true) && compareDeep(value, o.value, true) - ; + return compareDeep(category, o.category, true) && compareDeep(reason, o.reason, true) && compareDeep(amount, o.amount, true) + && compareDeep(value, o.value, true); } @Override @@ -2594,8 +2782,8 @@ public class ClaimResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (amount == null || amount.isEmpty()) - && (value == null || value.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( category, reason, amount, value + ); } public String fhirType() { @@ -2886,9 +3074,8 @@ public class ClaimResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()) && (detailSequenceLinkId == null || detailSequenceLinkId.isEmpty()) - && (subdetailSequenceLinkId == null || subdetailSequenceLinkId.isEmpty()) && (code == null || code.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequenceLinkId, detailSequenceLinkId + , subdetailSequenceLinkId, code); } public String fhirType() { @@ -3114,8 +3301,7 @@ public class ClaimResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (number == null || number.isEmpty()) && (type == null || type.isEmpty()) - && (text == null || text.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( number, type, text); } public String fhirType() { @@ -3144,14 +3330,9 @@ public class ClaimResponse extends DomainResource { /** * Reference to the program or plan identification, underwriter or payor. */ - @Child(name = "coverage", type = {Coverage.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Child(name = "coverage", type = {Identifier.class, Coverage.class}, order=3, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Insurance information", formalDefinition="Reference to the program or plan identification, underwriter or payor." ) - protected Reference coverage; - - /** - * The actual object that is the target of the reference (Reference to the program or plan identification, underwriter or payor.) - */ - protected Coverage coverageTarget; + protected Type coverage; /** * The contract number of a business agreement which describes the terms and conditions. @@ -3160,24 +3341,17 @@ public class ClaimResponse extends DomainResource { @Description(shortDefinition="Business agreement", formalDefinition="The contract number of a business agreement which describes the terms and conditions." ) protected StringType businessArrangement; - /** - * The relationship of the patient to the subscriber. - */ - @Child(name = "relationship", type = {Coding.class}, order=5, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Patient relationship to subscriber", formalDefinition="The relationship of the patient to the subscriber." ) - protected Coding relationship; - /** * A list of references from the Insurer to which these services pertain. */ - @Child(name = "preAuthRef", type = {StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "preAuthRef", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Pre-Authorization/Determination Reference", formalDefinition="A list of references from the Insurer to which these services pertain." ) protected List preAuthRef; /** * The Coverages adjudication details. */ - @Child(name = "claimResponse", type = {ClaimResponse.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "claimResponse", type = {ClaimResponse.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Adjudication results", formalDefinition="The Coverages adjudication details." ) protected Reference claimResponse; @@ -3186,14 +3360,7 @@ public class ClaimResponse extends DomainResource { */ protected ClaimResponse claimResponseTarget; - /** - * The style (standard) and version of the original material which was converted into this resource. - */ - @Child(name = "originalRuleset", type = {Coding.class}, order=8, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) - protected Coding originalRuleset; - - private static final long serialVersionUID = 621250924L; + private static final long serialVersionUID = -1151494539L; /** * Constructor @@ -3205,12 +3372,11 @@ public class ClaimResponse extends DomainResource { /** * Constructor */ - public CoverageComponent(PositiveIntType sequence, BooleanType focal, Reference coverage, Coding relationship) { + public CoverageComponent(PositiveIntType sequence, BooleanType focal, Type coverage) { super(); this.sequence = sequence; this.focal = focal; this.coverage = coverage; - this.relationship = relationship; } /** @@ -3306,15 +3472,36 @@ public class ClaimResponse extends DomainResource { /** * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) */ - public Reference getCoverage() { - if (this.coverage == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.coverage"); - else if (Configuration.doAutoCreate()) - this.coverage = new Reference(); // cc + public Type getCoverage() { return this.coverage; } + /** + * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) + */ + public Identifier getCoverageIdentifier() throws FHIRException { + if (!(this.coverage instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.coverage.getClass().getName()+" was encountered"); + return (Identifier) this.coverage; + } + + public boolean hasCoverageIdentifier() { + return this.coverage instanceof Identifier; + } + + /** + * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) + */ + public Reference getCoverageReference() throws FHIRException { + if (!(this.coverage instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.coverage.getClass().getName()+" was encountered"); + return (Reference) this.coverage; + } + + public boolean hasCoverageReference() { + return this.coverage instanceof Reference; + } + public boolean hasCoverage() { return this.coverage != null && !this.coverage.isEmpty(); } @@ -3322,31 +3509,11 @@ public class ClaimResponse extends DomainResource { /** * @param value {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) */ - public CoverageComponent setCoverage(Reference value) { + public CoverageComponent setCoverage(Type value) { this.coverage = value; return this; } - /** - * @return {@link #coverage} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) - */ - public Coverage getCoverageTarget() { - if (this.coverageTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.coverage"); - else if (Configuration.doAutoCreate()) - this.coverageTarget = new Coverage(); // aa - return this.coverageTarget; - } - - /** - * @param value {@link #coverage} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) - */ - public CoverageComponent setCoverageTarget(Coverage value) { - this.coverageTarget = value; - return this; - } - /** * @return {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value */ @@ -3396,30 +3563,6 @@ public class ClaimResponse extends DomainResource { return this; } - /** - * @return {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public Coding getRelationship() { - if (this.relationship == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.relationship"); - else if (Configuration.doAutoCreate()) - this.relationship = new Coding(); // cc - return this.relationship; - } - - public boolean hasRelationship() { - return this.relationship != null && !this.relationship.isEmpty(); - } - - /** - * @param value {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public CoverageComponent setRelationship(Coding value) { - this.relationship = value; - return this; - } - /** * @return {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) */ @@ -3518,40 +3661,14 @@ public class ClaimResponse extends DomainResource { return this; } - /** - * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public Coding getOriginalRuleset() { - if (this.originalRuleset == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.originalRuleset"); - else if (Configuration.doAutoCreate()) - this.originalRuleset = new Coding(); // cc - return this.originalRuleset; - } - - public boolean hasOriginalRuleset() { - return this.originalRuleset != null && !this.originalRuleset.isEmpty(); - } - - /** - * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) - */ - public CoverageComponent setOriginalRuleset(Coding value) { - this.originalRuleset = value; - return this; - } - protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("sequence", "positiveInt", "A service line item.", 0, java.lang.Integer.MAX_VALUE, sequence)); childrenList.add(new Property("focal", "boolean", "The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.", 0, java.lang.Integer.MAX_VALUE, focal)); - childrenList.add(new Property("coverage", "Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, coverage)); + childrenList.add(new Property("coverage[x]", "Identifier|Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, coverage)); childrenList.add(new Property("businessArrangement", "string", "The contract number of a business agreement which describes the terms and conditions.", 0, java.lang.Integer.MAX_VALUE, businessArrangement)); - childrenList.add(new Property("relationship", "Coding", "The relationship of the patient to the subscriber.", 0, java.lang.Integer.MAX_VALUE, relationship)); childrenList.add(new Property("preAuthRef", "string", "A list of references from the Insurer to which these services pertain.", 0, java.lang.Integer.MAX_VALUE, preAuthRef)); childrenList.add(new Property("claimResponse", "Reference(ClaimResponse)", "The Coverages adjudication details.", 0, java.lang.Integer.MAX_VALUE, claimResponse)); - childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); } @Override @@ -3560,18 +3677,14 @@ public class ClaimResponse extends DomainResource { this.sequence = castToPositiveInt(value); // PositiveIntType else if (name.equals("focal")) this.focal = castToBoolean(value); // BooleanType - else if (name.equals("coverage")) - this.coverage = castToReference(value); // Reference + else if (name.equals("coverage[x]")) + this.coverage = (Type) value; // Type else if (name.equals("businessArrangement")) this.businessArrangement = castToString(value); // StringType - else if (name.equals("relationship")) - this.relationship = castToCoding(value); // Coding else if (name.equals("preAuthRef")) this.getPreAuthRef().add(castToString(value)); else if (name.equals("claimResponse")) this.claimResponse = castToReference(value); // Reference - else if (name.equals("originalRuleset")) - this.originalRuleset = castToCoding(value); // Coding else super.setProperty(name, value); } @@ -3584,17 +3697,17 @@ public class ClaimResponse extends DomainResource { else if (name.equals("focal")) { throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.focal"); } - else if (name.equals("coverage")) { + else if (name.equals("coverageIdentifier")) { + this.coverage = new Identifier(); + return this.coverage; + } + else if (name.equals("coverageReference")) { this.coverage = new Reference(); return this.coverage; } else if (name.equals("businessArrangement")) { throw new FHIRException("Cannot call addChild on a primitive type 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"); } @@ -3602,10 +3715,6 @@ public class ClaimResponse extends DomainResource { this.claimResponse = new Reference(); return this.claimResponse; } - else if (name.equals("originalRuleset")) { - this.originalRuleset = new Coding(); - return this.originalRuleset; - } else return super.addChild(name); } @@ -3617,14 +3726,12 @@ public class ClaimResponse extends DomainResource { dst.focal = focal == null ? null : focal.copy(); dst.coverage = coverage == null ? null : coverage.copy(); dst.businessArrangement = businessArrangement == null ? null : businessArrangement.copy(); - dst.relationship = relationship == null ? null : relationship.copy(); if (preAuthRef != null) { dst.preAuthRef = new ArrayList(); for (StringType i : preAuthRef) dst.preAuthRef.add(i.copy()); }; dst.claimResponse = claimResponse == null ? null : claimResponse.copy(); - dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); return dst; } @@ -3636,9 +3743,8 @@ public class ClaimResponse extends DomainResource { return false; CoverageComponent o = (CoverageComponent) other; return compareDeep(sequence, o.sequence, true) && compareDeep(focal, o.focal, true) && compareDeep(coverage, o.coverage, true) - && compareDeep(businessArrangement, o.businessArrangement, true) && compareDeep(relationship, o.relationship, true) - && compareDeep(preAuthRef, o.preAuthRef, true) && compareDeep(claimResponse, o.claimResponse, true) - && compareDeep(originalRuleset, o.originalRuleset, true); + && compareDeep(businessArrangement, o.businessArrangement, true) && compareDeep(preAuthRef, o.preAuthRef, true) + && compareDeep(claimResponse, o.claimResponse, true); } @Override @@ -3653,11 +3759,8 @@ public class ClaimResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (focal == null || focal.isEmpty()) - && (coverage == null || coverage.isEmpty()) && (businessArrangement == null || businessArrangement.isEmpty()) - && (relationship == null || relationship.isEmpty()) && (preAuthRef == null || preAuthRef.isEmpty()) - && (claimResponse == null || claimResponse.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequence, focal, coverage, businessArrangement + , preAuthRef, claimResponse); } public String fhirType() { @@ -3677,14 +3780,9 @@ public class ClaimResponse extends DomainResource { /** * Original request resource referrence. */ - @Child(name = "request", type = {Claim.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Child(name = "request", type = {Identifier.class, Claim.class}, order=1, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Id of resource triggering adjudication", formalDefinition="Original request resource referrence." ) - protected Reference request; - - /** - * The actual object that is the target of the reference (Original request resource referrence.) - */ - protected Claim requestTarget; + protected Type request; /** * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. @@ -3710,38 +3808,23 @@ public class ClaimResponse extends DomainResource { /** * The Insurer who produced this adjudicated response. */ - @Child(name = "organization", type = {Organization.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "organization", type = {Identifier.class, Organization.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The Insurer who produced this adjudicated response.) - */ - protected Organization organizationTarget; + protected Type organization; /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name = "requestProvider", type = {Practitioner.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "requestProvider", type = {Identifier.class, Practitioner.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference requestProvider; - - /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) - */ - protected Practitioner requestProviderTarget; + protected Type requestProvider; /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name = "requestOrganization", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "requestOrganization", type = {Identifier.class, Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) - protected Reference requestOrganization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) - */ - protected Organization requestOrganizationTarget; + protected Type requestOrganization; /** * Transaction status: error, complete. @@ -3869,7 +3952,7 @@ public class ClaimResponse extends DomainResource { @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) protected List coverage; - private static final long serialVersionUID = 2021598689L; + private static final long serialVersionUID = 1381594471L; /** * Constructor @@ -3921,15 +4004,36 @@ public class ClaimResponse extends DomainResource { /** * @return {@link #request} (Original request resource referrence.) */ - public Reference getRequest() { - if (this.request == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClaimResponse.request"); - else if (Configuration.doAutoCreate()) - this.request = new Reference(); // cc + public Type getRequest() { return this.request; } + /** + * @return {@link #request} (Original request resource referrence.) + */ + public Identifier getRequestIdentifier() throws FHIRException { + if (!(this.request instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.request.getClass().getName()+" was encountered"); + return (Identifier) this.request; + } + + public boolean hasRequestIdentifier() { + return this.request instanceof Identifier; + } + + /** + * @return {@link #request} (Original request resource referrence.) + */ + public Reference getRequestReference() throws FHIRException { + if (!(this.request instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.request.getClass().getName()+" was encountered"); + return (Reference) this.request; + } + + public boolean hasRequestReference() { + return this.request instanceof Reference; + } + public boolean hasRequest() { return this.request != null && !this.request.isEmpty(); } @@ -3937,31 +4041,11 @@ public class ClaimResponse extends DomainResource { /** * @param value {@link #request} (Original request resource referrence.) */ - public ClaimResponse setRequest(Reference value) { + public ClaimResponse setRequest(Type value) { this.request = value; return this; } - /** - * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original request resource referrence.) - */ - public Claim getRequestTarget() { - if (this.requestTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClaimResponse.request"); - else if (Configuration.doAutoCreate()) - this.requestTarget = new Claim(); // aa - return this.requestTarget; - } - - /** - * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original request resource referrence.) - */ - public ClaimResponse setRequestTarget(Claim value) { - this.requestTarget = value; - return this; - } - /** * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) */ @@ -4062,15 +4146,36 @@ public class ClaimResponse extends DomainResource { /** * @return {@link #organization} (The Insurer who produced this adjudicated response.) */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClaimResponse.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc + public Type getOrganization() { return this.organization; } + /** + * @return {@link #organization} (The Insurer who produced this adjudicated response.) + */ + public Identifier getOrganizationIdentifier() throws FHIRException { + if (!(this.organization instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Identifier) this.organization; + } + + public boolean hasOrganizationIdentifier() { + return this.organization instanceof Identifier; + } + + /** + * @return {@link #organization} (The Insurer who produced this adjudicated response.) + */ + public Reference getOrganizationReference() throws FHIRException { + if (!(this.organization instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Reference) this.organization; + } + + public boolean hasOrganizationReference() { + return this.organization instanceof Reference; + } + public boolean hasOrganization() { return this.organization != null && !this.organization.isEmpty(); } @@ -4078,43 +4183,44 @@ public class ClaimResponse extends DomainResource { /** * @param value {@link #organization} (The Insurer who produced this adjudicated response.) */ - public ClaimResponse setOrganization(Reference value) { + public ClaimResponse setOrganization(Type value) { this.organization = value; return this; } - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClaimResponse.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) - */ - public ClaimResponse setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - /** * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) */ - public Reference getRequestProvider() { - if (this.requestProvider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClaimResponse.requestProvider"); - else if (Configuration.doAutoCreate()) - this.requestProvider = new Reference(); // cc + public Type getRequestProvider() { return this.requestProvider; } + /** + * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Identifier getRequestProviderIdentifier() throws FHIRException { + if (!(this.requestProvider instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.requestProvider.getClass().getName()+" was encountered"); + return (Identifier) this.requestProvider; + } + + public boolean hasRequestProviderIdentifier() { + return this.requestProvider instanceof Identifier; + } + + /** + * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getRequestProviderReference() throws FHIRException { + if (!(this.requestProvider instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.requestProvider.getClass().getName()+" was encountered"); + return (Reference) this.requestProvider; + } + + public boolean hasRequestProviderReference() { + return this.requestProvider instanceof Reference; + } + public boolean hasRequestProvider() { return this.requestProvider != null && !this.requestProvider.isEmpty(); } @@ -4122,43 +4228,44 @@ public class ClaimResponse extends DomainResource { /** * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) */ - public ClaimResponse setRequestProvider(Reference value) { + public ClaimResponse setRequestProvider(Type value) { this.requestProvider = value; return this; } - /** - * @return {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Practitioner getRequestProviderTarget() { - if (this.requestProviderTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClaimResponse.requestProvider"); - else if (Configuration.doAutoCreate()) - this.requestProviderTarget = new Practitioner(); // aa - return this.requestProviderTarget; - } - - /** - * @param value {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public ClaimResponse setRequestProviderTarget(Practitioner value) { - this.requestProviderTarget = value; - return this; - } - /** * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) */ - public Reference getRequestOrganization() { - if (this.requestOrganization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClaimResponse.requestOrganization"); - else if (Configuration.doAutoCreate()) - this.requestOrganization = new Reference(); // cc + public Type getRequestOrganization() { return this.requestOrganization; } + /** + * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public Identifier getRequestOrganizationIdentifier() throws FHIRException { + if (!(this.requestOrganization instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.requestOrganization.getClass().getName()+" was encountered"); + return (Identifier) this.requestOrganization; + } + + public boolean hasRequestOrganizationIdentifier() { + return this.requestOrganization instanceof Identifier; + } + + /** + * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public Reference getRequestOrganizationReference() throws FHIRException { + if (!(this.requestOrganization instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.requestOrganization.getClass().getName()+" was encountered"); + return (Reference) this.requestOrganization; + } + + public boolean hasRequestOrganizationReference() { + return this.requestOrganization instanceof Reference; + } + public boolean hasRequestOrganization() { return this.requestOrganization != null && !this.requestOrganization.isEmpty(); } @@ -4166,31 +4273,11 @@ public class ClaimResponse extends DomainResource { /** * @param value {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) */ - public ClaimResponse setRequestOrganization(Reference value) { + public ClaimResponse setRequestOrganization(Type value) { this.requestOrganization = value; return this; } - /** - * @return {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public Organization getRequestOrganizationTarget() { - if (this.requestOrganizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ClaimResponse.requestOrganization"); - else if (Configuration.doAutoCreate()) - this.requestOrganizationTarget = new Organization(); // aa - return this.requestOrganizationTarget; - } - - /** - * @param value {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public ClaimResponse setRequestOrganizationTarget(Organization value) { - this.requestOrganizationTarget = value; - return this; - } - /** * @return {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value */ @@ -4781,13 +4868,13 @@ public class ClaimResponse extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("request", "Reference(Claim)", "Original request resource referrence.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("request[x]", "Identifier|Reference(Claim)", "Original request resource referrence.", 0, java.lang.Integer.MAX_VALUE, request)); childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); - childrenList.add(new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider)); - childrenList.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); + childrenList.add(new Property("organization[x]", "Identifier|Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("requestProvider[x]", "Identifier|Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider)); + childrenList.add(new Property("requestOrganization[x]", "Identifier|Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); childrenList.add(new Property("outcome", "code", "Transaction status: error, complete.", 0, java.lang.Integer.MAX_VALUE, outcome)); childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, java.lang.Integer.MAX_VALUE, disposition)); childrenList.add(new Property("payeeType", "Coding", "Party to be reimbursed: Subscriber, provider, other.", 0, java.lang.Integer.MAX_VALUE, payeeType)); @@ -4812,20 +4899,20 @@ public class ClaimResponse extends DomainResource { public void setProperty(String name, Base value) throws FHIRException { if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); - else if (name.equals("request")) - this.request = castToReference(value); // Reference + else if (name.equals("request[x]")) + this.request = (Type) value; // Type else if (name.equals("ruleset")) this.ruleset = castToCoding(value); // Coding else if (name.equals("originalRuleset")) this.originalRuleset = castToCoding(value); // Coding else if (name.equals("created")) this.created = castToDateTime(value); // DateTimeType - else if (name.equals("organization")) - this.organization = castToReference(value); // Reference - else if (name.equals("requestProvider")) - this.requestProvider = castToReference(value); // Reference - else if (name.equals("requestOrganization")) - this.requestOrganization = castToReference(value); // Reference + else if (name.equals("organization[x]")) + this.organization = (Type) value; // Type + else if (name.equals("requestProvider[x]")) + this.requestProvider = (Type) value; // Type + else if (name.equals("requestOrganization[x]")) + this.requestOrganization = (Type) value; // Type else if (name.equals("outcome")) this.outcome = new RemittanceOutcomeEnumFactory().fromType(value); // Enumeration else if (name.equals("disposition")) @@ -4871,7 +4958,11 @@ public class ClaimResponse extends DomainResource { if (name.equals("identifier")) { return addIdentifier(); } - else if (name.equals("request")) { + else if (name.equals("requestIdentifier")) { + this.request = new Identifier(); + return this.request; + } + else if (name.equals("requestReference")) { this.request = new Reference(); return this.request; } @@ -4886,15 +4977,27 @@ public class ClaimResponse extends DomainResource { else if (name.equals("created")) { throw new FHIRException("Cannot call addChild on a primitive type ClaimResponse.created"); } - else if (name.equals("organization")) { + else if (name.equals("organizationIdentifier")) { + this.organization = new Identifier(); + return this.organization; + } + else if (name.equals("organizationReference")) { this.organization = new Reference(); return this.organization; } - else if (name.equals("requestProvider")) { + else if (name.equals("requestProviderIdentifier")) { + this.requestProvider = new Identifier(); + return this.requestProvider; + } + else if (name.equals("requestProviderReference")) { this.requestProvider = new Reference(); return this.requestProvider; } - else if (name.equals("requestOrganization")) { + else if (name.equals("requestOrganizationIdentifier")) { + this.requestOrganization = new Identifier(); + return this.requestOrganization; + } + else if (name.equals("requestOrganizationReference")) { this.requestOrganization = new Reference(); return this.requestOrganization; } @@ -5063,18 +5166,11 @@ public class ClaimResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty()) - && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) - && (created == null || created.isEmpty()) && (organization == null || organization.isEmpty()) - && (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty()) - && (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty()) - && (payeeType == null || payeeType.isEmpty()) && (item == null || item.isEmpty()) && (addItem == null || addItem.isEmpty()) - && (error == null || error.isEmpty()) && (totalCost == null || totalCost.isEmpty()) && (unallocDeductable == null || unallocDeductable.isEmpty()) - && (totalBenefit == null || totalBenefit.isEmpty()) && (paymentAdjustment == null || paymentAdjustment.isEmpty()) - && (paymentAdjustmentReason == null || paymentAdjustmentReason.isEmpty()) && (paymentDate == null || paymentDate.isEmpty()) - && (paymentAmount == null || paymentAmount.isEmpty()) && (paymentRef == null || paymentRef.isEmpty()) - && (reserved == null || reserved.isEmpty()) && (form == null || form.isEmpty()) && (note == null || note.isEmpty()) - && (coverage == null || coverage.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, request, ruleset + , originalRuleset, created, organization, requestProvider, requestOrganization, outcome + , disposition, payeeType, item, addItem, error, totalCost, unallocDeductable, totalBenefit + , paymentAdjustment, paymentAdjustmentReason, paymentDate, paymentAmount, paymentRef, reserved + , form, note, coverage); } @Override @@ -5102,32 +5198,6 @@ public class ClaimResponse extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); - /** - * Search parameter: request - *

- * Description: The claim reference
- * Type: reference
- * Path: ClaimResponse.request
- *

- */ - @SearchParamDefinition(name="request", path="ClaimResponse.request", description="The claim reference", type="reference" ) - public static final String SP_REQUEST = "request"; - /** - * Fluent Client search parameter constant for request - *

- * Description: The claim reference
- * Type: reference
- * Path: ClaimResponse.request
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUEST = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUEST); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ClaimResponse:request". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST = new ca.uhn.fhir.model.api.Include("ClaimResponse:request").toLocked(); - /** * Search parameter: disposition *

@@ -5168,6 +5238,26 @@ public class ClaimResponse extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.DateClientParam PAYMENTDATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_PAYMENTDATE); + /** + * Search parameter: organizationidentifier + *

+ * Description: The organization who generated this resource
+ * Type: token
+ * Path: ClaimResponse.organizationIdentifier
+ *

+ */ + @SearchParamDefinition(name="organizationidentifier", path="ClaimResponse.organizationIdentifier", description="The organization who generated this resource", type="token" ) + public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier"; + /** + * Fluent Client search parameter constant for organizationidentifier + *

+ * Description: The organization who generated this resource
+ * Type: token
+ * Path: ClaimResponse.organizationIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam ORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ORGANIZATIONIDENTIFIER); + /** * Search parameter: created *

@@ -5189,30 +5279,76 @@ public class ClaimResponse extends DomainResource { public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED); /** - * Search parameter: organization + * Search parameter: requestidentifier *

- * Description: The organization who generated this resource
- * Type: reference
- * Path: ClaimResponse.organization
+ * Description: The claim reference
+ * Type: token
+ * Path: ClaimResponse.requestIdentifier
*

*/ - @SearchParamDefinition(name="organization", path="ClaimResponse.organization", description="The organization who generated this resource", type="reference" ) - public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="requestidentifier", path="ClaimResponse.requestIdentifier", description="The claim reference", type="token" ) + public static final String SP_REQUESTIDENTIFIER = "requestidentifier"; /** - * Fluent Client search parameter constant for organization + * Fluent Client search parameter constant for requestidentifier + *

+ * Description: The claim reference
+ * Type: token
+ * Path: ClaimResponse.requestIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTIDENTIFIER); + + /** + * Search parameter: organizationreference *

* Description: The organization who generated this resource
* Type: reference
- * Path: ClaimResponse.organization
+ * Path: ClaimResponse.organizationReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); + @SearchParamDefinition(name="organizationreference", path="ClaimResponse.organizationReference", description="The organization who generated this resource", type="reference" ) + public static final String SP_ORGANIZATIONREFERENCE = "organizationreference"; + /** + * Fluent Client search parameter constant for organizationreference + *

+ * Description: The organization who generated this resource
+ * Type: reference
+ * Path: ClaimResponse.organizationReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATIONREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ClaimResponse:organization". + * the path value of "ClaimResponse:organizationreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("ClaimResponse:organization").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("ClaimResponse:organizationreference").toLocked(); + + /** + * Search parameter: requestreference + *

+ * Description: The claim reference
+ * Type: reference
+ * Path: ClaimResponse.requestReference
+ *

+ */ + @SearchParamDefinition(name="requestreference", path="ClaimResponse.requestReference", description="The claim reference", type="reference" ) + public static final String SP_REQUESTREFERENCE = "requestreference"; + /** + * Fluent Client search parameter constant for requestreference + *

+ * Description: The claim reference
+ * Type: reference
+ * Path: ClaimResponse.requestReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTREFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "ClaimResponse:requestreference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTREFERENCE = new ca.uhn.fhir.model.api.Include("ClaimResponse:requestreference").toLocked(); /** * Search parameter: outcome diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ClinicalImpression.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ClinicalImpression.java index ed5f8b4bff0..00a969c8a5b 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ClinicalImpression.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ClinicalImpression.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with the recording of assessment tools such as Apgar score. */ @@ -324,8 +323,7 @@ public class ClinicalImpression extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (item == null || item.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, item); } public String fhirType() { @@ -499,8 +497,7 @@ public class ClinicalImpression extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (item == null || item.isEmpty()) && (cause == null || cause.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( item, cause); } public String fhirType() { @@ -674,8 +671,7 @@ public class ClinicalImpression extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (item == null || item.isEmpty()) && (reason == null || reason.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( item, reason); } public String fhirType() { @@ -1840,13 +1836,9 @@ public class ClinicalImpression extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (patient == null || patient.isEmpty()) && (assessor == null || assessor.isEmpty()) - && (status == null || status.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty()) - && (previous == null || previous.isEmpty()) && (problem == null || problem.isEmpty()) && (trigger == null || trigger.isEmpty()) - && (investigations == null || investigations.isEmpty()) && (protocol == null || protocol.isEmpty()) - && (summary == null || summary.isEmpty()) && (finding == null || finding.isEmpty()) && (resolved == null || resolved.isEmpty()) - && (ruledOut == null || ruledOut.isEmpty()) && (prognosis == null || prognosis.isEmpty()) - && (plan == null || plan.isEmpty()) && (action == null || action.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( patient, assessor, status, date + , description, previous, problem, trigger, investigations, protocol, summary, finding + , resolved, ruledOut, prognosis, plan, action); } @Override @@ -1908,7 +1900,7 @@ public class ClinicalImpression extends DomainResource { * Path: ClinicalImpression.assessor
*

*/ - @SearchParamDefinition(name="assessor", path="ClinicalImpression.assessor", description="The clinician performing the assessment", type="reference" ) + @SearchParamDefinition(name="assessor", path="ClinicalImpression.assessor", description="The clinician performing the assessment", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_ASSESSOR = "assessor"; /** * Fluent Client search parameter constant for assessor @@ -2026,7 +2018,7 @@ public class ClinicalImpression extends DomainResource { * Path: ClinicalImpression.patient
*

*/ - @SearchParamDefinition(name="patient", path="ClinicalImpression.patient", description="The patient being assessed", type="reference" ) + @SearchParamDefinition(name="patient", path="ClinicalImpression.patient", description="The patient being assessed", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CodeSystem.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CodeSystem.java index a1561978264..61089908b2c 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CodeSystem.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CodeSystem.java @@ -29,23 +29,21 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** - * A code system specifies a set of codes drawn from one or more code systems. + * A code system resource specifies a set of codes drawn from one or more code systems. */ @ResourceDef(name="CodeSystem", profile="http://hl7.org/fhir/Profile/CodeSystem") public class CodeSystem extends DomainResource { @@ -186,6 +184,14 @@ public class CodeSystem extends DomainResource { * The property value is a string (often used to assign ranking values to concepts for supporting score assessments) */ INTEGER, + /** + * The property value is a boolean true | false + */ + BOOLEAN, + /** + * The property is a date or a date + time + */ + DATETIME, /** * added to help the parsers */ @@ -201,6 +207,10 @@ public class CodeSystem extends DomainResource { return STRING; if ("integer".equals(codeString)) return INTEGER; + if ("boolean".equals(codeString)) + return BOOLEAN; + if ("dateTime".equals(codeString)) + return DATETIME; throw new FHIRException("Unknown PropertyType code '"+codeString+"'"); } public String toCode() { @@ -209,6 +219,8 @@ public class CodeSystem extends DomainResource { case CODING: return "Coding"; case STRING: return "string"; case INTEGER: return "integer"; + case BOOLEAN: return "boolean"; + case DATETIME: return "dateTime"; default: return "?"; } } @@ -218,6 +230,8 @@ public class CodeSystem extends DomainResource { case CODING: return "http://hl7.org/fhir/concept-property-type"; case STRING: return "http://hl7.org/fhir/concept-property-type"; case INTEGER: return "http://hl7.org/fhir/concept-property-type"; + case BOOLEAN: return "http://hl7.org/fhir/concept-property-type"; + case DATETIME: return "http://hl7.org/fhir/concept-property-type"; default: return "?"; } } @@ -227,6 +241,8 @@ public class CodeSystem extends DomainResource { case CODING: return "The property value is a code defined in an external code system. This may be used for translations, but is not the intent"; case STRING: return "The property value is a string"; case INTEGER: return "The property value is a string (often used to assign ranking values to concepts for supporting score assessments)"; + case BOOLEAN: return "The property value is a boolean true | false"; + case DATETIME: return "The property is a date or a date + time"; default: return "?"; } } @@ -236,6 +252,8 @@ public class CodeSystem extends DomainResource { case CODING: return "Coding (external reference)"; case STRING: return "string"; case INTEGER: return "integer"; + case BOOLEAN: return "boolean"; + case DATETIME: return "dateTime"; default: return "?"; } } @@ -254,6 +272,10 @@ public class CodeSystem extends DomainResource { return PropertyType.STRING; if ("integer".equals(codeString)) return PropertyType.INTEGER; + if ("boolean".equals(codeString)) + return PropertyType.BOOLEAN; + if ("dateTime".equals(codeString)) + return PropertyType.DATETIME; throw new IllegalArgumentException("Unknown PropertyType code '"+codeString+"'"); } public Enumeration fromType(Base code) throws FHIRException { @@ -270,6 +292,10 @@ public class CodeSystem extends DomainResource { return new Enumeration(this, PropertyType.STRING); if ("integer".equals(codeString)) return new Enumeration(this, PropertyType.INTEGER); + if ("boolean".equals(codeString)) + return new Enumeration(this, PropertyType.BOOLEAN); + if ("dateTime".equals(codeString)) + return new Enumeration(this, PropertyType.DATETIME); throw new FHIRException("Unknown PropertyType code '"+codeString+"'"); } public String toCode(PropertyType code) { @@ -281,6 +307,10 @@ public class CodeSystem extends DomainResource { return "string"; if (code == PropertyType.INTEGER) return "integer"; + if (code == PropertyType.BOOLEAN) + return "boolean"; + if (code == PropertyType.DATETIME) + return "dateTime"; return "?"; } public String toSystem(PropertyType code) { @@ -463,8 +493,7 @@ public class CodeSystem extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); } public String fhirType() { @@ -792,8 +821,8 @@ public class CodeSystem extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (description == null || description.isEmpty()) - && (operator == null || operator.isEmpty()) && (value == null || value.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, description, operator, value + ); } public String fhirType() { @@ -823,7 +852,7 @@ public class CodeSystem extends DomainResource { * The type of the property value. */ @Child(name = "type", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="code | Coding | string | integer", formalDefinition="The type of the property value." ) + @Description(shortDefinition="code | Coding | string | integer | boolean | dateTime", formalDefinition="The type of the property value." ) protected Enumeration type; private static final long serialVersionUID = -1346176181L; @@ -1049,8 +1078,7 @@ public class CodeSystem extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (description == null || description.isEmpty()) - && (type == null || type.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, description, type); } public String fhirType() { @@ -1484,9 +1512,8 @@ public class CodeSystem extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (display == null || display.isEmpty()) - && (definition == null || definition.isEmpty()) && (designation == null || designation.isEmpty()) - && (property == null || property.isEmpty()) && (concept == null || concept.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, display, definition, designation + , property, concept); } public String fhirType() { @@ -1720,8 +1747,7 @@ public class CodeSystem extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (language == null || language.isEmpty()) && (use == null || use.isEmpty()) - && (value == null || value.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( language, use, value); } public String fhirType() { @@ -1743,7 +1769,7 @@ public class CodeSystem extends DomainResource { /** * The value of this property. */ - @Child(name = "value", type = {CodeType.class, Coding.class, StringType.class, IntegerType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Child(name = "value", type = {CodeType.class, Coding.class, StringType.class, IntegerType.class, BooleanType.class, DateTimeType.class}, order=2, min=1, max=1, modifier=false, summary=false) @Description(shortDefinition="Value of the property for this concept", formalDefinition="The value of this property." ) protected Type value; @@ -1869,6 +1895,32 @@ public class CodeSystem extends DomainResource { return this.value instanceof IntegerType; } + /** + * @return {@link #value} (The value of this property.) + */ + public BooleanType getValueBooleanType() throws FHIRException { + if (!(this.value instanceof BooleanType)) + throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (BooleanType) this.value; + } + + public boolean hasValueBooleanType() { + return this.value instanceof BooleanType; + } + + /** + * @return {@link #value} (The value of this property.) + */ + public DateTimeType getValueDateTimeType() throws FHIRException { + if (!(this.value instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (DateTimeType) this.value; + } + + public boolean hasValueDateTimeType() { + return this.value instanceof DateTimeType; + } + public boolean hasValue() { return this.value != null && !this.value.isEmpty(); } @@ -1884,7 +1936,7 @@ public class CodeSystem extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("code", "code", "A code that is a reference to CodeSystem.property.code.", 0, java.lang.Integer.MAX_VALUE, code)); - childrenList.add(new Property("value[x]", "code|Coding|string|integer", "The value of this property.", 0, java.lang.Integer.MAX_VALUE, value)); + childrenList.add(new Property("value[x]", "code|Coding|string|integer|boolean|dateTime", "The value of this property.", 0, java.lang.Integer.MAX_VALUE, value)); } @Override @@ -1918,6 +1970,14 @@ public class CodeSystem extends DomainResource { this.value = new IntegerType(); return this.value; } + else if (name.equals("valueBoolean")) { + this.value = new BooleanType(); + return this.value; + } + else if (name.equals("valueDateTime")) { + this.value = new DateTimeType(); + return this.value; + } else return super.addChild(name); } @@ -1951,8 +2011,7 @@ public class CodeSystem extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (value == null || value.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, value); } public String fhirType() { @@ -2060,56 +2119,63 @@ public class CodeSystem extends DomainResource { @Description(shortDefinition="If code comparison is case sensitive", formalDefinition="If code comparison is case sensitive when codes within this system are compared to each other." ) protected BooleanType caseSensitive; + /** + * Canonical URL of value set that contains the entire code system. + */ + @Child(name = "valueSet", type = {UriType.class}, order=14, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Canonical URL for value set with entire code system", formalDefinition="Canonical URL of value set that contains the entire code system." ) + protected UriType valueSet; + /** * True If code system defines a post-composition grammar. */ - @Child(name = "compositional", type = {BooleanType.class}, order=14, min=0, max=1, modifier=false, summary=true) + @Child(name = "compositional", type = {BooleanType.class}, order=15, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="If code system defines a post-composition grammar", formalDefinition="True If code system defines a post-composition grammar." ) protected BooleanType compositional; /** * This flag is used to signify that the code system has not (or does not) maintain the definitions, and a version must be specified when referencing this code system. */ - @Child(name = "versionNeeded", type = {BooleanType.class}, order=15, min=0, max=1, modifier=false, summary=true) + @Child(name = "versionNeeded", type = {BooleanType.class}, order=16, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="If definitions are not stable", formalDefinition="This flag is used to signify that the code system has not (or does not) maintain the definitions, and a version must be specified when referencing this code system." ) protected BooleanType versionNeeded; /** * How much of the content of the code system - the concepts and codes it defines - are represented in this resource. */ - @Child(name = "content", type = {CodeType.class}, order=16, min=1, max=1, modifier=false, summary=true) + @Child(name = "content", type = {CodeType.class}, order=17, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="not-present | examplar | fragment | complete", formalDefinition="How much of the content of the code system - the concepts and codes it defines - are represented in this resource." ) protected Enumeration content; /** * The total number of concepts defined by the code system. Where the code system has a compositional grammar, the count refers to the number of base (primitive) concepts. */ - @Child(name = "count", type = {UnsignedIntType.class}, order=17, min=0, max=1, modifier=false, summary=true) + @Child(name = "count", type = {UnsignedIntType.class}, order=18, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Total concepts in the code system", formalDefinition="The total number of concepts defined by the code system. Where the code system has a compositional grammar, the count refers to the number of base (primitive) concepts." ) protected UnsignedIntType count; /** * A filter that can be used in a value set compose statement when selecting concepts using a filter. */ - @Child(name = "filter", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "filter", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Filter that can be used in a value set", formalDefinition="A filter that can be used in a value set compose statement when selecting concepts using a filter." ) protected List filter; /** * A property defines an additional slot through which additional information can be provided about a concept. */ - @Child(name = "property", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "property", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Additional information supplied about each concept", formalDefinition="A property defines an additional slot through which additional information can be provided about a concept." ) protected List property; /** * Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are. */ - @Child(name = "concept", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "concept", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Concepts in the code system", formalDefinition="Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are." ) protected List concept; - private static final long serialVersionUID = 331143159L; + private static final long serialVersionUID = 1466696062L; /** * Constructor @@ -2758,6 +2824,55 @@ public class CodeSystem extends DomainResource { return this; } + /** + * @return {@link #valueSet} (Canonical URL of value set that contains the entire code system.). This is the underlying object with id, value and extensions. The accessor "getValueSet" gives direct access to the value + */ + public UriType getValueSetElement() { + if (this.valueSet == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CodeSystem.valueSet"); + else if (Configuration.doAutoCreate()) + this.valueSet = new UriType(); // bb + return this.valueSet; + } + + public boolean hasValueSetElement() { + return this.valueSet != null && !this.valueSet.isEmpty(); + } + + public boolean hasValueSet() { + return this.valueSet != null && !this.valueSet.isEmpty(); + } + + /** + * @param value {@link #valueSet} (Canonical URL of value set that contains the entire code system.). This is the underlying object with id, value and extensions. The accessor "getValueSet" gives direct access to the value + */ + public CodeSystem setValueSetElement(UriType value) { + this.valueSet = value; + return this; + } + + /** + * @return Canonical URL of value set that contains the entire code system. + */ + public String getValueSet() { + return this.valueSet == null ? null : this.valueSet.getValue(); + } + + /** + * @param value Canonical URL of value set that contains the entire code system. + */ + public CodeSystem setValueSet(String value) { + if (Utilities.noString(value)) + this.valueSet = null; + else { + if (this.valueSet == null) + this.valueSet = new UriType(); + this.valueSet.setValue(value); + } + return this; + } + /** * @return {@link #compositional} (True If code system defines a post-composition grammar.). This is the underlying object with id, value and extensions. The accessor "getCompositional" gives direct access to the value */ @@ -3074,6 +3189,7 @@ public class CodeSystem extends DomainResource { childrenList.add(new Property("requirements", "string", "Explains why this code system is needed and why it has been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); childrenList.add(new Property("copyright", "string", "A copyright statement relating to the code system and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the code system.", 0, java.lang.Integer.MAX_VALUE, copyright)); childrenList.add(new Property("caseSensitive", "boolean", "If code comparison is case sensitive when codes within this system are compared to each other.", 0, java.lang.Integer.MAX_VALUE, caseSensitive)); + childrenList.add(new Property("valueSet", "uri", "Canonical URL of value set that contains the entire code system.", 0, java.lang.Integer.MAX_VALUE, valueSet)); childrenList.add(new Property("compositional", "boolean", "True If code system defines a post-composition grammar.", 0, java.lang.Integer.MAX_VALUE, compositional)); childrenList.add(new Property("versionNeeded", "boolean", "This flag is used to signify that the code system has not (or does not) maintain the definitions, and a version must be specified when referencing this code system.", 0, java.lang.Integer.MAX_VALUE, versionNeeded)); childrenList.add(new Property("content", "code", "How much of the content of the code system - the concepts and codes it defines - are represented in this resource.", 0, java.lang.Integer.MAX_VALUE, content)); @@ -3113,6 +3229,8 @@ public class CodeSystem extends DomainResource { this.copyright = castToString(value); // StringType else if (name.equals("caseSensitive")) this.caseSensitive = castToBoolean(value); // BooleanType + else if (name.equals("valueSet")) + this.valueSet = castToUri(value); // UriType else if (name.equals("compositional")) this.compositional = castToBoolean(value); // BooleanType else if (name.equals("versionNeeded")) @@ -3176,6 +3294,9 @@ public class CodeSystem extends DomainResource { else if (name.equals("caseSensitive")) { throw new FHIRException("Cannot call addChild on a primitive type CodeSystem.caseSensitive"); } + else if (name.equals("valueSet")) { + throw new FHIRException("Cannot call addChild on a primitive type CodeSystem.valueSet"); + } else if (name.equals("compositional")) { throw new FHIRException("Cannot call addChild on a primitive type CodeSystem.compositional"); } @@ -3231,6 +3352,7 @@ public class CodeSystem extends DomainResource { dst.requirements = requirements == null ? null : requirements.copy(); dst.copyright = copyright == null ? null : copyright.copy(); dst.caseSensitive = caseSensitive == null ? null : caseSensitive.copy(); + dst.valueSet = valueSet == null ? null : valueSet.copy(); dst.compositional = compositional == null ? null : compositional.copy(); dst.versionNeeded = versionNeeded == null ? null : versionNeeded.copy(); dst.content = content == null ? null : content.copy(); @@ -3269,10 +3391,10 @@ public class CodeSystem extends DomainResource { && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) && compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true) && compareDeep(requirements, o.requirements, true) && compareDeep(copyright, o.copyright, true) - && compareDeep(caseSensitive, o.caseSensitive, true) && compareDeep(compositional, o.compositional, true) - && compareDeep(versionNeeded, o.versionNeeded, true) && compareDeep(content, o.content, true) && compareDeep(count, o.count, true) - && compareDeep(filter, o.filter, true) && compareDeep(property, o.property, true) && compareDeep(concept, o.concept, true) - ; + && compareDeep(caseSensitive, o.caseSensitive, true) && compareDeep(valueSet, o.valueSet, true) + && compareDeep(compositional, o.compositional, true) && compareDeep(versionNeeded, o.versionNeeded, true) + && compareDeep(content, o.content, true) && compareDeep(count, o.count, true) && compareDeep(filter, o.filter, true) + && compareDeep(property, o.property, true) && compareDeep(concept, o.concept, true); } @Override @@ -3286,20 +3408,16 @@ public class CodeSystem extends DomainResource { && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) && compareValues(date, o.date, true) && compareValues(description, o.description, true) && compareValues(requirements, o.requirements, true) && compareValues(copyright, o.copyright, true) && compareValues(caseSensitive, o.caseSensitive, true) - && compareValues(compositional, o.compositional, true) && compareValues(versionNeeded, o.versionNeeded, true) - && compareValues(content, o.content, true) && compareValues(count, o.count, true); + && compareValues(valueSet, o.valueSet, true) && compareValues(compositional, o.compositional, true) + && compareValues(versionNeeded, o.versionNeeded, true) && compareValues(content, o.content, true) && compareValues(count, o.count, true) + ; } public boolean isEmpty() { - return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) - && (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty()) - && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty()) - && (useContext == null || useContext.isEmpty()) && (requirements == null || requirements.isEmpty()) - && (copyright == null || copyright.isEmpty()) && (caseSensitive == null || caseSensitive.isEmpty()) - && (compositional == null || compositional.isEmpty()) && (versionNeeded == null || versionNeeded.isEmpty()) - && (content == null || content.isEmpty()) && (count == null || count.isEmpty()) && (filter == null || filter.isEmpty()) - && (property == null || property.isEmpty()) && (concept == null || concept.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, identifier, version, name + , status, experimental, publisher, contact, date, description, useContext, requirements + , copyright, caseSensitive, valueSet, compositional, versionNeeded, content, count, filter + , property, concept); } @Override @@ -3467,6 +3585,26 @@ public class CodeSystem extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); + /** + * Search parameter: language + *

+ * Description: A language in which a designation is provided
+ * Type: token
+ * Path: CodeSystem.concept.designation.language
+ *

+ */ + @SearchParamDefinition(name="language", path="CodeSystem.concept.designation.language", description="A language in which a designation is provided", type="token" ) + public static final String SP_LANGUAGE = "language"; + /** + * Fluent Client search parameter constant for language + *

+ * Description: A language in which a designation is provided
+ * Type: token
+ * Path: CodeSystem.concept.designation.language
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam LANGUAGE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_LANGUAGE); + /** * Search parameter: version *

diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CodeableConcept.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CodeableConcept.java index e444ea5e74e..3b179233cd5 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CodeableConcept.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CodeableConcept.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -38,9 +38,8 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text. */ @@ -229,8 +228,7 @@ public class CodeableConcept extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (coding == null || coding.isEmpty()) && (text == null || text.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( coding, text); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Coding.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Coding.java index 6ce625afba1..7ac428c34ba 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Coding.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Coding.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -38,9 +38,8 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A reference to a code defined by a terminology system. */ @@ -433,9 +432,8 @@ public class Coding extends Type implements IBaseCoding, ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty()) - && (code == null || code.isEmpty()) && (display == null || display.isEmpty()) && (userSelected == null || userSelected.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( system, version, code, display + , userSelected); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Communication.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Communication.java index 6b247727e0e..35adc1097ef 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Communication.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Communication.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition. */ @@ -326,7 +325,7 @@ public class Communication extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (content == null || content.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( content); } public String fhirType() { @@ -1185,12 +1184,9 @@ public class Communication extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (category == null || category.isEmpty()) - && (sender == null || sender.isEmpty()) && (recipient == null || recipient.isEmpty()) && (payload == null || payload.isEmpty()) - && (medium == null || medium.isEmpty()) && (status == null || status.isEmpty()) && (encounter == null || encounter.isEmpty()) - && (sent == null || sent.isEmpty()) && (received == null || received.isEmpty()) && (reason == null || reason.isEmpty()) - && (subject == null || subject.isEmpty()) && (requestDetail == null || requestDetail.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, category, sender + , recipient, payload, medium, status, encounter, sent, received, reason, subject, requestDetail + ); } @Override @@ -1252,7 +1248,7 @@ public class Communication extends DomainResource { * Path: Communication.sender
*

*/ - @SearchParamDefinition(name="sender", path="Communication.sender", description="Message sender", type="reference" ) + @SearchParamDefinition(name="sender", path="Communication.sender", description="Message sender", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_SENDER = "sender"; /** * Fluent Client search parameter constant for sender @@ -1278,7 +1274,7 @@ public class Communication extends DomainResource { * Path: Communication.subject
*

*/ - @SearchParamDefinition(name="subject", path="Communication.subject", description="Focus of message", type="reference" ) + @SearchParamDefinition(name="subject", path="Communication.subject", description="Focus of message", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject @@ -1330,7 +1326,7 @@ public class Communication extends DomainResource { * Path: Communication.recipient
*

*/ - @SearchParamDefinition(name="recipient", path="Communication.recipient", description="Message recipient", type="reference" ) + @SearchParamDefinition(name="recipient", path="Communication.recipient", description="Message recipient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_RECIPIENT = "recipient"; /** * Fluent Client search parameter constant for recipient @@ -1396,7 +1392,7 @@ public class Communication extends DomainResource { * Path: Communication.encounter
*

*/ - @SearchParamDefinition(name="encounter", path="Communication.encounter", description="Encounter leading to message", type="reference" ) + @SearchParamDefinition(name="encounter", path="Communication.encounter", description="Encounter leading to message", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) public static final String SP_ENCOUNTER = "encounter"; /** * Fluent Client search parameter constant for encounter diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CommunicationRequest.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CommunicationRequest.java index f2485a70dc8..709ac8b3df2 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CommunicationRequest.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CommunicationRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition. */ @@ -406,7 +405,7 @@ public class CommunicationRequest extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (content == null || content.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( content); } public String fhirType() { @@ -1299,12 +1298,9 @@ public class CommunicationRequest extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (category == null || category.isEmpty()) - && (sender == null || sender.isEmpty()) && (recipient == null || recipient.isEmpty()) && (payload == null || payload.isEmpty()) - && (medium == null || medium.isEmpty()) && (requester == null || requester.isEmpty()) && (status == null || status.isEmpty()) - && (encounter == null || encounter.isEmpty()) && (scheduled == null || scheduled.isEmpty()) - && (reason == null || reason.isEmpty()) && (requestedOn == null || requestedOn.isEmpty()) - && (subject == null || subject.isEmpty()) && (priority == null || priority.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, category, sender + , recipient, payload, medium, requester, status, encounter, scheduled, reason, requestedOn + , subject, priority); } @Override @@ -1320,7 +1316,7 @@ public class CommunicationRequest extends DomainResource { * Path: CommunicationRequest.requester
*

*/ - @SearchParamDefinition(name="requester", path="CommunicationRequest.requester", description="An individual who requested a communication", type="reference" ) + @SearchParamDefinition(name="requester", path="CommunicationRequest.requester", description="An individual who requested a communication", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_REQUESTER = "requester"; /** * Fluent Client search parameter constant for requester @@ -1366,7 +1362,7 @@ public class CommunicationRequest extends DomainResource { * Path: CommunicationRequest.subject
*

*/ - @SearchParamDefinition(name="subject", path="CommunicationRequest.subject", description="Focus of message", type="reference" ) + @SearchParamDefinition(name="subject", path="CommunicationRequest.subject", description="Focus of message", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject @@ -1412,7 +1408,7 @@ public class CommunicationRequest extends DomainResource { * Path: CommunicationRequest.encounter
*

*/ - @SearchParamDefinition(name="encounter", path="CommunicationRequest.encounter", description="Encounter leading to message", type="reference" ) + @SearchParamDefinition(name="encounter", path="CommunicationRequest.encounter", description="Encounter leading to message", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) public static final String SP_ENCOUNTER = "encounter"; /** * Fluent Client search parameter constant for encounter @@ -1478,7 +1474,7 @@ public class CommunicationRequest extends DomainResource { * Path: CommunicationRequest.sender
*

*/ - @SearchParamDefinition(name="sender", path="CommunicationRequest.sender", description="Message sender", type="reference" ) + @SearchParamDefinition(name="sender", path="CommunicationRequest.sender", description="Message sender", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_SENDER = "sender"; /** * Fluent Client search parameter constant for sender @@ -1530,7 +1526,7 @@ public class CommunicationRequest extends DomainResource { * Path: CommunicationRequest.recipient
*

*/ - @SearchParamDefinition(name="recipient", path="CommunicationRequest.recipient", description="Message recipient", type="reference" ) + @SearchParamDefinition(name="recipient", path="CommunicationRequest.recipient", description="Message recipient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_RECIPIENT = "recipient"; /** * Fluent Client search parameter constant for recipient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CompartmentDefinition.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CompartmentDefinition.java new file mode 100644 index 00000000000..6e5d4d81e26 --- /dev/null +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/CompartmentDefinition.java @@ -0,0 +1,1575 @@ +package org.hl7.fhir.dstu3.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu3.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; +/** + * A compartment definition that defines how resources are accessed on a server. + */ +@ResourceDef(name="CompartmentDefinition", profile="http://hl7.org/fhir/Profile/CompartmentDefinition") +public class CompartmentDefinition extends DomainResource { + + public enum CompartmentType { + /** + * The compartment definition is for the patient compartment + */ + PATIENT, + /** + * The compartment definition is for the encounter compartment + */ + ENCOUNTER, + /** + * The compartment definition is for the related-person compartment + */ + RELATEDPERSON, + /** + * The compartment definition is for the practitioner compartment + */ + PRACTITIONER, + /** + * The compartment definition is for the device compartment + */ + DEVICE, + /** + * added to help the parsers + */ + NULL; + public static CompartmentType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Patient".equals(codeString)) + return PATIENT; + if ("Encounter".equals(codeString)) + return ENCOUNTER; + if ("RelatedPerson".equals(codeString)) + return RELATEDPERSON; + if ("Practitioner".equals(codeString)) + return PRACTITIONER; + if ("Device".equals(codeString)) + return DEVICE; + throw new FHIRException("Unknown CompartmentType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PATIENT: return "Patient"; + case ENCOUNTER: return "Encounter"; + case RELATEDPERSON: return "RelatedPerson"; + case PRACTITIONER: return "Practitioner"; + case DEVICE: return "Device"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PATIENT: return "http://hl7.org/fhir/compartment-type"; + case ENCOUNTER: return "http://hl7.org/fhir/compartment-type"; + case RELATEDPERSON: return "http://hl7.org/fhir/compartment-type"; + case PRACTITIONER: return "http://hl7.org/fhir/compartment-type"; + case DEVICE: return "http://hl7.org/fhir/compartment-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PATIENT: return "The compartment definition is for the patient compartment"; + case ENCOUNTER: return "The compartment definition is for the encounter compartment"; + case RELATEDPERSON: return "The compartment definition is for the related-person compartment"; + case PRACTITIONER: return "The compartment definition is for the practitioner compartment"; + case DEVICE: return "The compartment definition is for the device compartment"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PATIENT: return "Patient"; + case ENCOUNTER: return "Encounter"; + case RELATEDPERSON: return "RelatedPerson"; + case PRACTITIONER: return "Practitioner"; + case DEVICE: return "Device"; + default: return "?"; + } + } + } + + public static class CompartmentTypeEnumFactory implements EnumFactory { + public CompartmentType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("Patient".equals(codeString)) + return CompartmentType.PATIENT; + if ("Encounter".equals(codeString)) + return CompartmentType.ENCOUNTER; + if ("RelatedPerson".equals(codeString)) + return CompartmentType.RELATEDPERSON; + if ("Practitioner".equals(codeString)) + return CompartmentType.PRACTITIONER; + if ("Device".equals(codeString)) + return CompartmentType.DEVICE; + throw new IllegalArgumentException("Unknown CompartmentType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("Patient".equals(codeString)) + return new Enumeration(this, CompartmentType.PATIENT); + if ("Encounter".equals(codeString)) + return new Enumeration(this, CompartmentType.ENCOUNTER); + if ("RelatedPerson".equals(codeString)) + return new Enumeration(this, CompartmentType.RELATEDPERSON); + if ("Practitioner".equals(codeString)) + return new Enumeration(this, CompartmentType.PRACTITIONER); + if ("Device".equals(codeString)) + return new Enumeration(this, CompartmentType.DEVICE); + throw new FHIRException("Unknown CompartmentType code '"+codeString+"'"); + } + public String toCode(CompartmentType code) { + if (code == CompartmentType.PATIENT) + return "Patient"; + if (code == CompartmentType.ENCOUNTER) + return "Encounter"; + if (code == CompartmentType.RELATEDPERSON) + return "RelatedPerson"; + if (code == CompartmentType.PRACTITIONER) + return "Practitioner"; + if (code == CompartmentType.DEVICE) + return "Device"; + return "?"; + } + public String toSystem(CompartmentType code) { + return code.getSystem(); + } + } + + @Block() + public static class CompartmentDefinitionContactComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of an individual to contact regarding the compartment definition. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the compartment definition." ) + protected StringType name; + + /** + * Contact details for individual (if a name was provided) or the publisher. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + /** + * Constructor + */ + public CompartmentDefinitionContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the compartment definition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CompartmentDefinitionContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the compartment definition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public CompartmentDefinitionContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the compartment definition. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the compartment definition. + */ + public CompartmentDefinitionContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public CompartmentDefinitionContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the compartment definition.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.name"); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else + return super.addChild(name); + } + + public CompartmentDefinitionContactComponent copy() { + CompartmentDefinitionContactComponent dst = new CompartmentDefinitionContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CompartmentDefinitionContactComponent)) + return false; + CompartmentDefinitionContactComponent o = (CompartmentDefinitionContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CompartmentDefinitionContactComponent)) + return false; + CompartmentDefinitionContactComponent o = (CompartmentDefinitionContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); + } + + public String fhirType() { + return "CompartmentDefinition.contact"; + + } + + } + + @Block() + public static class CompartmentDefinitionResourceComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of a resource supported by the server. + */ + @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of resource type", formalDefinition="The name of a resource supported by the server." ) + protected CodeType code; + + /** + * The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment more than one way. + */ + @Child(name = "param", type = {StringType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Search Parameter Name, or chained params", formalDefinition="The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment more than one way." ) + protected List param; + + /** + * Additional doco about the resource and compartment. + */ + @Child(name = "documentation", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Additional doco about the resource and compartment", formalDefinition="Additional doco about the resource and compartment." ) + protected StringType documentation; + + private static final long serialVersionUID = 988080897L; + + /** + * Constructor + */ + public CompartmentDefinitionResourceComponent() { + super(); + } + + /** + * Constructor + */ + public CompartmentDefinitionResourceComponent(CodeType code) { + super(); + this.code = code; + } + + /** + * @return {@link #code} (The name of a resource supported by the server.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public CodeType getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CompartmentDefinitionResourceComponent.code"); + else if (Configuration.doAutoCreate()) + this.code = new CodeType(); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (The name of a resource supported by the server.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public CompartmentDefinitionResourceComponent setCodeElement(CodeType value) { + this.code = value; + return this; + } + + /** + * @return The name of a resource supported by the server. + */ + public String getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value The name of a resource supported by the server. + */ + public CompartmentDefinitionResourceComponent setCode(String value) { + if (this.code == null) + this.code = new CodeType(); + this.code.setValue(value); + return this; + } + + /** + * @return {@link #param} (The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment more than one way.) + */ + public List getParam() { + if (this.param == null) + this.param = new ArrayList(); + return this.param; + } + + public boolean hasParam() { + if (this.param == null) + return false; + for (StringType item : this.param) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #param} (The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment more than one way.) + */ + // syntactic sugar + public StringType addParamElement() {//2 + StringType t = new StringType(); + if (this.param == null) + this.param = new ArrayList(); + this.param.add(t); + return t; + } + + /** + * @param value {@link #param} (The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment more than one way.) + */ + public CompartmentDefinitionResourceComponent addParam(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.param == null) + this.param = new ArrayList(); + this.param.add(t); + return this; + } + + /** + * @param value {@link #param} (The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment more than one way.) + */ + public boolean hasParam(String value) { + if (this.param == null) + return false; + for (StringType v : this.param) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #documentation} (Additional doco about the resource and compartment.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StringType getDocumentationElement() { + if (this.documentation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CompartmentDefinitionResourceComponent.documentation"); + else if (Configuration.doAutoCreate()) + this.documentation = new StringType(); // bb + return this.documentation; + } + + public boolean hasDocumentationElement() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + public boolean hasDocumentation() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + /** + * @param value {@link #documentation} (Additional doco about the resource and compartment.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public CompartmentDefinitionResourceComponent setDocumentationElement(StringType value) { + this.documentation = value; + return this; + } + + /** + * @return Additional doco about the resource and compartment. + */ + public String getDocumentation() { + return this.documentation == null ? null : this.documentation.getValue(); + } + + /** + * @param value Additional doco about the resource and compartment. + */ + public CompartmentDefinitionResourceComponent setDocumentation(String value) { + if (Utilities.noString(value)) + this.documentation = null; + else { + if (this.documentation == null) + this.documentation = new StringType(); + this.documentation.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("code", "code", "The name of a resource supported by the server.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("param", "string", "The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment more than one way.", 0, java.lang.Integer.MAX_VALUE, param)); + childrenList.add(new Property("documentation", "string", "Additional doco about the resource and compartment.", 0, java.lang.Integer.MAX_VALUE, documentation)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("code")) + this.code = castToCode(value); // CodeType + else if (name.equals("param")) + this.getParam().add(castToString(value)); + else if (name.equals("documentation")) + this.documentation = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.code"); + } + else if (name.equals("param")) { + throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.param"); + } + else if (name.equals("documentation")) { + throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.documentation"); + } + else + return super.addChild(name); + } + + public CompartmentDefinitionResourceComponent copy() { + CompartmentDefinitionResourceComponent dst = new CompartmentDefinitionResourceComponent(); + copyValues(dst); + dst.code = code == null ? null : code.copy(); + if (param != null) { + dst.param = new ArrayList(); + for (StringType i : param) + dst.param.add(i.copy()); + }; + dst.documentation = documentation == null ? null : documentation.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CompartmentDefinitionResourceComponent)) + return false; + CompartmentDefinitionResourceComponent o = (CompartmentDefinitionResourceComponent) other; + return compareDeep(code, o.code, true) && compareDeep(param, o.param, true) && compareDeep(documentation, o.documentation, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CompartmentDefinitionResourceComponent)) + return false; + CompartmentDefinitionResourceComponent o = (CompartmentDefinitionResourceComponent) other; + return compareValues(code, o.code, true) && compareValues(param, o.param, true) && compareValues(documentation, o.documentation, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, param, documentation); + } + + public String fhirType() { + return "CompartmentDefinition.resource"; + + } + + } + + /** + * An absolute URL that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this compartment definition is (or will be) published. + */ + @Child(name = "url", type = {UriType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Absolute URL used to reference this compartment definition", formalDefinition="An absolute URL that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this compartment definition is (or will be) published." ) + protected UriType url; + + /** + * A free text natural language name identifying the compartment definition. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Informal name for this compartment definition", formalDefinition="A free text natural language name identifying the compartment definition." ) + protected StringType name; + + /** + * The status of this compartment definition definition. + */ + @Child(name = "status", type = {CodeType.class}, order=2, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="draft | active | retired", formalDefinition="The status of this compartment definition definition." ) + protected Enumeration status; + + /** + * A flag to indicate that this compartment definition definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + @Child(name = "experimental", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="A flag to indicate that this compartment definition definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) + protected BooleanType experimental; + + /** + * The name of the individual or organization that published the compartment definition. + */ + @Child(name = "publisher", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the compartment definition." ) + protected StringType publisher; + + /** + * Contacts to assist a user in finding and communicating with the publisher. + */ + @Child(name = "contact", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; + + /** + * The date (and optionally time) when the compartment definition definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes. + */ + @Child(name = "date", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Publication Date(/time)", formalDefinition="The date (and optionally time) when the compartment definition definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes." ) + protected DateTimeType date; + + /** + * A free text natural language description of the CompartmentDefinition and its use. + */ + @Child(name = "description", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Natural language description of the CompartmentDefinition", formalDefinition="A free text natural language description of the CompartmentDefinition and its use." ) + protected StringType description; + + /** + * The Scope and Usage that this compartment definition was created to meet. + */ + @Child(name = "requirements", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Why this compartment definition is defined", formalDefinition="The Scope and Usage that this compartment definition was created to meet." ) + protected StringType requirements; + + /** + * Which compartment this definition describes. + */ + @Child(name = "code", type = {CodeType.class}, order=9, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Patient | Encounter | RelatedPerson | Practitioner | Device", formalDefinition="Which compartment this definition describes." ) + protected Enumeration code; + + /** + * Whether the search syntax is supported. + */ + @Child(name = "search", type = {BooleanType.class}, order=10, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Whether the search syntax is supported", formalDefinition="Whether the search syntax is supported." ) + protected BooleanType search; + + /** + * Information about how a resource it related to the compartment. + */ + @Child(name = "resource", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="How resource is related to the compartment", formalDefinition="Information about how a resource it related to the compartment." ) + protected List resource; + + private static final long serialVersionUID = -1431357313L; + + /** + * Constructor + */ + public CompartmentDefinition() { + super(); + } + + /** + * Constructor + */ + public CompartmentDefinition(UriType url, StringType name, Enumeration code, BooleanType search) { + super(); + this.url = url; + this.name = name; + this.code = code; + this.search = search; + } + + /** + * @return {@link #url} (An absolute URL that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this compartment definition is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CompartmentDefinition.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An absolute URL that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this compartment definition is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public CompartmentDefinition setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An absolute URL that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this compartment definition is (or will be) published. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An absolute URL that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this compartment definition is (or will be) published. + */ + public CompartmentDefinition setUrl(String value) { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + return this; + } + + /** + * @return {@link #name} (A free text natural language name identifying the compartment definition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CompartmentDefinition.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A free text natural language name identifying the compartment definition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public CompartmentDefinition setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A free text natural language name identifying the compartment definition. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A free text natural language name identifying the compartment definition. + */ + public CompartmentDefinition setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #status} (The status of this compartment definition definition.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CompartmentDefinition.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of this compartment definition definition.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public CompartmentDefinition setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of this compartment definition definition. + */ + public ConformanceResourceStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of this compartment definition definition. + */ + public CompartmentDefinition setStatus(ConformanceResourceStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #experimental} (A flag to indicate that this compartment definition definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public BooleanType getExperimentalElement() { + if (this.experimental == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CompartmentDefinition.experimental"); + else if (Configuration.doAutoCreate()) + this.experimental = new BooleanType(); // bb + return this.experimental; + } + + public boolean hasExperimentalElement() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + public boolean hasExperimental() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + /** + * @param value {@link #experimental} (A flag to indicate that this compartment definition definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public CompartmentDefinition setExperimentalElement(BooleanType value) { + this.experimental = value; + return this; + } + + /** + * @return A flag to indicate that this compartment definition definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public boolean getExperimental() { + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); + } + + /** + * @param value A flag to indicate that this compartment definition definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public CompartmentDefinition setExperimental(boolean value) { + if (this.experimental == null) + this.experimental = new BooleanType(); + this.experimental.setValue(value); + return this; + } + + /** + * @return {@link #publisher} (The name of the individual or organization that published the compartment definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public StringType getPublisherElement() { + if (this.publisher == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CompartmentDefinition.publisher"); + else if (Configuration.doAutoCreate()) + this.publisher = new StringType(); // bb + return this.publisher; + } + + public boolean hasPublisherElement() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + public boolean hasPublisher() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + /** + * @param value {@link #publisher} (The name of the individual or organization that published the compartment definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public CompartmentDefinition setPublisherElement(StringType value) { + this.publisher = value; + return this; + } + + /** + * @return The name of the individual or organization that published the compartment definition. + */ + public String getPublisher() { + return this.publisher == null ? null : this.publisher.getValue(); + } + + /** + * @param value The name of the individual or organization that published the compartment definition. + */ + public CompartmentDefinition setPublisher(String value) { + if (Utilities.noString(value)) + this.publisher = null; + else { + if (this.publisher == null) + this.publisher = new StringType(); + this.publisher.setValue(value); + } + return this; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (CompartmentDefinitionContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + // syntactic sugar + public CompartmentDefinitionContactComponent addContact() { //3 + CompartmentDefinitionContactComponent t = new CompartmentDefinitionContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public CompartmentDefinition addContact(CompartmentDefinitionContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return {@link #date} (The date (and optionally time) when the compartment definition definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CompartmentDefinition.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date (and optionally time) when the compartment definition definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public CompartmentDefinition setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date (and optionally time) when the compartment definition definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date (and optionally time) when the compartment definition definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes. + */ + public CompartmentDefinition setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A free text natural language description of the CompartmentDefinition and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CompartmentDefinition.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A free text natural language description of the CompartmentDefinition and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public CompartmentDefinition setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A free text natural language description of the CompartmentDefinition and its use. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A free text natural language description of the CompartmentDefinition and its use. + */ + public CompartmentDefinition setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #requirements} (The Scope and Usage that this compartment definition was created to meet.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public StringType getRequirementsElement() { + if (this.requirements == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CompartmentDefinition.requirements"); + else if (Configuration.doAutoCreate()) + this.requirements = new StringType(); // bb + return this.requirements; + } + + public boolean hasRequirementsElement() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + public boolean hasRequirements() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + /** + * @param value {@link #requirements} (The Scope and Usage that this compartment definition was created to meet.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public CompartmentDefinition setRequirementsElement(StringType value) { + this.requirements = value; + return this; + } + + /** + * @return The Scope and Usage that this compartment definition was created to meet. + */ + public String getRequirements() { + return this.requirements == null ? null : this.requirements.getValue(); + } + + /** + * @param value The Scope and Usage that this compartment definition was created to meet. + */ + public CompartmentDefinition setRequirements(String value) { + if (Utilities.noString(value)) + this.requirements = null; + else { + if (this.requirements == null) + this.requirements = new StringType(); + this.requirements.setValue(value); + } + return this; + } + + /** + * @return {@link #code} (Which compartment this definition describes.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public Enumeration getCodeElement() { + if (this.code == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CompartmentDefinition.code"); + else if (Configuration.doAutoCreate()) + this.code = new Enumeration(new CompartmentTypeEnumFactory()); // bb + return this.code; + } + + public boolean hasCodeElement() { + return this.code != null && !this.code.isEmpty(); + } + + public boolean hasCode() { + return this.code != null && !this.code.isEmpty(); + } + + /** + * @param value {@link #code} (Which compartment this definition describes.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value + */ + public CompartmentDefinition setCodeElement(Enumeration value) { + this.code = value; + return this; + } + + /** + * @return Which compartment this definition describes. + */ + public CompartmentType getCode() { + return this.code == null ? null : this.code.getValue(); + } + + /** + * @param value Which compartment this definition describes. + */ + public CompartmentDefinition setCode(CompartmentType value) { + if (this.code == null) + this.code = new Enumeration(new CompartmentTypeEnumFactory()); + this.code.setValue(value); + return this; + } + + /** + * @return {@link #search} (Whether the search syntax is supported.). This is the underlying object with id, value and extensions. The accessor "getSearch" gives direct access to the value + */ + public BooleanType getSearchElement() { + if (this.search == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create CompartmentDefinition.search"); + else if (Configuration.doAutoCreate()) + this.search = new BooleanType(); // bb + return this.search; + } + + public boolean hasSearchElement() { + return this.search != null && !this.search.isEmpty(); + } + + public boolean hasSearch() { + return this.search != null && !this.search.isEmpty(); + } + + /** + * @param value {@link #search} (Whether the search syntax is supported.). This is the underlying object with id, value and extensions. The accessor "getSearch" gives direct access to the value + */ + public CompartmentDefinition setSearchElement(BooleanType value) { + this.search = value; + return this; + } + + /** + * @return Whether the search syntax is supported. + */ + public boolean getSearch() { + return this.search == null || this.search.isEmpty() ? false : this.search.getValue(); + } + + /** + * @param value Whether the search syntax is supported. + */ + public CompartmentDefinition setSearch(boolean value) { + if (this.search == null) + this.search = new BooleanType(); + this.search.setValue(value); + return this; + } + + /** + * @return {@link #resource} (Information about how a resource it related to the compartment.) + */ + public List getResource() { + if (this.resource == null) + this.resource = new ArrayList(); + return this.resource; + } + + public boolean hasResource() { + if (this.resource == null) + return false; + for (CompartmentDefinitionResourceComponent item : this.resource) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #resource} (Information about how a resource it related to the compartment.) + */ + // syntactic sugar + public CompartmentDefinitionResourceComponent addResource() { //3 + CompartmentDefinitionResourceComponent t = new CompartmentDefinitionResourceComponent(); + if (this.resource == null) + this.resource = new ArrayList(); + this.resource.add(t); + return t; + } + + // syntactic sugar + public CompartmentDefinition addResource(CompartmentDefinitionResourceComponent t) { //3 + if (t == null) + return this; + if (this.resource == null) + this.resource = new ArrayList(); + this.resource.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this compartment definition is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("name", "string", "A free text natural language name identifying the compartment definition.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("status", "code", "The status of this compartment definition definition.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("experimental", "boolean", "A flag to indicate that this compartment definition definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); + childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the compartment definition.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("date", "dateTime", "The date (and optionally time) when the compartment definition definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("description", "string", "A free text natural language description of the CompartmentDefinition and its use.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("requirements", "string", "The Scope and Usage that this compartment definition was created to meet.", 0, java.lang.Integer.MAX_VALUE, requirements)); + childrenList.add(new Property("code", "code", "Which compartment this definition describes.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("search", "boolean", "Whether the search syntax is supported.", 0, java.lang.Integer.MAX_VALUE, search)); + childrenList.add(new Property("resource", "", "Information about how a resource it related to the compartment.", 0, java.lang.Integer.MAX_VALUE, resource)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("status")) + this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("experimental")) + this.experimental = castToBoolean(value); // BooleanType + else if (name.equals("publisher")) + this.publisher = castToString(value); // StringType + else if (name.equals("contact")) + this.getContact().add((CompartmentDefinitionContactComponent) value); + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("requirements")) + this.requirements = castToString(value); // StringType + else if (name.equals("code")) + this.code = new CompartmentTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("search")) + this.search = castToBoolean(value); // BooleanType + else if (name.equals("resource")) + this.getResource().add((CompartmentDefinitionResourceComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.url"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.name"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.status"); + } + else if (name.equals("experimental")) { + throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.experimental"); + } + else if (name.equals("publisher")) { + throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.publisher"); + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.date"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.description"); + } + else if (name.equals("requirements")) { + throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.requirements"); + } + else if (name.equals("code")) { + throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.code"); + } + else if (name.equals("search")) { + throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.search"); + } + else if (name.equals("resource")) { + return addResource(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "CompartmentDefinition"; + + } + + public CompartmentDefinition copy() { + CompartmentDefinition dst = new CompartmentDefinition(); + copyValues(dst); + dst.url = url == null ? null : url.copy(); + dst.name = name == null ? null : name.copy(); + dst.status = status == null ? null : status.copy(); + dst.experimental = experimental == null ? null : experimental.copy(); + dst.publisher = publisher == null ? null : publisher.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (CompartmentDefinitionContactComponent i : contact) + dst.contact.add(i.copy()); + }; + dst.date = date == null ? null : date.copy(); + dst.description = description == null ? null : description.copy(); + dst.requirements = requirements == null ? null : requirements.copy(); + dst.code = code == null ? null : code.copy(); + dst.search = search == null ? null : search.copy(); + if (resource != null) { + dst.resource = new ArrayList(); + for (CompartmentDefinitionResourceComponent i : resource) + dst.resource.add(i.copy()); + }; + return dst; + } + + protected CompartmentDefinition typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof CompartmentDefinition)) + return false; + CompartmentDefinition o = (CompartmentDefinition) other; + return compareDeep(url, o.url, true) && compareDeep(name, o.name, true) && compareDeep(status, o.status, true) + && compareDeep(experimental, o.experimental, true) && compareDeep(publisher, o.publisher, true) + && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) && compareDeep(description, o.description, true) + && compareDeep(requirements, o.requirements, true) && compareDeep(code, o.code, true) && compareDeep(search, o.search, true) + && compareDeep(resource, o.resource, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof CompartmentDefinition)) + return false; + CompartmentDefinition o = (CompartmentDefinition) other; + return compareValues(url, o.url, true) && compareValues(name, o.name, true) && compareValues(status, o.status, true) + && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) + && compareValues(date, o.date, true) && compareValues(description, o.description, true) && compareValues(requirements, o.requirements, true) + && compareValues(code, o.code, true) && compareValues(search, o.search, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, name, status, experimental + , publisher, contact, date, description, requirements, code, search, resource); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.CompartmentDefinition; + } + + /** + * Search parameter: date + *

+ * Description: Publication Date(/time)
+ * Type: date
+ * Path: CompartmentDefinition.date
+ *

+ */ + @SearchParamDefinition(name="date", path="CompartmentDefinition.date", description="Publication Date(/time)", type="date" ) + public static final String SP_DATE = "date"; + /** + * Fluent Client search parameter constant for date + *

+ * Description: Publication Date(/time)
+ * Type: date
+ * Path: CompartmentDefinition.date
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); + + /** + * Search parameter: code + *

+ * Description: Patient | Encounter | RelatedPerson | Practitioner | Device
+ * Type: token
+ * Path: CompartmentDefinition.code
+ *

+ */ + @SearchParamDefinition(name="code", path="CompartmentDefinition.code", description="Patient | Encounter | RelatedPerson | Practitioner | Device", type="token" ) + public static final String SP_CODE = "code"; + /** + * Fluent Client search parameter constant for code + *

+ * Description: Patient | Encounter | RelatedPerson | Practitioner | Device
+ * Type: token
+ * Path: CompartmentDefinition.code
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); + + /** + * Search parameter: resource + *

+ * Description: Name of resource type
+ * Type: token
+ * Path: CompartmentDefinition.resource.code
+ *

+ */ + @SearchParamDefinition(name="resource", path="CompartmentDefinition.resource.code", description="Name of resource type", type="token" ) + public static final String SP_RESOURCE = "resource"; + /** + * Fluent Client search parameter constant for resource + *

+ * Description: Name of resource type
+ * Type: token
+ * Path: CompartmentDefinition.resource.code
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam RESOURCE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RESOURCE); + + /** + * Search parameter: name + *

+ * Description: Informal name for this compartment definition
+ * Type: string
+ * Path: CompartmentDefinition.name
+ *

+ */ + @SearchParamDefinition(name="name", path="CompartmentDefinition.name", description="Informal name for this compartment definition", type="string" ) + public static final String SP_NAME = "name"; + /** + * Fluent Client search parameter constant for name + *

+ * Description: Informal name for this compartment definition
+ * Type: string
+ * Path: CompartmentDefinition.name
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); + + /** + * Search parameter: url + *

+ * Description: Absolute URL used to reference this compartment definition
+ * Type: uri
+ * Path: CompartmentDefinition.url
+ *

+ */ + @SearchParamDefinition(name="url", path="CompartmentDefinition.url", description="Absolute URL used to reference this compartment definition", type="uri" ) + public static final String SP_URL = "url"; + /** + * Fluent Client search parameter constant for url + *

+ * Description: Absolute URL used to reference this compartment definition
+ * Type: uri
+ * Path: CompartmentDefinition.url
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); + + /** + * Search parameter: status + *

+ * Description: draft | active | retired
+ * Type: token
+ * Path: CompartmentDefinition.status
+ *

+ */ + @SearchParamDefinition(name="status", path="CompartmentDefinition.status", description="draft | active | retired", type="token" ) + public static final String SP_STATUS = "status"; + /** + * Fluent Client search parameter constant for status + *

+ * Description: draft | active | retired
+ * Type: token
+ * Path: CompartmentDefinition.status
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); + + +} + diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Composition.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Composition.java index 1f024bf1263..0969ac714da 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Composition.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Composition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained. */ @@ -535,8 +534,7 @@ public class Composition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (mode == null || mode.isEmpty()) && (time == null || time.isEmpty()) - && (party == null || party.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mode, time, party); } public String fhirType() { @@ -770,8 +768,7 @@ public class Composition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (period == null || period.isEmpty()) - && (detail == null || detail.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, period, detail); } public String fhirType() { @@ -1249,10 +1246,8 @@ public class Composition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (title == null || title.isEmpty()) && (code == null || code.isEmpty()) - && (text == null || text.isEmpty()) && (mode == null || mode.isEmpty()) && (orderedBy == null || orderedBy.isEmpty()) - && (entry == null || entry.isEmpty()) && (emptyReason == null || emptyReason.isEmpty()) && (section == null || section.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( title, code, text, mode, orderedBy + , entry, emptyReason, section); } public String fhirType() { @@ -2131,12 +2126,9 @@ public class Composition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (date == null || date.isEmpty()) - && (type == null || type.isEmpty()) && (class_ == null || class_.isEmpty()) && (title == null || title.isEmpty()) - && (status == null || status.isEmpty()) && (confidentiality == null || confidentiality.isEmpty()) - && (subject == null || subject.isEmpty()) && (author == null || author.isEmpty()) && (attester == null || attester.isEmpty()) - && (custodian == null || custodian.isEmpty()) && (event == null || event.isEmpty()) && (encounter == null || encounter.isEmpty()) - && (section == null || section.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, date, type, class_ + , title, status, confidentiality, subject, author, attester, custodian, event, encounter + , section); } @Override @@ -2212,7 +2204,7 @@ public class Composition extends DomainResource { * Path: Composition.subject
*

*/ - @SearchParamDefinition(name="subject", path="Composition.subject", description="Who and/or what the composition is about", type="reference" ) + @SearchParamDefinition(name="subject", path="Composition.subject", description="Who and/or what the composition is about", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject @@ -2238,7 +2230,7 @@ public class Composition extends DomainResource { * Path: Composition.author
*

*/ - @SearchParamDefinition(name="author", path="Composition.author", description="Who and/or what authored the composition", type="reference" ) + @SearchParamDefinition(name="author", path="Composition.author", description="Who and/or what authored the composition", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_AUTHOR = "author"; /** * Fluent Client search parameter constant for author @@ -2304,7 +2296,7 @@ public class Composition extends DomainResource { * Path: Composition.encounter
*

*/ - @SearchParamDefinition(name="encounter", path="Composition.encounter", description="Context of the Composition", type="reference" ) + @SearchParamDefinition(name="encounter", path="Composition.encounter", description="Context of the Composition", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) public static final String SP_ENCOUNTER = "encounter"; /** * Fluent Client search parameter constant for encounter @@ -2370,7 +2362,7 @@ public class Composition extends DomainResource { * Path: Composition.attester.party
*

*/ - @SearchParamDefinition(name="attester", path="Composition.attester.party", description="Who attested the composition", type="reference" ) + @SearchParamDefinition(name="attester", path="Composition.attester.party", description="Who attested the composition", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_ATTESTER = "attester"; /** * Fluent Client search parameter constant for attester diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ConceptMap.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ConceptMap.java index c777f90cd12..23323922794 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ConceptMap.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ConceptMap.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models. */ @@ -56,7 +54,7 @@ public class ConceptMap extends DomainResource { * The name of an individual to contact regarding the concept map. */ @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the concept map." ) + @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the concept map." ) protected StringType name; /** @@ -225,8 +223,7 @@ public class ConceptMap extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); } public String fhirType() { @@ -241,25 +238,32 @@ public class ConceptMap extends DomainResource { /** * An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system). */ - @Child(name = "codeSystem", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Child(name = "system", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Code System (if value set crosses code systems)", formalDefinition="An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system)." ) - protected UriType codeSystem; + protected UriType system; + + /** + * The specific version of the code system, as determined by the code system authority. + */ + @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Specific version of the code system", formalDefinition="The specific version of the code system, as determined by the code system authority." ) + protected StringType version; /** * Identity (code or path) or the element/item being mapped. */ - @Child(name = "code", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Child(name = "code", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Identifies element being mapped", formalDefinition="Identity (code or path) or the element/item being mapped." ) protected CodeType code; /** * A concept from the target value set that this concept maps to. */ - @Child(name = "target", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "target", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Concept in target system for element", formalDefinition="A concept from the target value set that this concept maps to." ) protected List target; - private static final long serialVersionUID = -458143877L; + private static final long serialVersionUID = -387093487L; /** * Constructor @@ -269,50 +273,99 @@ public class ConceptMap extends DomainResource { } /** - * @return {@link #codeSystem} (An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + * @return {@link #system} (An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value */ - public UriType getCodeSystemElement() { - if (this.codeSystem == null) + public UriType getSystemElement() { + if (this.system == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SourceElementComponent.codeSystem"); + throw new Error("Attempt to auto-create SourceElementComponent.system"); else if (Configuration.doAutoCreate()) - this.codeSystem = new UriType(); // bb - return this.codeSystem; + this.system = new UriType(); // bb + return this.system; } - public boolean hasCodeSystemElement() { - return this.codeSystem != null && !this.codeSystem.isEmpty(); + public boolean hasSystemElement() { + return this.system != null && !this.system.isEmpty(); } - public boolean hasCodeSystem() { - return this.codeSystem != null && !this.codeSystem.isEmpty(); + public boolean hasSystem() { + return this.system != null && !this.system.isEmpty(); } /** - * @param value {@link #codeSystem} (An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + * @param value {@link #system} (An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value */ - public SourceElementComponent setCodeSystemElement(UriType value) { - this.codeSystem = value; + public SourceElementComponent setSystemElement(UriType value) { + this.system = value; return this; } /** * @return An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system). */ - public String getCodeSystem() { - return this.codeSystem == null ? null : this.codeSystem.getValue(); + public String getSystem() { + return this.system == null ? null : this.system.getValue(); } /** * @param value An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system). */ - public SourceElementComponent setCodeSystem(String value) { + public SourceElementComponent setSystem(String value) { if (Utilities.noString(value)) - this.codeSystem = null; + this.system = null; else { - if (this.codeSystem == null) - this.codeSystem = new UriType(); - this.codeSystem.setValue(value); + if (this.system == null) + this.system = new UriType(); + this.system.setValue(value); + } + return this; + } + + /** + * @return {@link #version} (The specific version of the code system, as determined by the code system authority.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SourceElementComponent.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The specific version of the code system, as determined by the code system authority.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public SourceElementComponent setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The specific version of the code system, as determined by the code system authority. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The specific version of the code system, as determined by the code system authority. + */ + public SourceElementComponent setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); } return this; } @@ -408,15 +461,18 @@ public class ConceptMap extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("codeSystem", "uri", "An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).", 0, java.lang.Integer.MAX_VALUE, codeSystem)); + childrenList.add(new Property("system", "uri", "An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).", 0, java.lang.Integer.MAX_VALUE, system)); + childrenList.add(new Property("version", "string", "The specific version of the code system, as determined by the code system authority.", 0, java.lang.Integer.MAX_VALUE, version)); childrenList.add(new Property("code", "code", "Identity (code or path) or the element/item being mapped.", 0, java.lang.Integer.MAX_VALUE, code)); childrenList.add(new Property("target", "", "A concept from the target value set that this concept maps to.", 0, java.lang.Integer.MAX_VALUE, target)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("codeSystem")) - this.codeSystem = castToUri(value); // UriType + if (name.equals("system")) + this.system = castToUri(value); // UriType + else if (name.equals("version")) + this.version = castToString(value); // StringType else if (name.equals("code")) this.code = castToCode(value); // CodeType else if (name.equals("target")) @@ -427,8 +483,11 @@ 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"); + if (name.equals("system")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.system"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.version"); } else if (name.equals("code")) { throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.code"); @@ -443,7 +502,8 @@ public class ConceptMap extends DomainResource { public SourceElementComponent copy() { SourceElementComponent dst = new SourceElementComponent(); copyValues(dst); - dst.codeSystem = codeSystem == null ? null : codeSystem.copy(); + dst.system = system == null ? null : system.copy(); + dst.version = version == null ? null : version.copy(); dst.code = code == null ? null : code.copy(); if (target != null) { dst.target = new ArrayList(); @@ -460,8 +520,8 @@ public class ConceptMap extends DomainResource { if (!(other instanceof SourceElementComponent)) return false; SourceElementComponent o = (SourceElementComponent) other; - return compareDeep(codeSystem, o.codeSystem, true) && compareDeep(code, o.code, true) && compareDeep(target, o.target, true) - ; + return compareDeep(system, o.system, true) && compareDeep(version, o.version, true) && compareDeep(code, o.code, true) + && compareDeep(target, o.target, true); } @Override @@ -471,12 +531,13 @@ public class ConceptMap extends DomainResource { if (!(other instanceof SourceElementComponent)) return false; SourceElementComponent o = (SourceElementComponent) other; - return compareValues(codeSystem, o.codeSystem, true) && compareValues(code, o.code, true); + return compareValues(system, o.system, true) && compareValues(version, o.version, true) && compareValues(code, o.code, true) + ; } public boolean isEmpty() { - return super.isEmpty() && (codeSystem == null || codeSystem.isEmpty()) && (code == null || code.isEmpty()) - && (target == null || target.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( system, version, code, target + ); } public String fhirType() { @@ -491,46 +552,53 @@ public class ConceptMap extends DomainResource { /** * An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems). */ - @Child(name = "codeSystem", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Child(name = "system", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="System of the target (if necessary)", formalDefinition="An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems)." ) - protected UriType codeSystem; + protected UriType system; + + /** + * The specific version of the code system, as determined by the code system authority. + */ + @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Specific version of the code system", formalDefinition="The specific version of the code system, as determined by the code system authority." ) + protected StringType version; /** * Identity (code or path) or the element/item that the map refers to. */ - @Child(name = "code", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Child(name = "code", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Code that identifies the target element", formalDefinition="Identity (code or path) or the element/item that the map refers to." ) protected CodeType code; /** * The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source). */ - @Child(name = "equivalence", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=false) + @Child(name = "equivalence", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=false) @Description(shortDefinition="equivalent | equal | wider | subsumes | narrower | specializes | inexact | unmatched | disjoint", formalDefinition="The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source)." ) protected Enumeration equivalence; /** * A description of status/issues in mapping that conveys additional information not represented in the structured data. */ - @Child(name = "comments", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Child(name = "comments", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Description of status/issues in mapping", formalDefinition="A description of status/issues in mapping that conveys additional information not represented in the structured data." ) protected StringType comments; /** * A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value. */ - @Child(name = "dependsOn", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "dependsOn", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Other elements required for this mapping (from context)", formalDefinition="A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value." ) protected List dependsOn; /** * A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on. */ - @Child(name = "product", type = {OtherElementComponent.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "product", type = {OtherElementComponent.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Other concepts that this mapping also produces", formalDefinition="A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on." ) protected List product; - private static final long serialVersionUID = -804990059L; + private static final long serialVersionUID = 2147112127L; /** * Constructor @@ -548,50 +616,99 @@ public class ConceptMap extends DomainResource { } /** - * @return {@link #codeSystem} (An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + * @return {@link #system} (An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value */ - public UriType getCodeSystemElement() { - if (this.codeSystem == null) + public UriType getSystemElement() { + if (this.system == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TargetElementComponent.codeSystem"); + throw new Error("Attempt to auto-create TargetElementComponent.system"); else if (Configuration.doAutoCreate()) - this.codeSystem = new UriType(); // bb - return this.codeSystem; + this.system = new UriType(); // bb + return this.system; } - public boolean hasCodeSystemElement() { - return this.codeSystem != null && !this.codeSystem.isEmpty(); + public boolean hasSystemElement() { + return this.system != null && !this.system.isEmpty(); } - public boolean hasCodeSystem() { - return this.codeSystem != null && !this.codeSystem.isEmpty(); + public boolean hasSystem() { + return this.system != null && !this.system.isEmpty(); } /** - * @param value {@link #codeSystem} (An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + * @param value {@link #system} (An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value */ - public TargetElementComponent setCodeSystemElement(UriType value) { - this.codeSystem = value; + public TargetElementComponent setSystemElement(UriType value) { + this.system = value; return this; } /** * @return An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems). */ - public String getCodeSystem() { - return this.codeSystem == null ? null : this.codeSystem.getValue(); + public String getSystem() { + return this.system == null ? null : this.system.getValue(); } /** * @param value An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems). */ - public TargetElementComponent setCodeSystem(String value) { + public TargetElementComponent setSystem(String value) { if (Utilities.noString(value)) - this.codeSystem = null; + this.system = null; else { - if (this.codeSystem == null) - this.codeSystem = new UriType(); - this.codeSystem.setValue(value); + if (this.system == null) + this.system = new UriType(); + this.system.setValue(value); + } + return this; + } + + /** + * @return {@link #version} (The specific version of the code system, as determined by the code system authority.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TargetElementComponent.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The specific version of the code system, as determined by the code system authority.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public TargetElementComponent setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The specific version of the code system, as determined by the code system authority. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The specific version of the code system, as determined by the code system authority. + */ + public TargetElementComponent setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); } return this; } @@ -821,7 +938,8 @@ public class ConceptMap extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("codeSystem", "uri", "An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).", 0, java.lang.Integer.MAX_VALUE, codeSystem)); + childrenList.add(new Property("system", "uri", "An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).", 0, java.lang.Integer.MAX_VALUE, system)); + childrenList.add(new Property("version", "string", "The specific version of the code system, as determined by the code system authority.", 0, java.lang.Integer.MAX_VALUE, version)); childrenList.add(new Property("code", "code", "Identity (code or path) or the element/item that the map refers to.", 0, java.lang.Integer.MAX_VALUE, code)); childrenList.add(new Property("equivalence", "code", "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", 0, java.lang.Integer.MAX_VALUE, equivalence)); childrenList.add(new Property("comments", "string", "A description of status/issues in mapping that conveys additional information not represented in the structured data.", 0, java.lang.Integer.MAX_VALUE, comments)); @@ -831,8 +949,10 @@ public class ConceptMap extends DomainResource { @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("codeSystem")) - this.codeSystem = castToUri(value); // UriType + if (name.equals("system")) + this.system = castToUri(value); // UriType + else if (name.equals("version")) + this.version = castToString(value); // StringType else if (name.equals("code")) this.code = castToCode(value); // CodeType else if (name.equals("equivalence")) @@ -849,8 +969,11 @@ 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"); + if (name.equals("system")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.system"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.version"); } else if (name.equals("code")) { throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.code"); @@ -874,7 +997,8 @@ public class ConceptMap extends DomainResource { public TargetElementComponent copy() { TargetElementComponent dst = new TargetElementComponent(); copyValues(dst); - dst.codeSystem = codeSystem == null ? null : codeSystem.copy(); + dst.system = system == null ? null : system.copy(); + dst.version = version == null ? null : version.copy(); dst.code = code == null ? null : code.copy(); dst.equivalence = equivalence == null ? null : equivalence.copy(); dst.comments = comments == null ? null : comments.copy(); @@ -898,9 +1022,9 @@ public class ConceptMap extends DomainResource { if (!(other instanceof TargetElementComponent)) return false; TargetElementComponent o = (TargetElementComponent) other; - return compareDeep(codeSystem, o.codeSystem, true) && compareDeep(code, o.code, true) && compareDeep(equivalence, o.equivalence, true) - && compareDeep(comments, o.comments, true) && compareDeep(dependsOn, o.dependsOn, true) && compareDeep(product, o.product, true) - ; + return compareDeep(system, o.system, true) && compareDeep(version, o.version, true) && compareDeep(code, o.code, true) + && compareDeep(equivalence, o.equivalence, true) && compareDeep(comments, o.comments, true) && compareDeep(dependsOn, o.dependsOn, true) + && compareDeep(product, o.product, true); } @Override @@ -910,14 +1034,13 @@ public class ConceptMap extends DomainResource { if (!(other instanceof TargetElementComponent)) return false; TargetElementComponent o = (TargetElementComponent) other; - return compareValues(codeSystem, o.codeSystem, true) && compareValues(code, o.code, true) && compareValues(equivalence, o.equivalence, true) - && compareValues(comments, o.comments, true); + return compareValues(system, o.system, true) && compareValues(version, o.version, true) && compareValues(code, o.code, true) + && compareValues(equivalence, o.equivalence, true) && compareValues(comments, o.comments, true); } public boolean isEmpty() { - return super.isEmpty() && (codeSystem == null || codeSystem.isEmpty()) && (code == null || code.isEmpty()) - && (equivalence == null || equivalence.isEmpty()) && (comments == null || comments.isEmpty()) - && (dependsOn == null || dependsOn.isEmpty()) && (product == null || product.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( system, version, code, equivalence + , comments, dependsOn, product); } public String fhirType() { @@ -939,9 +1062,9 @@ public class ConceptMap extends DomainResource { /** * An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems). */ - @Child(name = "codeSystem", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Child(name = "system", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=false) @Description(shortDefinition="Code System (if necessary)", formalDefinition="An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems)." ) - protected UriType codeSystem; + protected UriType system; /** * Identity (code or path) or the element/item/ValueSet that the map depends on / refers to. @@ -950,7 +1073,7 @@ public class ConceptMap extends DomainResource { @Description(shortDefinition="Value of the referenced element", formalDefinition="Identity (code or path) or the element/item/ValueSet that the map depends on / refers to." ) protected StringType code; - private static final long serialVersionUID = 1488522448L; + private static final long serialVersionUID = 1365816253L; /** * Constructor @@ -962,10 +1085,10 @@ public class ConceptMap extends DomainResource { /** * Constructor */ - public OtherElementComponent(UriType element, UriType codeSystem, StringType code) { + public OtherElementComponent(UriType element, UriType system, StringType code) { super(); this.element = element; - this.codeSystem = codeSystem; + this.system = system; this.code = code; } @@ -1015,47 +1138,47 @@ public class ConceptMap extends DomainResource { } /** - * @return {@link #codeSystem} (An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + * @return {@link #system} (An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value */ - public UriType getCodeSystemElement() { - if (this.codeSystem == null) + public UriType getSystemElement() { + if (this.system == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OtherElementComponent.codeSystem"); + throw new Error("Attempt to auto-create OtherElementComponent.system"); else if (Configuration.doAutoCreate()) - this.codeSystem = new UriType(); // bb - return this.codeSystem; + this.system = new UriType(); // bb + return this.system; } - public boolean hasCodeSystemElement() { - return this.codeSystem != null && !this.codeSystem.isEmpty(); + public boolean hasSystemElement() { + return this.system != null && !this.system.isEmpty(); } - public boolean hasCodeSystem() { - return this.codeSystem != null && !this.codeSystem.isEmpty(); + public boolean hasSystem() { + return this.system != null && !this.system.isEmpty(); } /** - * @param value {@link #codeSystem} (An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).). This is the underlying object with id, value and extensions. The accessor "getCodeSystem" gives direct access to the value + * @param value {@link #system} (An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value */ - public OtherElementComponent setCodeSystemElement(UriType value) { - this.codeSystem = value; + public OtherElementComponent setSystemElement(UriType value) { + this.system = value; return this; } /** * @return An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems). */ - public String getCodeSystem() { - return this.codeSystem == null ? null : this.codeSystem.getValue(); + public String getSystem() { + return this.system == null ? null : this.system.getValue(); } /** * @param value An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems). */ - public OtherElementComponent setCodeSystem(String value) { - if (this.codeSystem == null) - this.codeSystem = new UriType(); - this.codeSystem.setValue(value); + public OtherElementComponent setSystem(String value) { + if (this.system == null) + this.system = new UriType(); + this.system.setValue(value); return this; } @@ -1107,7 +1230,7 @@ public class ConceptMap extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("element", "uri", "A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.", 0, java.lang.Integer.MAX_VALUE, element)); - childrenList.add(new Property("codeSystem", "uri", "An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).", 0, java.lang.Integer.MAX_VALUE, codeSystem)); + childrenList.add(new Property("system", "uri", "An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).", 0, java.lang.Integer.MAX_VALUE, system)); childrenList.add(new Property("code", "string", "Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.", 0, java.lang.Integer.MAX_VALUE, code)); } @@ -1115,8 +1238,8 @@ public class ConceptMap extends DomainResource { public void setProperty(String name, Base value) throws FHIRException { if (name.equals("element")) this.element = castToUri(value); // UriType - else if (name.equals("codeSystem")) - this.codeSystem = castToUri(value); // UriType + else if (name.equals("system")) + this.system = castToUri(value); // UriType else if (name.equals("code")) this.code = castToString(value); // StringType else @@ -1128,8 +1251,8 @@ public class ConceptMap extends DomainResource { if (name.equals("element")) { throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.element"); } - else if (name.equals("codeSystem")) { - throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.codeSystem"); + else if (name.equals("system")) { + throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.system"); } else if (name.equals("code")) { throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.code"); @@ -1142,7 +1265,7 @@ public class ConceptMap extends DomainResource { OtherElementComponent dst = new OtherElementComponent(); copyValues(dst); dst.element = element == null ? null : element.copy(); - dst.codeSystem = codeSystem == null ? null : codeSystem.copy(); + dst.system = system == null ? null : system.copy(); dst.code = code == null ? null : code.copy(); return dst; } @@ -1154,7 +1277,7 @@ public class ConceptMap extends DomainResource { if (!(other instanceof OtherElementComponent)) return false; OtherElementComponent o = (OtherElementComponent) other; - return compareDeep(element, o.element, true) && compareDeep(codeSystem, o.codeSystem, true) && compareDeep(code, o.code, true) + return compareDeep(element, o.element, true) && compareDeep(system, o.system, true) && compareDeep(code, o.code, true) ; } @@ -1165,13 +1288,12 @@ public class ConceptMap extends DomainResource { if (!(other instanceof OtherElementComponent)) return false; OtherElementComponent o = (OtherElementComponent) other; - return compareValues(element, o.element, true) && compareValues(codeSystem, o.codeSystem, true) && compareValues(code, o.code, true) + return compareValues(element, o.element, true) && compareValues(system, o.system, true) && compareValues(code, o.code, true) ; } public boolean isEmpty() { - return super.isEmpty() && (element == null || element.isEmpty()) && (codeSystem == null || codeSystem.isEmpty()) - && (code == null || code.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( element, system, code); } public String fhirType() { @@ -2224,13 +2346,9 @@ public class ConceptMap extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) - && (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty()) - && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty()) - && (useContext == null || useContext.isEmpty()) && (requirements == null || requirements.isEmpty()) - && (copyright == null || copyright.isEmpty()) && (source == null || source.isEmpty()) && (target == null || target.isEmpty()) - && (element == null || element.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, identifier, version, name + , status, experimental, publisher, contact, date, description, useContext, requirements + , copyright, source, target, element); } @Override @@ -2298,6 +2416,26 @@ public class ConceptMap extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.UriClientParam PRODUCT = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_PRODUCT); + /** + * Search parameter: target-system + *

+ * Description: System of the target (if necessary)
+ * Type: uri
+ * Path: ConceptMap.element.target.system
+ *

+ */ + @SearchParamDefinition(name="target-system", path="ConceptMap.element.target.system", description="System of the target (if necessary)", type="uri" ) + public static final String SP_TARGET_SYSTEM = "target-system"; + /** + * Fluent Client search parameter constant for target-system + *

+ * Description: System of the target (if necessary)
+ * Type: uri
+ * Path: ConceptMap.element.target.system
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.UriClientParam TARGET_SYSTEM = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_TARGET_SYSTEM); + /** * Search parameter: dependson *

@@ -2338,26 +2476,6 @@ public class ConceptMap extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); - /** - * Search parameter: targetsystem - *

- * Description: System of the target (if necessary)
- * Type: uri
- * Path: ConceptMap.element.target.codeSystem
- *

- */ - @SearchParamDefinition(name="targetsystem", path="ConceptMap.element.target.codeSystem", description="System of the target (if necessary)", type="uri" ) - public static final String SP_TARGETSYSTEM = "targetsystem"; - /** - * Fluent Client search parameter constant for targetsystem - *

- * Description: System of the target (if necessary)
- * Type: uri
- * Path: ConceptMap.element.target.codeSystem
- *

- */ - public static final ca.uhn.fhir.rest.gclient.UriClientParam TARGETSYSTEM = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_TARGETSYSTEM); - /** * Search parameter: source *

@@ -2404,26 +2522,6 @@ public class ConceptMap extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); - /** - * Search parameter: sourcesystem - *

- * Description: Code System (if value set crosses code systems)
- * Type: uri
- * Path: ConceptMap.element.codeSystem
- *

- */ - @SearchParamDefinition(name="sourcesystem", path="ConceptMap.element.codeSystem", description="Code System (if value set crosses code systems)", type="uri" ) - public static final String SP_SOURCESYSTEM = "sourcesystem"; - /** - * Fluent Client search parameter constant for sourcesystem - *

- * Description: Code System (if value set crosses code systems)
- * Type: uri
- * Path: ConceptMap.element.codeSystem
- *

- */ - public static final ca.uhn.fhir.rest.gclient.UriClientParam SOURCESYSTEM = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_SOURCESYSTEM); - /** * Search parameter: url *

@@ -2471,50 +2569,50 @@ public class ConceptMap extends DomainResource { public static final ca.uhn.fhir.model.api.Include INCLUDE_TARGET = new ca.uhn.fhir.model.api.Include("ConceptMap:target").toLocked(); /** - * Search parameter: sourcecode + * Search parameter: source-code *

* Description: Identifies element being mapped
* Type: token
* Path: ConceptMap.element.code
*

*/ - @SearchParamDefinition(name="sourcecode", path="ConceptMap.element.code", description="Identifies element being mapped", type="token" ) - public static final String SP_SOURCECODE = "sourcecode"; + @SearchParamDefinition(name="source-code", path="ConceptMap.element.code", description="Identifies element being mapped", type="token" ) + public static final String SP_SOURCE_CODE = "source-code"; /** - * Fluent Client search parameter constant for sourcecode + * Fluent Client search parameter constant for source-code *

* Description: Identifies element being mapped
* Type: token
* Path: ConceptMap.element.code
*

*/ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam SOURCECODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SOURCECODE); + public static final ca.uhn.fhir.rest.gclient.TokenClientParam SOURCE_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SOURCE_CODE); /** - * Search parameter: sourceuri + * Search parameter: source-uri *

* Description: Identifies the source of the concepts which are being mapped
* Type: reference
* Path: ConceptMap.sourceUri
*

*/ - @SearchParamDefinition(name="sourceuri", path="ConceptMap.sourceUri", description="Identifies the source of the concepts which are being mapped", type="reference" ) - public static final String SP_SOURCEURI = "sourceuri"; + @SearchParamDefinition(name="source-uri", path="ConceptMap.sourceUri", description="Identifies the source of the concepts which are being mapped", type="reference" ) + public static final String SP_SOURCE_URI = "source-uri"; /** - * Fluent Client search parameter constant for sourceuri + * Fluent Client search parameter constant for source-uri *

* Description: Identifies the source of the concepts which are being mapped
* Type: reference
* Path: ConceptMap.sourceUri
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SOURCEURI = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SOURCEURI); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SOURCE_URI = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SOURCE_URI); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ConceptMap:sourceuri". + * the path value of "ConceptMap:source-uri". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCEURI = new ca.uhn.fhir.model.api.Include("ConceptMap:sourceuri").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE_URI = new ca.uhn.fhir.model.api.Include("ConceptMap:source-uri").toLocked(); /** * Search parameter: name @@ -2577,24 +2675,44 @@ public class ConceptMap extends DomainResource { public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); /** - * Search parameter: targetcode + * Search parameter: source-system *

- * Description: Code that identifies the target element
- * Type: token
- * Path: ConceptMap.element.target.code
+ * Description: Code System (if value set crosses code systems)
+ * Type: uri
+ * Path: ConceptMap.element.system
*

*/ - @SearchParamDefinition(name="targetcode", path="ConceptMap.element.target.code", description="Code that identifies the target element", type="token" ) - public static final String SP_TARGETCODE = "targetcode"; + @SearchParamDefinition(name="source-system", path="ConceptMap.element.system", description="Code System (if value set crosses code systems)", type="uri" ) + public static final String SP_SOURCE_SYSTEM = "source-system"; /** - * Fluent Client search parameter constant for targetcode + * Fluent Client search parameter constant for source-system + *

+ * Description: Code System (if value set crosses code systems)
+ * Type: uri
+ * Path: ConceptMap.element.system
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.UriClientParam SOURCE_SYSTEM = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_SOURCE_SYSTEM); + + /** + * Search parameter: target-code *

* Description: Code that identifies the target element
* Type: token
* Path: ConceptMap.element.target.code
*

*/ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam TARGETCODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TARGETCODE); + @SearchParamDefinition(name="target-code", path="ConceptMap.element.target.code", description="Code that identifies the target element", type="token" ) + public static final String SP_TARGET_CODE = "target-code"; + /** + * Fluent Client search parameter constant for target-code + *

+ * Description: Code that identifies the target element
+ * Type: token
+ * Path: ConceptMap.element.target.code
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam TARGET_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TARGET_CODE); /** * Search parameter: status diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Condition.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Condition.java index d529b481566..d1fb18f4846 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Condition.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Condition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a diagnosis during an encounter; populating a problem list or a summary statement, such as a discharge summary. */ @@ -364,8 +363,7 @@ public class Condition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (summary == null || summary.isEmpty()) && (assessment == null || assessment.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( summary, assessment); } public String fhirType() { @@ -540,8 +538,7 @@ public class Condition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (detail == null || detail.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, detail); } public String fhirType() { @@ -1642,13 +1639,9 @@ public class Condition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (patient == null || patient.isEmpty()) - && (encounter == null || encounter.isEmpty()) && (asserter == null || asserter.isEmpty()) - && (dateRecorded == null || dateRecorded.isEmpty()) && (code == null || code.isEmpty()) && (category == null || category.isEmpty()) - && (clinicalStatus == null || clinicalStatus.isEmpty()) && (verificationStatus == null || verificationStatus.isEmpty()) - && (severity == null || severity.isEmpty()) && (onset == null || onset.isEmpty()) && (abatement == null || abatement.isEmpty()) - && (stage == null || stage.isEmpty()) && (evidence == null || evidence.isEmpty()) && (bodySite == null || bodySite.isEmpty()) - && (notes == null || notes.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, patient, encounter + , asserter, dateRecorded, code, category, clinicalStatus, verificationStatus, severity + , onset, abatement, stage, evidence, bodySite, notes); } @Override @@ -1784,7 +1777,7 @@ public class Condition extends DomainResource { * Path: Condition.encounter
*

*/ - @SearchParamDefinition(name="encounter", path="Condition.encounter", description="Encounter when condition first asserted", type="reference" ) + @SearchParamDefinition(name="encounter", path="Condition.encounter", description="Encounter when condition first asserted", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) public static final String SP_ENCOUNTER = "encounter"; /** * Fluent Client search parameter constant for encounter @@ -1830,7 +1823,7 @@ public class Condition extends DomainResource { * Path: Condition.asserter
*

*/ - @SearchParamDefinition(name="asserter", path="Condition.asserter", description="Person who asserts this condition", type="reference" ) + @SearchParamDefinition(name="asserter", path="Condition.asserter", description="Person who asserts this condition", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_ASSERTER = "asserter"; /** * Fluent Client search parameter constant for asserter @@ -1896,7 +1889,7 @@ public class Condition extends DomainResource { * Path: Condition.patient
*

*/ - @SearchParamDefinition(name="patient", path="Condition.patient", description="Who has the condition?", type="reference" ) + @SearchParamDefinition(name="patient", path="Condition.patient", description="Who has the condition?", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Conformance.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Conformance.java index 826016c5733..7e58944c549 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Conformance.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Conformance.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A conformance statement is a set of capabilities of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation. */ @@ -380,10 +378,6 @@ public class Conformance extends DomainResource implements IBaseConformance { * null */ HISTORYINSTANCE, - /** - * null - */ - VALIDATE, /** * null */ @@ -413,8 +407,6 @@ public class Conformance extends DomainResource implements IBaseConformance { return DELETE; if ("history-instance".equals(codeString)) return HISTORYINSTANCE; - if ("validate".equals(codeString)) - return VALIDATE; if ("history-type".equals(codeString)) return HISTORYTYPE; if ("create".equals(codeString)) @@ -430,7 +422,6 @@ public class Conformance extends DomainResource implements IBaseConformance { case UPDATE: return "update"; case DELETE: return "delete"; case HISTORYINSTANCE: return "history-instance"; - case VALIDATE: return "validate"; case HISTORYTYPE: return "history-type"; case CREATE: return "create"; case SEARCHTYPE: return "search-type"; @@ -444,7 +435,6 @@ public class Conformance extends DomainResource implements IBaseConformance { case UPDATE: return "http://hl7.org/fhir/restful-interaction"; case DELETE: return "http://hl7.org/fhir/restful-interaction"; case HISTORYINSTANCE: return "http://hl7.org/fhir/restful-interaction"; - case VALIDATE: return "http://hl7.org/fhir/restful-interaction"; case HISTORYTYPE: return "http://hl7.org/fhir/restful-interaction"; case CREATE: return "http://hl7.org/fhir/restful-interaction"; case SEARCHTYPE: return "http://hl7.org/fhir/restful-interaction"; @@ -458,7 +448,6 @@ public class Conformance extends DomainResource implements IBaseConformance { case UPDATE: return ""; case DELETE: return ""; case HISTORYINSTANCE: return ""; - case VALIDATE: return ""; case HISTORYTYPE: return ""; case CREATE: return ""; case SEARCHTYPE: return ""; @@ -472,7 +461,6 @@ public class Conformance extends DomainResource implements IBaseConformance { case UPDATE: return "update"; case DELETE: return "delete"; case HISTORYINSTANCE: return "history-instance"; - case VALIDATE: return "validate"; case HISTORYTYPE: return "history-type"; case CREATE: return "create"; case SEARCHTYPE: return "search-type"; @@ -496,8 +484,6 @@ public class Conformance extends DomainResource implements IBaseConformance { return TypeRestfulInteraction.DELETE; if ("history-instance".equals(codeString)) return TypeRestfulInteraction.HISTORYINSTANCE; - if ("validate".equals(codeString)) - return TypeRestfulInteraction.VALIDATE; if ("history-type".equals(codeString)) return TypeRestfulInteraction.HISTORYTYPE; if ("create".equals(codeString)) @@ -522,8 +508,6 @@ public class Conformance extends DomainResource implements IBaseConformance { return new Enumeration(this, TypeRestfulInteraction.DELETE); if ("history-instance".equals(codeString)) return new Enumeration(this, TypeRestfulInteraction.HISTORYINSTANCE); - if ("validate".equals(codeString)) - return new Enumeration(this, TypeRestfulInteraction.VALIDATE); if ("history-type".equals(codeString)) return new Enumeration(this, TypeRestfulInteraction.HISTORYTYPE); if ("create".equals(codeString)) @@ -543,8 +527,6 @@ public class Conformance extends DomainResource implements IBaseConformance { return "delete"; if (code == TypeRestfulInteraction.HISTORYINSTANCE) return "history-instance"; - if (code == TypeRestfulInteraction.VALIDATE) - return "validate"; if (code == TypeRestfulInteraction.HISTORYTYPE) return "history-type"; if (code == TypeRestfulInteraction.CREATE) @@ -1484,7 +1466,7 @@ public class Conformance extends DomainResource implements IBaseConformance { * The name of an individual to contact regarding the conformance. */ @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the conformance." ) + @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the conformance." ) protected StringType name; /** @@ -1653,8 +1635,7 @@ public class Conformance extends DomainResource implements IBaseConformance { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); } public String fhirType() { @@ -1913,8 +1894,7 @@ public class Conformance extends DomainResource implements IBaseConformance { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (version == null || version.isEmpty()) - && (releaseDate == null || releaseDate.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, version, releaseDate); } public String fhirType() { @@ -2108,8 +2088,7 @@ public class Conformance extends DomainResource implements IBaseConformance { } public boolean isEmpty() { - return super.isEmpty() && (description == null || description.isEmpty()) && (url == null || url.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( description, url); } public String fhirType() { @@ -2145,7 +2124,7 @@ public class Conformance extends DomainResource implements IBaseConformance { /** * A specification of the restful capabilities of the solution for a specific resource type. */ - @Child(name = "resource", type = {}, order=4, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "resource", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Resource served on the REST interface", formalDefinition="A specification of the restful capabilities of the solution for a specific resource type." ) protected List resource; @@ -2178,10 +2157,10 @@ public class Conformance extends DomainResource implements IBaseConformance { protected List operation; /** - * An absolute URI which is a reference to the definition of a compartment hosted by the system. + * An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by it's canonical URL. */ @Child(name = "compartment", type = {UriType.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Compartments served/used by system", formalDefinition="An absolute URI which is a reference to the definition of a compartment hosted by the system." ) + @Description(shortDefinition="Compartments served/used by system", formalDefinition="An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by it's canonical URL." ) protected List compartment; private static final long serialVersionUID = 931983837L; @@ -2529,7 +2508,7 @@ public class Conformance extends DomainResource implements IBaseConformance { } /** - * @return {@link #compartment} (An absolute URI which is a reference to the definition of a compartment hosted by the system.) + * @return {@link #compartment} (An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by it's canonical URL.) */ public List getCompartment() { if (this.compartment == null) @@ -2547,7 +2526,7 @@ public class Conformance extends DomainResource implements IBaseConformance { } /** - * @return {@link #compartment} (An absolute URI which is a reference to the definition of a compartment hosted by the system.) + * @return {@link #compartment} (An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by it's canonical URL.) */ // syntactic sugar public UriType addCompartmentElement() {//2 @@ -2559,7 +2538,7 @@ public class Conformance extends DomainResource implements IBaseConformance { } /** - * @param value {@link #compartment} (An absolute URI which is a reference to the definition of a compartment hosted by the system.) + * @param value {@link #compartment} (An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by it's canonical URL.) */ public ConformanceRestComponent addCompartment(String value) { //1 UriType t = new UriType(); @@ -2571,7 +2550,7 @@ public class Conformance extends DomainResource implements IBaseConformance { } /** - * @param value {@link #compartment} (An absolute URI which is a reference to the definition of a compartment hosted by the system.) + * @param value {@link #compartment} (An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by it's canonical URL.) */ public boolean hasCompartment(String value) { if (this.compartment == null) @@ -2592,7 +2571,7 @@ public class Conformance extends DomainResource implements IBaseConformance { childrenList.add(new Property("transactionMode", "code", "A code that indicates how transactions are supported.", 0, java.lang.Integer.MAX_VALUE, transactionMode)); childrenList.add(new Property("searchParam", "@Conformance.rest.resource.searchParam", "Search parameters that are supported for searching all resources for implementations to support and/or make use of - either references to ones defined in the specification, or additional ones defined for/by the implementation.", 0, java.lang.Integer.MAX_VALUE, searchParam)); childrenList.add(new Property("operation", "", "Definition of an operation or a named query and with its parameters and their meaning and type.", 0, java.lang.Integer.MAX_VALUE, operation)); - childrenList.add(new Property("compartment", "uri", "An absolute URI which is a reference to the definition of a compartment hosted by the system.", 0, java.lang.Integer.MAX_VALUE, compartment)); + childrenList.add(new Property("compartment", "uri", "An absolute URI which is a reference to the definition of a compartment that the system supports. The reference is to a CompartmentDefinition resource by it's canonical URL.", 0, java.lang.Integer.MAX_VALUE, compartment)); } @Override @@ -2713,11 +2692,8 @@ public class Conformance extends DomainResource implements IBaseConformance { } public boolean isEmpty() { - return super.isEmpty() && (mode == null || mode.isEmpty()) && (documentation == null || documentation.isEmpty()) - && (security == null || security.isEmpty()) && (resource == null || resource.isEmpty()) && (interaction == null || interaction.isEmpty()) - && (transactionMode == null || transactionMode.isEmpty()) && (searchParam == null || searchParam.isEmpty()) - && (operation == null || operation.isEmpty()) && (compartment == null || compartment.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mode, documentation, security + , resource, interaction, transactionMode, searchParam, operation, compartment); } public String fhirType() { @@ -3020,9 +2996,8 @@ public class Conformance extends DomainResource implements IBaseConformance { } public boolean isEmpty() { - return super.isEmpty() && (cors == null || cors.isEmpty()) && (service == null || service.isEmpty()) - && (description == null || description.isEmpty()) && (certificate == null || certificate.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( cors, service, description, certificate + ); } public String fhirType() { @@ -3212,8 +3187,7 @@ public class Conformance extends DomainResource implements IBaseConformance { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (blob == null || blob.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, blob); } public String fhirType() { @@ -4039,13 +4013,9 @@ public class Conformance extends DomainResource implements IBaseConformance { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (profile == null || profile.isEmpty()) - && (interaction == null || interaction.isEmpty()) && (versioning == null || versioning.isEmpty()) - && (readHistory == null || readHistory.isEmpty()) && (updateCreate == null || updateCreate.isEmpty()) - && (conditionalCreate == null || conditionalCreate.isEmpty()) && (conditionalUpdate == null || conditionalUpdate.isEmpty()) - && (conditionalDelete == null || conditionalDelete.isEmpty()) && (searchInclude == null || searchInclude.isEmpty()) - && (searchRevInclude == null || searchRevInclude.isEmpty()) && (searchParam == null || searchParam.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, profile, interaction, versioning + , readHistory, updateCreate, conditionalCreate, conditionalUpdate, conditionalDelete, searchInclude + , searchRevInclude, searchParam); } public String fhirType() { @@ -4061,7 +4031,7 @@ public class Conformance extends DomainResource implements IBaseConformance { * Coded identifier of the operation, supported by the system resource. */ @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="read | vread | update | delete | history-instance | validate | history-type | create | search-type", formalDefinition="Coded identifier of the operation, supported by the system resource." ) + @Description(shortDefinition="read | vread | update | delete | history-instance | history-type | create | search-type", formalDefinition="Coded identifier of the operation, supported by the system resource." ) protected Enumeration code; /** @@ -4239,8 +4209,7 @@ public class Conformance extends DomainResource implements IBaseConformance { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (documentation == null || documentation.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, documentation); } public String fhirType() { @@ -4777,10 +4746,8 @@ public class Conformance extends DomainResource implements IBaseConformance { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (definition == null || definition.isEmpty()) - && (type == null || type.isEmpty()) && (documentation == null || documentation.isEmpty()) - && (target == null || target.isEmpty()) && (modifier == null || modifier.isEmpty()) && (chain == null || chain.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, definition, type, documentation + , target, modifier, chain); } public String fhirType() { @@ -4974,8 +4941,7 @@ public class Conformance extends DomainResource implements IBaseConformance { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (documentation == null || documentation.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, documentation); } public String fhirType() { @@ -4988,10 +4954,10 @@ public class Conformance extends DomainResource implements IBaseConformance { @Block() public static class ConformanceRestOperationComponent extends BackboneElement implements IBaseBackboneElement { /** - * The name of a query, which is used in the _query parameter when the query is called. + * The name of the operation or query. For an operation, this is the name prefixed with $ and used in the url. For a query, this is the name used in the _query parameter when the query is called. */ @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Name by which the operation/query is invoked", formalDefinition="The name of a query, which is used in the _query parameter when the query is called." ) + @Description(shortDefinition="Name by which the operation/query is invoked", formalDefinition="The name of the operation or query. For an operation, this is the name prefixed with $ and used in the url. For a query, this is the name used in the _query parameter when the query is called." ) protected StringType name; /** @@ -5025,7 +4991,7 @@ public class Conformance extends DomainResource implements IBaseConformance { } /** - * @return {@link #name} (The name of a query, which is used in the _query parameter when the query is called.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + * @return {@link #name} (The name of the operation or query. For an operation, this is the name prefixed with $ and used in the url. For a query, this is the name used in the _query parameter when the query is called.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ public StringType getNameElement() { if (this.name == null) @@ -5045,7 +5011,7 @@ public class Conformance extends DomainResource implements IBaseConformance { } /** - * @param value {@link #name} (The name of a query, which is used in the _query parameter when the query is called.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + * @param value {@link #name} (The name of the operation or query. For an operation, this is the name prefixed with $ and used in the url. For a query, this is the name used in the _query parameter when the query is called.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ public ConformanceRestOperationComponent setNameElement(StringType value) { this.name = value; @@ -5053,14 +5019,14 @@ public class Conformance extends DomainResource implements IBaseConformance { } /** - * @return The name of a query, which is used in the _query parameter when the query is called. + * @return The name of the operation or query. For an operation, this is the name prefixed with $ and used in the url. For a query, this is the name used in the _query parameter when the query is called. */ public String getName() { return this.name == null ? null : this.name.getValue(); } /** - * @param value The name of a query, which is used in the _query parameter when the query is called. + * @param value The name of the operation or query. For an operation, this is the name prefixed with $ and used in the url. For a query, this is the name used in the _query parameter when the query is called. */ public ConformanceRestOperationComponent setName(String value) { if (this.name == null) @@ -5115,7 +5081,7 @@ public class Conformance extends DomainResource implements IBaseConformance { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("name", "string", "The name of a query, which is used in the _query parameter when the query is called.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("name", "string", "The name of the operation or query. For an operation, this is the name prefixed with $ and used in the url. For a query, this is the name used in the _query parameter when the query is called.", 0, java.lang.Integer.MAX_VALUE, name)); childrenList.add(new Property("definition", "Reference(OperationDefinition)", "Where the formal definition can be found.", 0, java.lang.Integer.MAX_VALUE, definition)); } @@ -5171,8 +5137,7 @@ public class Conformance extends DomainResource implements IBaseConformance { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (definition == null || definition.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, definition); } public String fhirType() { @@ -5476,9 +5441,8 @@ public class Conformance extends DomainResource implements IBaseConformance { } public boolean isEmpty() { - return super.isEmpty() && (endpoint == null || endpoint.isEmpty()) && (reliableCache == null || reliableCache.isEmpty()) - && (documentation == null || documentation.isEmpty()) && (event == null || event.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( endpoint, reliableCache, documentation + , event); } public String fhirType() { @@ -5649,8 +5613,7 @@ public class Conformance extends DomainResource implements IBaseConformance { } public boolean isEmpty() { - return super.isEmpty() && (protocol == null || protocol.isEmpty()) && (address == null || address.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( protocol, address); } public String fhirType() { @@ -6140,10 +6103,8 @@ public class Conformance extends DomainResource implements IBaseConformance { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (category == null || category.isEmpty()) - && (mode == null || mode.isEmpty()) && (focus == null || focus.isEmpty()) && (request == null || request.isEmpty()) - && (response == null || response.isEmpty()) && (documentation == null || documentation.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, category, mode, focus + , request, response, documentation); } public String fhirType() { @@ -6403,8 +6364,8 @@ public class Conformance extends DomainResource implements IBaseConformance { } public boolean isEmpty() { - return super.isEmpty() && (mode == null || mode.isEmpty()) && (documentation == null || documentation.isEmpty()) - && (profile == null || profile.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mode, documentation, profile + ); } public String fhirType() { @@ -6438,7 +6399,7 @@ public class Conformance extends DomainResource implements IBaseConformance { /** * The status of this conformance statement. */ - @Child(name = "status", type = {CodeType.class}, order=3, min=0, max=1, modifier=true, summary=true) + @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of this conformance statement." ) protected Enumeration status; @@ -6477,66 +6438,73 @@ public class Conformance extends DomainResource implements IBaseConformance { @Description(shortDefinition="Human description of the conformance statement", formalDefinition="A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP." ) protected StringType description; + /** + * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of conformance statements. + */ + @Child(name = "useContext", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Content intends to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of conformance statements." ) + protected List useContext; + /** * Explains why this conformance statement is needed and why it's been constrained as it has. */ - @Child(name = "requirements", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Why is this needed?", formalDefinition="Explains why this conformance statement is needed and why it's been constrained as it has." ) + @Child(name = "requirements", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Why this resource has been created", formalDefinition="Explains why this conformance statement is needed and why it's been constrained as it has." ) protected StringType requirements; /** * A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement. */ - @Child(name = "copyright", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Child(name = "copyright", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement." ) protected StringType copyright; /** * The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase). */ - @Child(name = "kind", type = {CodeType.class}, order=11, min=1, max=1, modifier=false, summary=true) + @Child(name = "kind", type = {CodeType.class}, order=12, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="instance | capability | requirements", formalDefinition="The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase)." ) protected Enumeration kind; /** * Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation. */ - @Child(name = "software", type = {}, order=12, min=0, max=1, modifier=false, summary=true) + @Child(name = "software", type = {}, order=13, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Software that is covered by this conformance statement", formalDefinition="Software that is covered by this conformance statement. It is used when the conformance statement describes the capabilities of a particular software version, independent of an installation." ) protected ConformanceSoftwareComponent software; /** * Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program. */ - @Child(name = "implementation", type = {}, order=13, min=0, max=1, modifier=false, summary=true) + @Child(name = "implementation", type = {}, order=14, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="If this describes a specific instance", formalDefinition="Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program." ) protected ConformanceImplementationComponent implementation; /** * The version of the FHIR specification on which this conformance statement is based. */ - @Child(name = "fhirVersion", type = {IdType.class}, order=14, min=1, max=1, modifier=false, summary=true) + @Child(name = "fhirVersion", type = {IdType.class}, order=15, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="FHIR Version the system uses", formalDefinition="The version of the FHIR specification on which this conformance statement is based." ) protected IdType fhirVersion; /** * A code that indicates whether the application accepts unknown elements or extensions when reading resources. */ - @Child(name = "acceptUnknown", type = {CodeType.class}, order=15, min=1, max=1, modifier=false, summary=true) + @Child(name = "acceptUnknown", type = {CodeType.class}, order=16, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="no | extensions | elements | both", formalDefinition="A code that indicates whether the application accepts unknown elements or extensions when reading resources." ) protected Enumeration acceptUnknown; /** * A list of the formats supported by this implementation using their content types. */ - @Child(name = "format", type = {CodeType.class}, order=16, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "format", type = {CodeType.class}, order=17, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="formats supported (xml | json | mime type)", formalDefinition="A list of the formats supported by this implementation using their content types." ) protected List format; /** * A list of profiles that represent different use cases supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}. */ - @Child(name = "profile", type = {StructureDefinition.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "profile", type = {StructureDefinition.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Profiles for use cases supported", formalDefinition="A list of profiles that represent different use cases supported by the system. For a server, \"supported by the system\" means the system hosts/produces a set of resources that are conformant to a particular profile, and allows clients that use its services to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. See further discussion in [Using Profiles]{profiling.html#profile-uses}." ) protected List profile; /** @@ -6548,25 +6516,25 @@ public class Conformance extends DomainResource implements IBaseConformance { /** * A definition of the restful capabilities of the solution, if any. */ - @Child(name = "rest", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "rest", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="If the endpoint is a RESTful one", formalDefinition="A definition of the restful capabilities of the solution, if any." ) protected List rest; /** * A description of the messaging capabilities of the solution. */ - @Child(name = "messaging", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "messaging", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="If messaging is supported", formalDefinition="A description of the messaging capabilities of the solution." ) protected List messaging; /** * A document definition. */ - @Child(name = "document", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "document", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Document definition", formalDefinition="A document definition." ) protected List document; - private static final long serialVersionUID = 1969977598L; + private static final long serialVersionUID = 64276427L; /** * Constructor @@ -6578,8 +6546,9 @@ public class Conformance extends DomainResource implements IBaseConformance { /** * Constructor */ - public Conformance(DateTimeType date, Enumeration kind, IdType fhirVersion, Enumeration acceptUnknown) { + public Conformance(Enumeration status, DateTimeType date, Enumeration kind, IdType fhirVersion, Enumeration acceptUnknown) { super(); + this.status = status; this.date = date; this.kind = kind; this.fhirVersion = fhirVersion; @@ -6772,13 +6741,9 @@ public class Conformance extends DomainResource implements IBaseConformance { * @param value The status of this conformance statement. */ public Conformance setStatus(ConformanceResourceStatus value) { - if (value == null) - this.status = null; - else { if (this.status == null) this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); this.status.setValue(value); - } return this; } @@ -7010,6 +6975,46 @@ public class Conformance extends DomainResource implements IBaseConformance { return this; } + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of conformance statements.) + */ + public List getUseContext() { + if (this.useContext == null) + this.useContext = new ArrayList(); + return this.useContext; + } + + public boolean hasUseContext() { + if (this.useContext == null) + return false; + for (CodeableConcept item : this.useContext) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of conformance statements.) + */ + // syntactic sugar + public CodeableConcept addUseContext() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return t; + } + + // syntactic sugar + public Conformance addUseContext(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return this; + } + /** * @return {@link #requirements} (Explains why this conformance statement is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value */ @@ -7537,6 +7542,7 @@ public class Conformance extends DomainResource implements IBaseConformance { childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the conformance.", 0, java.lang.Integer.MAX_VALUE, publisher)); childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); childrenList.add(new Property("description", "string", "A free text natural language description of the conformance statement and its use. Typically, this is used when the conformance statement describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of conformance statements.", 0, java.lang.Integer.MAX_VALUE, useContext)); childrenList.add(new Property("requirements", "string", "Explains why this conformance statement is needed and why it's been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); childrenList.add(new Property("copyright", "string", "A copyright statement relating to the conformance statement and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the system described by the conformance statement.", 0, java.lang.Integer.MAX_VALUE, copyright)); childrenList.add(new Property("kind", "code", "The way that this statement is intended to be used, to describe an actual running instance of software, a particular product (kind not instance of software) or a class of implementation (e.g. a desired purchase).", 0, java.lang.Integer.MAX_VALUE, kind)); @@ -7571,6 +7577,8 @@ public class Conformance extends DomainResource implements IBaseConformance { this.getContact().add((ConformanceContactComponent) value); else if (name.equals("description")) this.description = castToString(value); // StringType + else if (name.equals("useContext")) + this.getUseContext().add(castToCodeableConcept(value)); else if (name.equals("requirements")) this.requirements = castToString(value); // StringType else if (name.equals("copyright")) @@ -7628,6 +7636,9 @@ public class Conformance extends DomainResource implements IBaseConformance { else if (name.equals("description")) { throw new FHIRException("Cannot call addChild on a primitive type Conformance.description"); } + else if (name.equals("useContext")) { + return addUseContext(); + } else if (name.equals("requirements")) { throw new FHIRException("Cannot call addChild on a primitive type Conformance.requirements"); } @@ -7691,6 +7702,11 @@ public class Conformance extends DomainResource implements IBaseConformance { dst.contact.add(i.copy()); }; dst.description = description == null ? null : description.copy(); + if (useContext != null) { + dst.useContext = new ArrayList(); + for (CodeableConcept i : useContext) + dst.useContext.add(i.copy()); + }; dst.requirements = requirements == null ? null : requirements.copy(); dst.copyright = copyright == null ? null : copyright.copy(); dst.kind = kind == null ? null : kind.copy(); @@ -7740,11 +7756,12 @@ public class Conformance extends DomainResource implements IBaseConformance { return compareDeep(url, o.url, true) && compareDeep(version, o.version, true) && compareDeep(name, o.name, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(description, o.description, true) - && compareDeep(requirements, o.requirements, true) && compareDeep(copyright, o.copyright, true) - && compareDeep(kind, o.kind, true) && compareDeep(software, o.software, true) && compareDeep(implementation, o.implementation, true) - && compareDeep(fhirVersion, o.fhirVersion, true) && compareDeep(acceptUnknown, o.acceptUnknown, true) - && compareDeep(format, o.format, true) && compareDeep(profile, o.profile, true) && compareDeep(rest, o.rest, true) - && compareDeep(messaging, o.messaging, true) && compareDeep(document, o.document, true); + && compareDeep(useContext, o.useContext, true) && compareDeep(requirements, o.requirements, true) + && compareDeep(copyright, o.copyright, true) && compareDeep(kind, o.kind, true) && compareDeep(software, o.software, true) + && compareDeep(implementation, o.implementation, true) && compareDeep(fhirVersion, o.fhirVersion, true) + && compareDeep(acceptUnknown, o.acceptUnknown, true) && compareDeep(format, o.format, true) && compareDeep(profile, o.profile, true) + && compareDeep(rest, o.rest, true) && compareDeep(messaging, o.messaging, true) && compareDeep(document, o.document, true) + ; } @Override @@ -7762,15 +7779,10 @@ public class Conformance extends DomainResource implements IBaseConformance { } public boolean isEmpty() { - return super.isEmpty() && (url == null || url.isEmpty()) && (version == null || version.isEmpty()) - && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty()) - && (date == null || date.isEmpty()) && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) - && (description == null || description.isEmpty()) && (requirements == null || requirements.isEmpty()) - && (copyright == null || copyright.isEmpty()) && (kind == null || kind.isEmpty()) && (software == null || software.isEmpty()) - && (implementation == null || implementation.isEmpty()) && (fhirVersion == null || fhirVersion.isEmpty()) - && (acceptUnknown == null || acceptUnknown.isEmpty()) && (format == null || format.isEmpty()) - && (profile == null || profile.isEmpty()) && (rest == null || rest.isEmpty()) && (messaging == null || messaging.isEmpty()) - && (document == null || document.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, version, name, status, experimental + , date, publisher, contact, description, useContext, requirements, copyright, kind, software + , implementation, fhirVersion, acceptUnknown, format, profile, rest, messaging, document + ); } @Override @@ -8050,6 +8062,26 @@ public class Conformance extends DomainResource implements IBaseConformance { */ public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); + /** + * Search parameter: context + *

+ * Description: A use context assigned to the conformance statement
+ * Type: token
+ * Path: Conformance.useContext
+ *

+ */ + @SearchParamDefinition(name="context", path="Conformance.useContext", description="A use context assigned to the conformance statement", type="token" ) + public static final String SP_CONTEXT = "context"; + /** + * Fluent Client search parameter constant for context + *

+ * Description: A use context assigned to the conformance statement
+ * Type: token
+ * Path: Conformance.useContext
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT); + /** * Search parameter: publisher *

diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Constants.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Constants.java index ff413b275d1..f8540ba3a0b 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Constants.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Constants.java @@ -29,12 +29,12 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 public class Constants { - public final static String VERSION = "1.3.0"; - public final static String REVISION = "7597"; - public final static String DATE = "Sat Jan 30 09:18:49 EST 2016"; + public final static String VERSION = "1.4.0"; + public final static String REVISION = "8139"; + public final static String DATE = "Fri Apr 01 17:57:29 EDT 2016"; } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ContactPoint.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ContactPoint.java index fc74c2b14c1..e36fe9bdb0b 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ContactPoint.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ContactPoint.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -38,9 +38,8 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc. */ @@ -667,9 +666,8 @@ public class ContactPoint extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (system == null || system.isEmpty()) && (value == null || value.isEmpty()) - && (use == null || use.isEmpty()) && (rank == null || rank.isEmpty()) && (period == null || period.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( system, value, use, rank, period + ); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Contract.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Contract.java index 4364cbf764b..96bd219da29 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Contract.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Contract.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -40,9 +40,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A formal agreement between parties regarding the conduct of business, exchange of information or other matters. */ @@ -50,84 +49,84 @@ import org.hl7.fhir.instance.model.api.*; public class Contract extends DomainResource { @Block() - public static class PartyComponent extends BackboneElement implements IBaseBackboneElement { + public static class AgentComponent extends BackboneElement implements IBaseBackboneElement { /** * Who or what parties are assigned roles in this Contract. */ - @Child(name = "entity", type = {Contract.class, Device.class, Group.class, Location.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, Substance.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Contract Party Type", formalDefinition="Who or what parties are assigned roles in this Contract." ) - protected Reference entity; + @Child(name = "actor", type = {Contract.class, Device.class, Group.class, Location.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, Substance.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Agent Type", formalDefinition="Who or what parties are assigned roles in this Contract." ) + protected Reference actor; /** * The actual object that is the target of the reference (Who or what parties are assigned roles in this Contract.) */ - protected Resource entityTarget; + protected Resource actorTarget; /** - * Role type of party assigned roles in this Contract. + * Role type of agent assigned roles in this Contract. */ @Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Contract Party Role", formalDefinition="Role type of party assigned roles in this Contract." ) + @Description(shortDefinition="Contract Agent Role", formalDefinition="Role type of agent assigned roles in this Contract." ) protected List role; - private static final long serialVersionUID = 1371245689L; + private static final long serialVersionUID = -454551165L; /** * Constructor */ - public PartyComponent() { + public AgentComponent() { super(); } /** * Constructor */ - public PartyComponent(Reference entity) { + public AgentComponent(Reference actor) { super(); - this.entity = entity; + this.actor = actor; } /** - * @return {@link #entity} (Who or what parties are assigned roles in this Contract.) + * @return {@link #actor} (Who or what parties are assigned roles in this Contract.) */ - public Reference getEntity() { - if (this.entity == null) + public Reference getActor() { + if (this.actor == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PartyComponent.entity"); + throw new Error("Attempt to auto-create AgentComponent.actor"); else if (Configuration.doAutoCreate()) - this.entity = new Reference(); // cc - return this.entity; + this.actor = new Reference(); // cc + return this.actor; } - public boolean hasEntity() { - return this.entity != null && !this.entity.isEmpty(); + public boolean hasActor() { + return this.actor != null && !this.actor.isEmpty(); } /** - * @param value {@link #entity} (Who or what parties are assigned roles in this Contract.) + * @param value {@link #actor} (Who or what parties are assigned roles in this Contract.) */ - public PartyComponent setEntity(Reference value) { - this.entity = value; + public AgentComponent setActor(Reference value) { + this.actor = value; return this; } /** - * @return {@link #entity} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who or what parties are assigned roles in this Contract.) + * @return {@link #actor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who or what parties are assigned roles in this Contract.) */ - public Resource getEntityTarget() { - return this.entityTarget; + public Resource getActorTarget() { + return this.actorTarget; } /** - * @param value {@link #entity} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who or what parties are assigned roles in this Contract.) + * @param value {@link #actor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who or what parties are assigned roles in this Contract.) */ - public PartyComponent setEntityTarget(Resource value) { - this.entityTarget = value; + public AgentComponent setActorTarget(Resource value) { + this.actorTarget = value; return this; } /** - * @return {@link #role} (Role type of party assigned roles in this Contract.) + * @return {@link #role} (Role type of agent assigned roles in this Contract.) */ public List getRole() { if (this.role == null) @@ -145,7 +144,7 @@ public class Contract extends DomainResource { } /** - * @return {@link #role} (Role type of party assigned roles in this Contract.) + * @return {@link #role} (Role type of agent assigned roles in this Contract.) */ // syntactic sugar public CodeableConcept addRole() { //3 @@ -157,7 +156,7 @@ public class Contract extends DomainResource { } // syntactic sugar - public PartyComponent addRole(CodeableConcept t) { //3 + public AgentComponent addRole(CodeableConcept t) { //3 if (t == null) return this; if (this.role == null) @@ -168,14 +167,14 @@ public class Contract extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("entity", "Reference(Contract|Device|Group|Location|Organization|Patient|Practitioner|RelatedPerson|Substance)", "Who or what parties are assigned roles in this Contract.", 0, java.lang.Integer.MAX_VALUE, entity)); - childrenList.add(new Property("role", "CodeableConcept", "Role type of party assigned roles in this Contract.", 0, java.lang.Integer.MAX_VALUE, role)); + childrenList.add(new Property("actor", "Reference(Contract|Device|Group|Location|Organization|Patient|Practitioner|RelatedPerson|Substance)", "Who or what parties are assigned roles in this Contract.", 0, java.lang.Integer.MAX_VALUE, actor)); + childrenList.add(new Property("role", "CodeableConcept", "Role type of agent assigned roles in this Contract.", 0, java.lang.Integer.MAX_VALUE, role)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("entity")) - this.entity = castToReference(value); // Reference + if (name.equals("actor")) + this.actor = castToReference(value); // Reference else if (name.equals("role")) this.getRole().add(castToCodeableConcept(value)); else @@ -184,9 +183,9 @@ public class Contract extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("entity")) { - this.entity = new Reference(); - return this.entity; + if (name.equals("actor")) { + this.actor = new Reference(); + return this.actor; } else if (name.equals("role")) { return addRole(); @@ -195,10 +194,10 @@ public class Contract extends DomainResource { return super.addChild(name); } - public PartyComponent copy() { - PartyComponent dst = new PartyComponent(); + public AgentComponent copy() { + AgentComponent dst = new AgentComponent(); copyValues(dst); - dst.entity = entity == null ? null : entity.copy(); + dst.actor = actor == null ? null : actor.copy(); if (role != null) { dst.role = new ArrayList(); for (CodeableConcept i : role) @@ -211,29 +210,258 @@ public class Contract extends DomainResource { public boolean equalsDeep(Base other) { if (!super.equalsDeep(other)) return false; - if (!(other instanceof PartyComponent)) + if (!(other instanceof AgentComponent)) return false; - PartyComponent o = (PartyComponent) other; - return compareDeep(entity, o.entity, true) && compareDeep(role, o.role, true); + AgentComponent o = (AgentComponent) other; + return compareDeep(actor, o.actor, true) && compareDeep(role, o.role, true); } @Override public boolean equalsShallow(Base other) { if (!super.equalsShallow(other)) return false; - if (!(other instanceof PartyComponent)) + if (!(other instanceof AgentComponent)) return false; - PartyComponent o = (PartyComponent) other; + AgentComponent o = (AgentComponent) other; return true; } public boolean isEmpty() { - return super.isEmpty() && (entity == null || entity.isEmpty()) && (role == null || role.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( actor, role); } public String fhirType() { - return "Contract.party"; + return "Contract.agent"; + + } + + } + + @Block() + public static class SignatoryComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Role of this Contract signer, e.g. notary, grantee. + */ + @Child(name = "type", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Signer Type", formalDefinition="Role of this Contract signer, e.g. notary, grantee." ) + protected Coding type; + + /** + * Party which is a signator to this Contract. + */ + @Child(name = "party", type = {Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Signatory Party", formalDefinition="Party which is a signator to this Contract." ) + protected Reference party; + + /** + * The actual object that is the target of the reference (Party which is a signator to this Contract.) + */ + protected Resource partyTarget; + + /** + * Legally binding Contract DSIG signature contents in Base64. + */ + @Child(name = "signature", type = {Signature.class}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Documentation Signature", formalDefinition="Legally binding Contract DSIG signature contents in Base64." ) + protected List signature; + + private static final long serialVersionUID = 1948139228L; + + /** + * Constructor + */ + public SignatoryComponent() { + super(); + } + + /** + * Constructor + */ + public SignatoryComponent(Coding type, Reference party) { + super(); + this.type = type; + this.party = party; + } + + /** + * @return {@link #type} (Role of this Contract signer, e.g. notary, grantee.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SignatoryComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Role of this Contract signer, e.g. notary, grantee.) + */ + public SignatoryComponent setType(Coding value) { + this.type = value; + return this; + } + + /** + * @return {@link #party} (Party which is a signator to this Contract.) + */ + public Reference getParty() { + if (this.party == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SignatoryComponent.party"); + else if (Configuration.doAutoCreate()) + this.party = new Reference(); // cc + return this.party; + } + + public boolean hasParty() { + return this.party != null && !this.party.isEmpty(); + } + + /** + * @param value {@link #party} (Party which is a signator to this Contract.) + */ + public SignatoryComponent setParty(Reference value) { + this.party = value; + return this; + } + + /** + * @return {@link #party} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Party which is a signator to this Contract.) + */ + public Resource getPartyTarget() { + return this.partyTarget; + } + + /** + * @param value {@link #party} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Party which is a signator to this Contract.) + */ + public SignatoryComponent setPartyTarget(Resource value) { + this.partyTarget = value; + return this; + } + + /** + * @return {@link #signature} (Legally binding Contract DSIG signature contents in Base64.) + */ + public List getSignature() { + if (this.signature == null) + this.signature = new ArrayList(); + return this.signature; + } + + public boolean hasSignature() { + if (this.signature == null) + return false; + for (Signature item : this.signature) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #signature} (Legally binding Contract DSIG signature contents in Base64.) + */ + // syntactic sugar + public Signature addSignature() { //3 + Signature t = new Signature(); + if (this.signature == null) + this.signature = new ArrayList(); + this.signature.add(t); + return t; + } + + // syntactic sugar + public SignatoryComponent addSignature(Signature t) { //3 + if (t == null) + return this; + if (this.signature == null) + this.signature = new ArrayList(); + this.signature.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "Coding", "Role of this Contract signer, e.g. notary, grantee.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("party", "Reference(Organization|Patient|Practitioner|RelatedPerson)", "Party which is a signator to this Contract.", 0, java.lang.Integer.MAX_VALUE, party)); + childrenList.add(new Property("signature", "Signature", "Legally binding Contract DSIG signature contents in Base64.", 0, java.lang.Integer.MAX_VALUE, signature)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCoding(value); // Coding + else if (name.equals("party")) + this.party = castToReference(value); // Reference + else if (name.equals("signature")) + this.getSignature().add(castToSignature(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else if (name.equals("party")) { + this.party = new Reference(); + return this.party; + } + else if (name.equals("signature")) { + return addSignature(); + } + else + return super.addChild(name); + } + + public SignatoryComponent copy() { + SignatoryComponent dst = new SignatoryComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.party = party == null ? null : party.copy(); + if (signature != null) { + dst.signature = new ArrayList(); + for (Signature i : signature) + dst.signature.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SignatoryComponent)) + return false; + SignatoryComponent o = (SignatoryComponent) other; + return compareDeep(type, o.type, true) && compareDeep(party, o.party, true) && compareDeep(signature, o.signature, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SignatoryComponent)) + return false; + SignatoryComponent o = (SignatoryComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, party, signature); + } + + public String fhirType() { + return "Contract.signer"; } @@ -741,10 +969,8 @@ public class Contract extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (entity == null || entity.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (effectiveTime == null || effectiveTime.isEmpty()) && (quantity == null || quantity.isEmpty()) - && (unitPrice == null || unitPrice.isEmpty()) && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) - && (net == null || net.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( entity, identifier, effectiveTime + , quantity, unitPrice, factor, points, net); } public String fhirType() { @@ -752,239 +978,6 @@ public class Contract extends DomainResource { } - } - - @Block() - public static class SignatoryComponent extends BackboneElement implements IBaseBackboneElement { - /** - * Role of this Contract signer, e.g. notary, grantee. - */ - @Child(name = "type", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Contract Signer Type", formalDefinition="Role of this Contract signer, e.g. notary, grantee." ) - protected Coding type; - - /** - * Party which is a signator to this Contract. - */ - @Child(name = "party", type = {Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=2, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Contract Signatory Party", formalDefinition="Party which is a signator to this Contract." ) - protected Reference party; - - /** - * The actual object that is the target of the reference (Party which is a signator to this Contract.) - */ - protected Resource partyTarget; - - /** - * Legally binding Contract DSIG signature contents in Base64. - */ - @Child(name = "signature", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Contract Documentation Signature", formalDefinition="Legally binding Contract DSIG signature contents in Base64." ) - protected StringType signature; - - private static final long serialVersionUID = -1870392043L; - - /** - * Constructor - */ - public SignatoryComponent() { - super(); - } - - /** - * Constructor - */ - public SignatoryComponent(Coding type, Reference party, StringType signature) { - super(); - this.type = type; - this.party = party; - this.signature = signature; - } - - /** - * @return {@link #type} (Role of this Contract signer, e.g. notary, grantee.) - */ - public Coding getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SignatoryComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Coding(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (Role of this Contract signer, e.g. notary, grantee.) - */ - public SignatoryComponent setType(Coding value) { - this.type = value; - return this; - } - - /** - * @return {@link #party} (Party which is a signator to this Contract.) - */ - public Reference getParty() { - if (this.party == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SignatoryComponent.party"); - else if (Configuration.doAutoCreate()) - this.party = new Reference(); // cc - return this.party; - } - - public boolean hasParty() { - return this.party != null && !this.party.isEmpty(); - } - - /** - * @param value {@link #party} (Party which is a signator to this Contract.) - */ - public SignatoryComponent setParty(Reference value) { - this.party = value; - return this; - } - - /** - * @return {@link #party} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Party which is a signator to this Contract.) - */ - public Resource getPartyTarget() { - return this.partyTarget; - } - - /** - * @param value {@link #party} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Party which is a signator to this Contract.) - */ - public SignatoryComponent setPartyTarget(Resource value) { - this.partyTarget = value; - return this; - } - - /** - * @return {@link #signature} (Legally binding Contract DSIG signature contents in Base64.). This is the underlying object with id, value and extensions. The accessor "getSignature" gives direct access to the value - */ - public StringType getSignatureElement() { - if (this.signature == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SignatoryComponent.signature"); - else if (Configuration.doAutoCreate()) - this.signature = new StringType(); // bb - return this.signature; - } - - public boolean hasSignatureElement() { - return this.signature != null && !this.signature.isEmpty(); - } - - public boolean hasSignature() { - return this.signature != null && !this.signature.isEmpty(); - } - - /** - * @param value {@link #signature} (Legally binding Contract DSIG signature contents in Base64.). This is the underlying object with id, value and extensions. The accessor "getSignature" gives direct access to the value - */ - public SignatoryComponent setSignatureElement(StringType value) { - this.signature = value; - return this; - } - - /** - * @return Legally binding Contract DSIG signature contents in Base64. - */ - public String getSignature() { - return this.signature == null ? null : this.signature.getValue(); - } - - /** - * @param value Legally binding Contract DSIG signature contents in Base64. - */ - public SignatoryComponent setSignature(String value) { - if (this.signature == null) - this.signature = new StringType(); - this.signature.setValue(value); - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("type", "Coding", "Role of this Contract signer, e.g. notary, grantee.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("party", "Reference(Organization|Patient|Practitioner|RelatedPerson)", "Party which is a signator to this Contract.", 0, java.lang.Integer.MAX_VALUE, party)); - childrenList.add(new Property("signature", "string", "Legally binding Contract DSIG signature contents in Base64.", 0, java.lang.Integer.MAX_VALUE, signature)); - } - - @Override - public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("type")) - this.type = castToCoding(value); // Coding - else if (name.equals("party")) - this.party = castToReference(value); // Reference - else if (name.equals("signature")) - this.signature = castToString(value); // StringType - else - super.setProperty(name, value); - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("type")) { - this.type = new Coding(); - return this.type; - } - else if (name.equals("party")) { - this.party = new Reference(); - return this.party; - } - else if (name.equals("signature")) { - throw new FHIRException("Cannot call addChild on a primitive type Contract.signature"); - } - else - return super.addChild(name); - } - - public SignatoryComponent copy() { - SignatoryComponent dst = new SignatoryComponent(); - copyValues(dst); - dst.type = type == null ? null : type.copy(); - dst.party = party == null ? null : party.copy(); - dst.signature = signature == null ? null : signature.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof SignatoryComponent)) - return false; - SignatoryComponent o = (SignatoryComponent) other; - return compareDeep(type, o.type, true) && compareDeep(party, o.party, true) && compareDeep(signature, o.signature, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof SignatoryComponent)) - return false; - SignatoryComponent o = (SignatoryComponent) other; - return compareValues(signature, o.signature, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (party == null || party.isEmpty()) - && (signature == null || signature.isEmpty()); - } - - public String fhirType() { - return "Contract.signer"; - - } - } @Block() @@ -1025,72 +1018,60 @@ public class Contract extends DomainResource { protected CodeableConcept subType; /** - * The matter under consideration about which this Contract forms an agreement under which the disposition of this matter is governed in accordance to the Contract.terms, such as privileges and delegation of privileges, rights in property such as real estate, intellectual property or a patient’s information, a relationship or partnership, or valued items such as goods and services. + * The matter of concern in the context of this provision of the agrement. */ - @Child(name = "topic", type = {}, order=6, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Topic of this Contract Term", formalDefinition="The matter under consideration about which this Contract forms an agreement under which the disposition of this matter is governed in accordance to the Contract.terms, such as privileges and delegation of privileges, rights in property such as real estate, intellectual property or a patient’s information, a relationship or partnership, or valued items such as goods and services." ) - protected Reference topic; - + @Child(name = "topic", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Context of the Contract term", formalDefinition="The matter of concern in the context of this provision of the agrement." ) + protected List topic; /** - * The actual object that is the target of the reference (The matter under consideration about which this Contract forms an agreement under which the disposition of this matter is governed in accordance to the Contract.terms, such as privileges and delegation of privileges, rights in property such as real estate, intellectual property or a patient’s information, a relationship or partnership, or valued items such as goods and services.) + * The actual objects that are the target of the reference (The matter of concern in the context of this provision of the agrement.) */ - protected Resource topicTarget; + protected List topicTarget; - /** - * Who or what this Contract Provision is about. - */ - @Child(name = "subject", type = {}, order=7, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Subject of this Contract Term", formalDefinition="Who or what this Contract Provision is about." ) - protected Reference subject; - - /** - * The actual object that is the target of the reference (Who or what this Contract Provision is about.) - */ - protected Resource subjectTarget; /** * Action stipulated by this Contract Provision. */ - @Child(name = "action", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "action", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Contract Term Action", formalDefinition="Action stipulated by this Contract Provision." ) protected List action; /** * Reason or purpose for the action stipulated by this Contract Provision. */ - @Child(name = "actionReason", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "actionReason", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Contract Term Action Reason", formalDefinition="Reason or purpose for the action stipulated by this Contract Provision." ) protected List actionReason; /** - * Parties to the Contract, specifically, the grantor(s) and grantee(s) such as a person or an organization which is bound by the contract to the actions specified on the Contract.topic and the terms of the Contract that either extend or restrict the overall action on the topic by, for example, stipulating specific policies or obligations constraining actions and action reasons permitted or denied on a subset of the Contract topic, actors, subject(s), and extending or limiting the Contract.period of applicability or valuation of items under consideration. + * An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place. */ - @Child(name = "party", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Contract Term Party List", formalDefinition="Parties to the Contract, specifically, the grantor(s) and grantee(s) such as a person or an organization which is bound by the contract to the actions specified on the Contract.topic and the terms of the Contract that either extend or restrict the overall action on the topic by, for example, stipulating specific policies or obligations constraining actions and action reasons permitted or denied on a subset of the Contract topic, actors, subject(s), and extending or limiting the Contract.period of applicability or valuation of items under consideration." ) - protected List party; + @Child(name = "agent", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Term Agent List", formalDefinition="An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place." ) + protected List agent; /** * Human readable form of this Contract Provision. */ - @Child(name = "text", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Child(name = "text", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Human readable Contract term text", formalDefinition="Human readable form of this Contract Provision." ) protected StringType text; /** * Contract Provision Valued Item List. */ - @Child(name = "valuedItem", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "valuedItem", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Contract Term Valued Item", formalDefinition="Contract Provision Valued Item List." ) protected List valuedItem; /** * Nested group of Contract Provisions. */ - @Child(name = "group", type = {TermComponent.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "group", type = {TermComponent.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Nested Contract Term Group", formalDefinition="Nested group of Contract Provisions." ) protected List group; - private static final long serialVersionUID = 1105219555L; + private static final long serialVersionUID = -1949614999L; /** * Constructor @@ -1245,83 +1226,54 @@ public class Contract extends DomainResource { } /** - * @return {@link #topic} (The matter under consideration about which this Contract forms an agreement under which the disposition of this matter is governed in accordance to the Contract.terms, such as privileges and delegation of privileges, rights in property such as real estate, intellectual property or a patient’s information, a relationship or partnership, or valued items such as goods and services.) + * @return {@link #topic} (The matter of concern in the context of this provision of the agrement.) */ - public Reference getTopic() { + public List getTopic() { if (this.topic == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TermComponent.topic"); - else if (Configuration.doAutoCreate()) - this.topic = new Reference(); // cc + this.topic = new ArrayList(); return this.topic; } public boolean hasTopic() { - return this.topic != null && !this.topic.isEmpty(); + if (this.topic == null) + return false; + for (Reference item : this.topic) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #topic} (The matter under consideration about which this Contract forms an agreement under which the disposition of this matter is governed in accordance to the Contract.terms, such as privileges and delegation of privileges, rights in property such as real estate, intellectual property or a patient’s information, a relationship or partnership, or valued items such as goods and services.) + * @return {@link #topic} (The matter of concern in the context of this provision of the agrement.) */ - public TermComponent setTopic(Reference value) { - this.topic = value; + // syntactic sugar + public Reference addTopic() { //3 + Reference t = new Reference(); + if (this.topic == null) + this.topic = new ArrayList(); + this.topic.add(t); + return t; + } + + // syntactic sugar + public TermComponent addTopic(Reference t) { //3 + if (t == null) + return this; + if (this.topic == null) + this.topic = new ArrayList(); + this.topic.add(t); return this; } /** - * @return {@link #topic} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The matter under consideration about which this Contract forms an agreement under which the disposition of this matter is governed in accordance to the Contract.terms, such as privileges and delegation of privileges, rights in property such as real estate, intellectual property or a patient’s information, a relationship or partnership, or valued items such as goods and services.) + * @return {@link #topic} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The matter of concern in the context of this provision of the agrement.) */ - public Resource getTopicTarget() { + public List getTopicTarget() { + if (this.topicTarget == null) + this.topicTarget = new ArrayList(); return this.topicTarget; } - /** - * @param value {@link #topic} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The matter under consideration about which this Contract forms an agreement under which the disposition of this matter is governed in accordance to the Contract.terms, such as privileges and delegation of privileges, rights in property such as real estate, intellectual property or a patient’s information, a relationship or partnership, or valued items such as goods and services.) - */ - public TermComponent setTopicTarget(Resource value) { - this.topicTarget = value; - return this; - } - - /** - * @return {@link #subject} (Who or what this Contract Provision is about.) - */ - public Reference getSubject() { - if (this.subject == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TermComponent.subject"); - else if (Configuration.doAutoCreate()) - this.subject = new Reference(); // cc - return this.subject; - } - - public boolean hasSubject() { - return this.subject != null && !this.subject.isEmpty(); - } - - /** - * @param value {@link #subject} (Who or what this Contract Provision is about.) - */ - public TermComponent setSubject(Reference value) { - this.subject = value; - return this; - } - - /** - * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who or what this Contract Provision is about.) - */ - public Resource getSubjectTarget() { - return this.subjectTarget; - } - - /** - * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who or what this Contract Provision is about.) - */ - public TermComponent setSubjectTarget(Resource value) { - this.subjectTarget = value; - return this; - } - /** * @return {@link #action} (Action stipulated by this Contract Provision.) */ @@ -1403,42 +1355,42 @@ public class Contract extends DomainResource { } /** - * @return {@link #party} (Parties to the Contract, specifically, the grantor(s) and grantee(s) such as a person or an organization which is bound by the contract to the actions specified on the Contract.topic and the terms of the Contract that either extend or restrict the overall action on the topic by, for example, stipulating specific policies or obligations constraining actions and action reasons permitted or denied on a subset of the Contract topic, actors, subject(s), and extending or limiting the Contract.period of applicability or valuation of items under consideration.) + * @return {@link #agent} (An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.) */ - public List getParty() { - if (this.party == null) - this.party = new ArrayList(); - return this.party; + public List getAgent() { + if (this.agent == null) + this.agent = new ArrayList(); + return this.agent; } - public boolean hasParty() { - if (this.party == null) + public boolean hasAgent() { + if (this.agent == null) return false; - for (TermPartyComponent item : this.party) + for (TermAgentComponent item : this.agent) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #party} (Parties to the Contract, specifically, the grantor(s) and grantee(s) such as a person or an organization which is bound by the contract to the actions specified on the Contract.topic and the terms of the Contract that either extend or restrict the overall action on the topic by, for example, stipulating specific policies or obligations constraining actions and action reasons permitted or denied on a subset of the Contract topic, actors, subject(s), and extending or limiting the Contract.period of applicability or valuation of items under consideration.) + * @return {@link #agent} (An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.) */ // syntactic sugar - public TermPartyComponent addParty() { //3 - TermPartyComponent t = new TermPartyComponent(); - if (this.party == null) - this.party = new ArrayList(); - this.party.add(t); + public TermAgentComponent addAgent() { //3 + TermAgentComponent t = new TermAgentComponent(); + if (this.agent == null) + this.agent = new ArrayList(); + this.agent.add(t); return t; } // syntactic sugar - public TermComponent addParty(TermPartyComponent t) { //3 + public TermComponent addAgent(TermAgentComponent t) { //3 if (t == null) return this; - if (this.party == null) - this.party = new ArrayList(); - this.party.add(t); + if (this.agent == null) + this.agent = new ArrayList(); + this.agent.add(t); return this; } @@ -1578,11 +1530,10 @@ public class Contract extends DomainResource { childrenList.add(new Property("applies", "Period", "Relevant time or time-period when this Contract Provision is applicable.", 0, java.lang.Integer.MAX_VALUE, applies)); childrenList.add(new Property("type", "CodeableConcept", "Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("subType", "CodeableConcept", "Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.", 0, java.lang.Integer.MAX_VALUE, subType)); - childrenList.add(new Property("topic", "Reference(Any)", "The matter under consideration about which this Contract forms an agreement under which the disposition of this matter is governed in accordance to the Contract.terms, such as privileges and delegation of privileges, rights in property such as real estate, intellectual property or a patient’s information, a relationship or partnership, or valued items such as goods and services.", 0, java.lang.Integer.MAX_VALUE, topic)); - childrenList.add(new Property("subject", "Reference(Any)", "Who or what this Contract Provision is about.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("topic", "Reference(Any)", "The matter of concern in the context of this provision of the agrement.", 0, java.lang.Integer.MAX_VALUE, topic)); childrenList.add(new Property("action", "CodeableConcept", "Action stipulated by this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, action)); childrenList.add(new Property("actionReason", "CodeableConcept", "Reason or purpose for the action stipulated by this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, actionReason)); - childrenList.add(new Property("party", "", "Parties to the Contract, specifically, the grantor(s) and grantee(s) such as a person or an organization which is bound by the contract to the actions specified on the Contract.topic and the terms of the Contract that either extend or restrict the overall action on the topic by, for example, stipulating specific policies or obligations constraining actions and action reasons permitted or denied on a subset of the Contract topic, actors, subject(s), and extending or limiting the Contract.period of applicability or valuation of items under consideration.", 0, java.lang.Integer.MAX_VALUE, party)); + childrenList.add(new Property("agent", "", "An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.", 0, java.lang.Integer.MAX_VALUE, agent)); childrenList.add(new Property("text", "string", "Human readable form of this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, text)); childrenList.add(new Property("valuedItem", "", "Contract Provision Valued Item List.", 0, java.lang.Integer.MAX_VALUE, valuedItem)); childrenList.add(new Property("group", "@Contract.term", "Nested group of Contract Provisions.", 0, java.lang.Integer.MAX_VALUE, group)); @@ -1601,15 +1552,13 @@ public class Contract extends DomainResource { else if (name.equals("subType")) this.subType = castToCodeableConcept(value); // CodeableConcept else if (name.equals("topic")) - this.topic = castToReference(value); // Reference - else if (name.equals("subject")) - this.subject = castToReference(value); // Reference + this.getTopic().add(castToReference(value)); else if (name.equals("action")) this.getAction().add(castToCodeableConcept(value)); else if (name.equals("actionReason")) this.getActionReason().add(castToCodeableConcept(value)); - else if (name.equals("party")) - this.getParty().add((TermPartyComponent) value); + else if (name.equals("agent")) + this.getAgent().add((TermAgentComponent) value); else if (name.equals("text")) this.text = castToString(value); // StringType else if (name.equals("valuedItem")) @@ -1642,12 +1591,7 @@ public class Contract extends DomainResource { return this.subType; } else if (name.equals("topic")) { - this.topic = new Reference(); - return this.topic; - } - else if (name.equals("subject")) { - this.subject = new Reference(); - return this.subject; + return addTopic(); } else if (name.equals("action")) { return addAction(); @@ -1655,8 +1599,8 @@ public class Contract extends DomainResource { else if (name.equals("actionReason")) { return addActionReason(); } - else if (name.equals("party")) { - return addParty(); + else if (name.equals("agent")) { + return addAgent(); } else if (name.equals("text")) { throw new FHIRException("Cannot call addChild on a primitive type Contract.text"); @@ -1679,8 +1623,11 @@ public class Contract extends DomainResource { dst.applies = applies == null ? null : applies.copy(); dst.type = type == null ? null : type.copy(); dst.subType = subType == null ? null : subType.copy(); - dst.topic = topic == null ? null : topic.copy(); - dst.subject = subject == null ? null : subject.copy(); + if (topic != null) { + dst.topic = new ArrayList(); + for (Reference i : topic) + dst.topic.add(i.copy()); + }; if (action != null) { dst.action = new ArrayList(); for (CodeableConcept i : action) @@ -1691,10 +1638,10 @@ public class Contract extends DomainResource { for (CodeableConcept i : actionReason) dst.actionReason.add(i.copy()); }; - if (party != null) { - dst.party = new ArrayList(); - for (TermPartyComponent i : party) - dst.party.add(i.copy()); + if (agent != null) { + dst.agent = new ArrayList(); + for (TermAgentComponent i : agent) + dst.agent.add(i.copy()); }; dst.text = text == null ? null : text.copy(); if (valuedItem != null) { @@ -1719,9 +1666,9 @@ public class Contract extends DomainResource { TermComponent o = (TermComponent) other; return compareDeep(identifier, o.identifier, true) && compareDeep(issued, o.issued, true) && compareDeep(applies, o.applies, true) && compareDeep(type, o.type, true) && compareDeep(subType, o.subType, true) && compareDeep(topic, o.topic, true) - && compareDeep(subject, o.subject, true) && compareDeep(action, o.action, true) && compareDeep(actionReason, o.actionReason, true) - && compareDeep(party, o.party, true) && compareDeep(text, o.text, true) && compareDeep(valuedItem, o.valuedItem, true) - && compareDeep(group, o.group, true); + && compareDeep(action, o.action, true) && compareDeep(actionReason, o.actionReason, true) && compareDeep(agent, o.agent, true) + && compareDeep(text, o.text, true) && compareDeep(valuedItem, o.valuedItem, true) && compareDeep(group, o.group, true) + ; } @Override @@ -1735,12 +1682,8 @@ public class Contract extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (issued == null || issued.isEmpty()) - && (applies == null || applies.isEmpty()) && (type == null || type.isEmpty()) && (subType == null || subType.isEmpty()) - && (topic == null || topic.isEmpty()) && (subject == null || subject.isEmpty()) && (action == null || action.isEmpty()) - && (actionReason == null || actionReason.isEmpty()) && (party == null || party.isEmpty()) - && (text == null || text.isEmpty()) && (valuedItem == null || valuedItem.isEmpty()) && (group == null || group.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, issued, applies, type + , subType, topic, action, actionReason, agent, text, valuedItem, group); } public String fhirType() { @@ -1751,84 +1694,84 @@ public class Contract extends DomainResource { } @Block() - public static class TermPartyComponent extends BackboneElement implements IBaseBackboneElement { + public static class TermAgentComponent extends BackboneElement implements IBaseBackboneElement { /** - * The party assigned a role in this Contract Provision. + * The agent assigned a role in this Contract Provision. */ - @Child(name = "entity", type = {Contract.class, Device.class, Group.class, Location.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, Substance.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Contract Term Party List", formalDefinition="The party assigned a role in this Contract Provision." ) - protected Reference entity; + @Child(name = "actor", type = {Contract.class, Device.class, Group.class, Location.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, Substance.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Contract Term Agent List", formalDefinition="The agent assigned a role in this Contract Provision." ) + protected Reference actor; /** - * The actual object that is the target of the reference (The party assigned a role in this Contract Provision.) + * The actual object that is the target of the reference (The agent assigned a role in this Contract Provision.) */ - protected Resource entityTarget; + protected Resource actorTarget; /** - * Role played by the party assigned this role in the execution of this Contract Provision. + * Role played by the agent assigned this role in the execution of this Contract Provision. */ @Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Contract Term Party Role", formalDefinition="Role played by the party assigned this role in the execution of this Contract Provision." ) + @Description(shortDefinition="Contract Term Agent Role", formalDefinition="Role played by the agent assigned this role in the execution of this Contract Provision." ) protected List role; - private static final long serialVersionUID = 1371245689L; + private static final long serialVersionUID = -454551165L; /** * Constructor */ - public TermPartyComponent() { + public TermAgentComponent() { super(); } /** * Constructor */ - public TermPartyComponent(Reference entity) { + public TermAgentComponent(Reference actor) { super(); - this.entity = entity; + this.actor = actor; } /** - * @return {@link #entity} (The party assigned a role in this Contract Provision.) + * @return {@link #actor} (The agent assigned a role in this Contract Provision.) */ - public Reference getEntity() { - if (this.entity == null) + public Reference getActor() { + if (this.actor == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TermPartyComponent.entity"); + throw new Error("Attempt to auto-create TermAgentComponent.actor"); else if (Configuration.doAutoCreate()) - this.entity = new Reference(); // cc - return this.entity; + this.actor = new Reference(); // cc + return this.actor; } - public boolean hasEntity() { - return this.entity != null && !this.entity.isEmpty(); + public boolean hasActor() { + return this.actor != null && !this.actor.isEmpty(); } /** - * @param value {@link #entity} (The party assigned a role in this Contract Provision.) + * @param value {@link #actor} (The agent assigned a role in this Contract Provision.) */ - public TermPartyComponent setEntity(Reference value) { - this.entity = value; + public TermAgentComponent setActor(Reference value) { + this.actor = value; return this; } /** - * @return {@link #entity} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The party assigned a role in this Contract Provision.) + * @return {@link #actor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The agent assigned a role in this Contract Provision.) */ - public Resource getEntityTarget() { - return this.entityTarget; + public Resource getActorTarget() { + return this.actorTarget; } /** - * @param value {@link #entity} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The party assigned a role in this Contract Provision.) + * @param value {@link #actor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The agent assigned a role in this Contract Provision.) */ - public TermPartyComponent setEntityTarget(Resource value) { - this.entityTarget = value; + public TermAgentComponent setActorTarget(Resource value) { + this.actorTarget = value; return this; } /** - * @return {@link #role} (Role played by the party assigned this role in the execution of this Contract Provision.) + * @return {@link #role} (Role played by the agent assigned this role in the execution of this Contract Provision.) */ public List getRole() { if (this.role == null) @@ -1846,7 +1789,7 @@ public class Contract extends DomainResource { } /** - * @return {@link #role} (Role played by the party assigned this role in the execution of this Contract Provision.) + * @return {@link #role} (Role played by the agent assigned this role in the execution of this Contract Provision.) */ // syntactic sugar public CodeableConcept addRole() { //3 @@ -1858,7 +1801,7 @@ public class Contract extends DomainResource { } // syntactic sugar - public TermPartyComponent addRole(CodeableConcept t) { //3 + public TermAgentComponent addRole(CodeableConcept t) { //3 if (t == null) return this; if (this.role == null) @@ -1869,14 +1812,14 @@ public class Contract extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("entity", "Reference(Contract|Device|Group|Location|Organization|Patient|Practitioner|RelatedPerson|Substance)", "The party assigned a role in this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, entity)); - childrenList.add(new Property("role", "CodeableConcept", "Role played by the party assigned this role in the execution of this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, role)); + childrenList.add(new Property("actor", "Reference(Contract|Device|Group|Location|Organization|Patient|Practitioner|RelatedPerson|Substance)", "The agent assigned a role in this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, actor)); + childrenList.add(new Property("role", "CodeableConcept", "Role played by the agent assigned this role in the execution of this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, role)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("entity")) - this.entity = castToReference(value); // Reference + if (name.equals("actor")) + this.actor = castToReference(value); // Reference else if (name.equals("role")) this.getRole().add(castToCodeableConcept(value)); else @@ -1885,9 +1828,9 @@ public class Contract extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("entity")) { - this.entity = new Reference(); - return this.entity; + if (name.equals("actor")) { + this.actor = new Reference(); + return this.actor; } else if (name.equals("role")) { return addRole(); @@ -1896,10 +1839,10 @@ public class Contract extends DomainResource { return super.addChild(name); } - public TermPartyComponent copy() { - TermPartyComponent dst = new TermPartyComponent(); + public TermAgentComponent copy() { + TermAgentComponent dst = new TermAgentComponent(); copyValues(dst); - dst.entity = entity == null ? null : entity.copy(); + dst.actor = actor == null ? null : actor.copy(); if (role != null) { dst.role = new ArrayList(); for (CodeableConcept i : role) @@ -1912,29 +1855,28 @@ public class Contract extends DomainResource { public boolean equalsDeep(Base other) { if (!super.equalsDeep(other)) return false; - if (!(other instanceof TermPartyComponent)) + if (!(other instanceof TermAgentComponent)) return false; - TermPartyComponent o = (TermPartyComponent) other; - return compareDeep(entity, o.entity, true) && compareDeep(role, o.role, true); + TermAgentComponent o = (TermAgentComponent) other; + return compareDeep(actor, o.actor, true) && compareDeep(role, o.role, true); } @Override public boolean equalsShallow(Base other) { if (!super.equalsShallow(other)) return false; - if (!(other instanceof TermPartyComponent)) + if (!(other instanceof TermAgentComponent)) return false; - TermPartyComponent o = (TermPartyComponent) other; + TermAgentComponent o = (TermAgentComponent) other; return true; } public boolean isEmpty() { - return super.isEmpty() && (entity == null || entity.isEmpty()) && (role == null || role.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( actor, role); } public String fhirType() { - return "Contract.term.party"; + return "Contract.term.agent"; } @@ -2442,10 +2384,8 @@ public class Contract extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (entity == null || entity.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (effectiveTime == null || effectiveTime.isEmpty()) && (quantity == null || quantity.isEmpty()) - && (unitPrice == null || unitPrice.isEmpty()) && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) - && (net == null || net.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( entity, identifier, effectiveTime + , quantity, unitPrice, factor, points, net); } public String fhirType() { @@ -2581,7 +2521,7 @@ public class Contract extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (content == null || content.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( content); } public String fhirType() { @@ -2717,7 +2657,7 @@ public class Contract extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (content == null || content.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( content); } public String fhirType() { @@ -2853,7 +2793,7 @@ public class Contract extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (content == null || content.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( content); } public String fhirType() { @@ -2885,21 +2825,33 @@ public class Contract extends DomainResource { protected Period applies; /** - * Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services. + * The target entity impacted by or of interest to parties to the agreement. */ @Child(name = "subject", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Subject of this Contract", formalDefinition="Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services." ) + @Description(shortDefinition="Contract Target Entity", formalDefinition="The target entity impacted by or of interest to parties to the agreement." ) protected List subject; /** - * The actual objects that are the target of the reference (Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.) + * The actual objects that are the target of the reference (The target entity impacted by or of interest to parties to the agreement.) */ protected List subjectTarget; + /** + * The matter of concern in the context of this agreement. + */ + @Child(name = "topic", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Context of the Contract", formalDefinition="The matter of concern in the context of this agreement." ) + protected List topic; + /** + * The actual objects that are the target of the reference (The matter of concern in the context of this agreement.) + */ + protected List topicTarget; + + /** * A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies. */ - @Child(name = "authority", type = {Organization.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "authority", type = {Organization.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Authority under which this Contract has standing", formalDefinition="A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies." ) protected List authority; /** @@ -2911,7 +2863,7 @@ public class Contract extends DomainResource { /** * Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources. */ - @Child(name = "domain", type = {Location.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "domain", type = {Location.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Domain in which this Contract applies", formalDefinition="Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources." ) protected List domain; /** @@ -2923,88 +2875,88 @@ public class Contract extends DomainResource { /** * Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc. */ - @Child(name = "type", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Contract Tyoe", formalDefinition="Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc." ) + @Child(name = "type", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Contract Type", formalDefinition="Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc." ) protected CodeableConcept type; /** * More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent. */ - @Child(name = "subType", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "subType", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Contract Subtype", formalDefinition="More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent." ) protected List subType; /** * Action stipulated by this Contract. */ - @Child(name = "action", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "action", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Contract Action", formalDefinition="Action stipulated by this Contract." ) protected List action; /** * Reason for action stipulated by this Contract. */ - @Child(name = "actionReason", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "actionReason", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Contract Action Reason", formalDefinition="Reason for action stipulated by this Contract." ) protected List actionReason; /** - * List of parties to the Contract. + * An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place. */ - @Child(name = "party", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Contract Party", formalDefinition="List of parties to the Contract." ) - protected List party; + @Child(name = "agent", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Agent", formalDefinition="An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place." ) + protected List agent; + + /** + * Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness. + */ + @Child(name = "signer", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contract Signer", formalDefinition="Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness." ) + protected List signer; /** * Contract Valued Item List. */ - @Child(name = "valuedItem", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "valuedItem", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Contract Valued Item", formalDefinition="Contract Valued Item List." ) protected List valuedItem; - /** - * Party signing this Contract. - */ - @Child(name = "signer", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Contract Signer", formalDefinition="Party signing this Contract." ) - protected List signer; - /** * One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups. */ - @Child(name = "term", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "term", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Contract Term List", formalDefinition="One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups." ) protected List term; /** * Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract. */ - @Child(name = "binding", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireResponse.class}, order=14, min=0, max=1, modifier=false, summary=false) + @Child(name = "binding", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireResponse.class}, order=15, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Binding Contract", formalDefinition="Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the \"source of truth\" and which would be the basis for legal action related to enforcement of this Contract." ) protected Type binding; /** * The "patient friendly language" versionof the Contract in whole or in parts. "Patient friendly language" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement. */ - @Child(name = "friendly", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "friendly", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Contract Friendly Language", formalDefinition="The \"patient friendly language\" versionof the Contract in whole or in parts. \"Patient friendly language\" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement." ) protected List friendly; /** * List of Legal expressions or representations of this Contract. */ - @Child(name = "legal", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "legal", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Contract Legal Language", formalDefinition="List of Legal expressions or representations of this Contract." ) protected List legal; /** * List of Computable Policy Rule Language Representations of this Contract. */ - @Child(name = "rule", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "rule", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Computable Contract Language", formalDefinition="List of Computable Policy Rule Language Representations of this Contract." ) protected List rule; - private static final long serialVersionUID = -2064861271L; + private static final long serialVersionUID = -1116217303L; /** * Constructor @@ -3111,7 +3063,7 @@ public class Contract extends DomainResource { } /** - * @return {@link #subject} (Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.) + * @return {@link #subject} (The target entity impacted by or of interest to parties to the agreement.) */ public List getSubject() { if (this.subject == null) @@ -3129,7 +3081,7 @@ public class Contract extends DomainResource { } /** - * @return {@link #subject} (Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.) + * @return {@link #subject} (The target entity impacted by or of interest to parties to the agreement.) */ // syntactic sugar public Reference addSubject() { //3 @@ -3151,7 +3103,7 @@ public class Contract extends DomainResource { } /** - * @return {@link #subject} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.) + * @return {@link #subject} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The target entity impacted by or of interest to parties to the agreement.) */ public List getSubjectTarget() { if (this.subjectTarget == null) @@ -3159,6 +3111,55 @@ public class Contract extends DomainResource { return this.subjectTarget; } + /** + * @return {@link #topic} (The matter of concern in the context of this agreement.) + */ + public List getTopic() { + if (this.topic == null) + this.topic = new ArrayList(); + return this.topic; + } + + public boolean hasTopic() { + if (this.topic == null) + return false; + for (Reference item : this.topic) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #topic} (The matter of concern in the context of this agreement.) + */ + // syntactic sugar + public Reference addTopic() { //3 + Reference t = new Reference(); + if (this.topic == null) + this.topic = new ArrayList(); + this.topic.add(t); + return t; + } + + // syntactic sugar + public Contract addTopic(Reference t) { //3 + if (t == null) + return this; + if (this.topic == null) + this.topic = new ArrayList(); + this.topic.add(t); + return this; + } + + /** + * @return {@link #topic} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The matter of concern in the context of this agreement.) + */ + public List getTopicTarget() { + if (this.topicTarget == null) + this.topicTarget = new ArrayList(); + return this.topicTarget; + } + /** * @return {@link #authority} (A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.) */ @@ -3426,42 +3427,82 @@ public class Contract extends DomainResource { } /** - * @return {@link #party} (List of parties to the Contract.) + * @return {@link #agent} (An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.) */ - public List getParty() { - if (this.party == null) - this.party = new ArrayList(); - return this.party; + public List getAgent() { + if (this.agent == null) + this.agent = new ArrayList(); + return this.agent; } - public boolean hasParty() { - if (this.party == null) + public boolean hasAgent() { + if (this.agent == null) return false; - for (PartyComponent item : this.party) + for (AgentComponent item : this.agent) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #party} (List of parties to the Contract.) + * @return {@link #agent} (An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.) */ // syntactic sugar - public PartyComponent addParty() { //3 - PartyComponent t = new PartyComponent(); - if (this.party == null) - this.party = new ArrayList(); - this.party.add(t); + public AgentComponent addAgent() { //3 + AgentComponent t = new AgentComponent(); + if (this.agent == null) + this.agent = new ArrayList(); + this.agent.add(t); return t; } // syntactic sugar - public Contract addParty(PartyComponent t) { //3 + public Contract addAgent(AgentComponent t) { //3 if (t == null) return this; - if (this.party == null) - this.party = new ArrayList(); - this.party.add(t); + if (this.agent == null) + this.agent = new ArrayList(); + this.agent.add(t); + return this; + } + + /** + * @return {@link #signer} (Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.) + */ + public List getSigner() { + if (this.signer == null) + this.signer = new ArrayList(); + return this.signer; + } + + public boolean hasSigner() { + if (this.signer == null) + return false; + for (SignatoryComponent item : this.signer) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #signer} (Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.) + */ + // syntactic sugar + public SignatoryComponent addSigner() { //3 + SignatoryComponent t = new SignatoryComponent(); + if (this.signer == null) + this.signer = new ArrayList(); + this.signer.add(t); + return t; + } + + // syntactic sugar + public Contract addSigner(SignatoryComponent t) { //3 + if (t == null) + return this; + if (this.signer == null) + this.signer = new ArrayList(); + this.signer.add(t); return this; } @@ -3505,46 +3546,6 @@ public class Contract extends DomainResource { return this; } - /** - * @return {@link #signer} (Party signing this Contract.) - */ - public List getSigner() { - if (this.signer == null) - this.signer = new ArrayList(); - return this.signer; - } - - public boolean hasSigner() { - if (this.signer == null) - return false; - for (SignatoryComponent item : this.signer) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #signer} (Party signing this Contract.) - */ - // syntactic sugar - public SignatoryComponent addSigner() { //3 - SignatoryComponent t = new SignatoryComponent(); - if (this.signer == null) - this.signer = new ArrayList(); - this.signer.add(t); - return t; - } - - // syntactic sugar - public Contract addSigner(SignatoryComponent t) { //3 - if (t == null) - return this; - if (this.signer == null) - this.signer = new ArrayList(); - this.signer.add(t); - return this; - } - /** * @return {@link #term} (One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.) */ @@ -3755,16 +3756,17 @@ public class Contract extends DomainResource { childrenList.add(new Property("identifier", "Identifier", "Unique identifier for this Contract.", 0, java.lang.Integer.MAX_VALUE, identifier)); childrenList.add(new Property("issued", "dateTime", "When this Contract was issued.", 0, java.lang.Integer.MAX_VALUE, issued)); childrenList.add(new Property("applies", "Period", "Relevant time or time-period when this Contract is applicable.", 0, java.lang.Integer.MAX_VALUE, applies)); - childrenList.add(new Property("subject", "Reference(Any)", "Who and/or what this Contract is about: typically a Patient, Organization, or valued items such as goods and services.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("subject", "Reference(Any)", "The target entity impacted by or of interest to parties to the agreement.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("topic", "Reference(Any)", "The matter of concern in the context of this agreement.", 0, java.lang.Integer.MAX_VALUE, topic)); childrenList.add(new Property("authority", "Reference(Organization)", "A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.", 0, java.lang.Integer.MAX_VALUE, authority)); childrenList.add(new Property("domain", "Reference(Location)", "Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.", 0, java.lang.Integer.MAX_VALUE, domain)); childrenList.add(new Property("type", "CodeableConcept", "Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("subType", "CodeableConcept", "More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent.", 0, java.lang.Integer.MAX_VALUE, subType)); childrenList.add(new Property("action", "CodeableConcept", "Action stipulated by this Contract.", 0, java.lang.Integer.MAX_VALUE, action)); childrenList.add(new Property("actionReason", "CodeableConcept", "Reason for action stipulated by this Contract.", 0, java.lang.Integer.MAX_VALUE, actionReason)); - childrenList.add(new Property("party", "", "List of parties to the Contract.", 0, java.lang.Integer.MAX_VALUE, party)); + childrenList.add(new Property("agent", "", "An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.", 0, java.lang.Integer.MAX_VALUE, agent)); + childrenList.add(new Property("signer", "", "Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.", 0, java.lang.Integer.MAX_VALUE, signer)); childrenList.add(new Property("valuedItem", "", "Contract Valued Item List.", 0, java.lang.Integer.MAX_VALUE, valuedItem)); - childrenList.add(new Property("signer", "", "Party signing this Contract.", 0, java.lang.Integer.MAX_VALUE, signer)); childrenList.add(new Property("term", "", "One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.", 0, java.lang.Integer.MAX_VALUE, term)); childrenList.add(new Property("binding[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the \"source of truth\" and which would be the basis for legal action related to enforcement of this Contract.", 0, java.lang.Integer.MAX_VALUE, binding)); childrenList.add(new Property("friendly", "", "The \"patient friendly language\" versionof the Contract in whole or in parts. \"Patient friendly language\" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", 0, java.lang.Integer.MAX_VALUE, friendly)); @@ -3782,6 +3784,8 @@ public class Contract extends DomainResource { this.applies = castToPeriod(value); // Period else if (name.equals("subject")) this.getSubject().add(castToReference(value)); + else if (name.equals("topic")) + this.getTopic().add(castToReference(value)); else if (name.equals("authority")) this.getAuthority().add(castToReference(value)); else if (name.equals("domain")) @@ -3794,12 +3798,12 @@ public class Contract extends DomainResource { this.getAction().add(castToCodeableConcept(value)); else if (name.equals("actionReason")) this.getActionReason().add(castToCodeableConcept(value)); - else if (name.equals("party")) - this.getParty().add((PartyComponent) value); - else if (name.equals("valuedItem")) - this.getValuedItem().add((ValuedItemComponent) value); + else if (name.equals("agent")) + this.getAgent().add((AgentComponent) value); else if (name.equals("signer")) this.getSigner().add((SignatoryComponent) value); + else if (name.equals("valuedItem")) + this.getValuedItem().add((ValuedItemComponent) value); else if (name.equals("term")) this.getTerm().add((TermComponent) value); else if (name.equals("binding[x]")) @@ -3830,6 +3834,9 @@ public class Contract extends DomainResource { else if (name.equals("subject")) { return addSubject(); } + else if (name.equals("topic")) { + return addTopic(); + } else if (name.equals("authority")) { return addAuthority(); } @@ -3849,15 +3856,15 @@ public class Contract extends DomainResource { else if (name.equals("actionReason")) { return addActionReason(); } - else if (name.equals("party")) { - return addParty(); - } - else if (name.equals("valuedItem")) { - return addValuedItem(); + else if (name.equals("agent")) { + return addAgent(); } else if (name.equals("signer")) { return addSigner(); } + else if (name.equals("valuedItem")) { + return addValuedItem(); + } else if (name.equals("term")) { return addTerm(); } @@ -3898,6 +3905,11 @@ public class Contract extends DomainResource { for (Reference i : subject) dst.subject.add(i.copy()); }; + if (topic != null) { + dst.topic = new ArrayList(); + for (Reference i : topic) + dst.topic.add(i.copy()); + }; if (authority != null) { dst.authority = new ArrayList(); for (Reference i : authority) @@ -3924,21 +3936,21 @@ public class Contract extends DomainResource { for (CodeableConcept i : actionReason) dst.actionReason.add(i.copy()); }; - if (party != null) { - dst.party = new ArrayList(); - for (PartyComponent i : party) - dst.party.add(i.copy()); - }; - if (valuedItem != null) { - dst.valuedItem = new ArrayList(); - for (ValuedItemComponent i : valuedItem) - dst.valuedItem.add(i.copy()); + if (agent != null) { + dst.agent = new ArrayList(); + for (AgentComponent i : agent) + dst.agent.add(i.copy()); }; if (signer != null) { dst.signer = new ArrayList(); for (SignatoryComponent i : signer) dst.signer.add(i.copy()); }; + if (valuedItem != null) { + dst.valuedItem = new ArrayList(); + for (ValuedItemComponent i : valuedItem) + dst.valuedItem.add(i.copy()); + }; if (term != null) { dst.term = new ArrayList(); for (TermComponent i : term) @@ -3975,12 +3987,12 @@ public class Contract extends DomainResource { return false; Contract o = (Contract) other; return compareDeep(identifier, o.identifier, true) && compareDeep(issued, o.issued, true) && compareDeep(applies, o.applies, true) - && compareDeep(subject, o.subject, true) && compareDeep(authority, o.authority, true) && compareDeep(domain, o.domain, true) - && compareDeep(type, o.type, true) && compareDeep(subType, o.subType, true) && compareDeep(action, o.action, true) - && compareDeep(actionReason, o.actionReason, true) && compareDeep(party, o.party, true) && compareDeep(valuedItem, o.valuedItem, true) - && compareDeep(signer, o.signer, true) && compareDeep(term, o.term, true) && compareDeep(binding, o.binding, true) - && compareDeep(friendly, o.friendly, true) && compareDeep(legal, o.legal, true) && compareDeep(rule, o.rule, true) - ; + && compareDeep(subject, o.subject, true) && compareDeep(topic, o.topic, true) && compareDeep(authority, o.authority, true) + && compareDeep(domain, o.domain, true) && compareDeep(type, o.type, true) && compareDeep(subType, o.subType, true) + && compareDeep(action, o.action, true) && compareDeep(actionReason, o.actionReason, true) && compareDeep(agent, o.agent, true) + && compareDeep(signer, o.signer, true) && compareDeep(valuedItem, o.valuedItem, true) && compareDeep(term, o.term, true) + && compareDeep(binding, o.binding, true) && compareDeep(friendly, o.friendly, true) && compareDeep(legal, o.legal, true) + && compareDeep(rule, o.rule, true); } @Override @@ -3994,13 +4006,9 @@ public class Contract extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (issued == null || issued.isEmpty()) - && (applies == null || applies.isEmpty()) && (subject == null || subject.isEmpty()) && (authority == null || authority.isEmpty()) - && (domain == null || domain.isEmpty()) && (type == null || type.isEmpty()) && (subType == null || subType.isEmpty()) - && (action == null || action.isEmpty()) && (actionReason == null || actionReason.isEmpty()) - && (party == null || party.isEmpty()) && (valuedItem == null || valuedItem.isEmpty()) && (signer == null || signer.isEmpty()) - && (term == null || term.isEmpty()) && (binding == null || binding.isEmpty()) && (friendly == null || friendly.isEmpty()) - && (legal == null || legal.isEmpty()) && (rule == null || rule.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, issued, applies, subject + , topic, authority, domain, type, subType, action, actionReason, agent, signer, valuedItem + , term, binding, friendly, legal, rule); } @Override @@ -4029,45 +4037,71 @@ public class Contract extends DomainResource { public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); /** - * Search parameter: subject + * Search parameter: agent *

- * Description: The identity of the target of the contract
+ * Description: Agent to the Contact
* Type: reference
- * Path: Contract.subject
+ * Path: Contract.agent.actor
*

*/ - @SearchParamDefinition(name="subject", path="Contract.subject", description="The identity of the target of the contract", type="reference" ) - public static final String SP_SUBJECT = "subject"; + @SearchParamDefinition(name="agent", path="Contract.agent.actor", description="Agent to the Contact", type="reference" ) + public static final String SP_AGENT = "agent"; /** - * Fluent Client search parameter constant for subject + * Fluent Client search parameter constant for agent *

- * Description: The identity of the target of the contract
+ * Description: Agent to the Contact
* Type: reference
- * Path: Contract.subject
+ * Path: Contract.agent.actor
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AGENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AGENT); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Contract:subject". + * the path value of "Contract:agent". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Contract:subject").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_AGENT = new ca.uhn.fhir.model.api.Include("Contract:agent").toLocked(); + + /** + * Search parameter: ttopic + *

+ * Description: The identity of the topic of the contract terms
+ * Type: reference
+ * Path: Contract.term.topic
+ *

+ */ + @SearchParamDefinition(name="ttopic", path="Contract.term.topic", description="The identity of the topic of the contract terms", type="reference" ) + public static final String SP_TTOPIC = "ttopic"; + /** + * Fluent Client search parameter constant for ttopic + *

+ * Description: The identity of the topic of the contract terms
+ * Type: reference
+ * Path: Contract.term.topic
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam TTOPIC = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_TTOPIC); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Contract:ttopic". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_TTOPIC = new ca.uhn.fhir.model.api.Include("Contract:ttopic").toLocked(); /** * Search parameter: patient *

- * Description: The identity of the target of the contract (if a patient)
+ * Description: The identity of the subject of the contract (if a patient)
* Type: reference
* Path: Contract.subject
*

*/ - @SearchParamDefinition(name="patient", path="Contract.subject", description="The identity of the target of the contract (if a patient)", type="reference" ) + @SearchParamDefinition(name="patient", path="Contract.subject", description="The identity of the subject of the contract (if a patient)", type="reference" ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient *

- * Description: The identity of the target of the contract (if a patient)
+ * Description: The identity of the subject of the contract (if a patient)
* Type: reference
* Path: Contract.subject
*

@@ -4081,30 +4115,128 @@ public class Contract extends DomainResource { public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Contract:patient").toLocked(); /** - * Search parameter: party + * Search parameter: subject *

- * Description: Party to the Contact
+ * Description: The identity of the subject of the contract
* Type: reference
- * Path: Contract.party.entity
+ * Path: Contract.subject
*

*/ - @SearchParamDefinition(name="party", path="Contract.party.entity", description="Party to the Contact", type="reference" ) - public static final String SP_PARTY = "party"; + @SearchParamDefinition(name="subject", path="Contract.subject", description="The identity of the subject of the contract", type="reference" ) + public static final String SP_SUBJECT = "subject"; /** - * Fluent Client search parameter constant for party + * Fluent Client search parameter constant for subject *

- * Description: Party to the Contact
+ * Description: The identity of the subject of the contract
* Type: reference
- * Path: Contract.party.entity
+ * Path: Contract.subject
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARTY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARTY); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Contract:party". + * the path value of "Contract:subject". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTY = new ca.uhn.fhir.model.api.Include("Contract:party").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Contract:subject").toLocked(); + + /** + * Search parameter: authority + *

+ * Description: The authority of the contract
+ * Type: reference
+ * Path: Contract.authority
+ *

+ */ + @SearchParamDefinition(name="authority", path="Contract.authority", description="The authority of the contract", type="reference" ) + public static final String SP_AUTHORITY = "authority"; + /** + * Fluent Client search parameter constant for authority + *

+ * Description: The authority of the contract
+ * Type: reference
+ * Path: Contract.authority
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHORITY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AUTHORITY); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Contract:authority". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHORITY = new ca.uhn.fhir.model.api.Include("Contract:authority").toLocked(); + + /** + * Search parameter: domain + *

+ * Description: The domain of the contract
+ * Type: reference
+ * Path: Contract.domain
+ *

+ */ + @SearchParamDefinition(name="domain", path="Contract.domain", description="The domain of the contract", type="reference" ) + public static final String SP_DOMAIN = "domain"; + /** + * Fluent Client search parameter constant for domain + *

+ * Description: The domain of the contract
+ * Type: reference
+ * Path: Contract.domain
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DOMAIN = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DOMAIN); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Contract:domain". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_DOMAIN = new ca.uhn.fhir.model.api.Include("Contract:domain").toLocked(); + + /** + * Search parameter: topic + *

+ * Description: The identity of the topic of the contract
+ * Type: reference
+ * Path: Contract.topic
+ *

+ */ + @SearchParamDefinition(name="topic", path="Contract.topic", description="The identity of the topic of the contract", type="reference" ) + public static final String SP_TOPIC = "topic"; + /** + * Fluent Client search parameter constant for topic + *

+ * Description: The identity of the topic of the contract
+ * Type: reference
+ * Path: Contract.topic
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam TOPIC = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_TOPIC); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Contract:topic". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_TOPIC = new ca.uhn.fhir.model.api.Include("Contract:topic").toLocked(); + + /** + * Search parameter: issued + *

+ * Description: The date/time the contract was issued
+ * Type: date
+ * Path: Contract.issued
+ *

+ */ + @SearchParamDefinition(name="issued", path="Contract.issued", description="The date/time the contract was issued", type="date" ) + public static final String SP_ISSUED = "issued"; + /** + * Fluent Client search parameter constant for issued + *

+ * Description: The date/time the contract was issued
+ * Type: date
+ * Path: Contract.issued
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.DateClientParam ISSUED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_ISSUED); /** * Search parameter: signer diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Count.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Count.java index 98bb6a9ea07..85645a5fa6a 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Count.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Count.java @@ -29,13 +29,12 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. */ @@ -82,9 +81,8 @@ public class Count extends Quantity { } public boolean isEmpty() { - return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty()) - && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value, comparator, unit, system + , code); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Coverage.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Coverage.java index 4de2c65cca0..ac95d783acb 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Coverage.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Coverage.java @@ -29,19 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Financial instrument which may be used to pay for or reimburse health care products and services. */ @@ -51,21 +51,16 @@ public class Coverage extends DomainResource { /** * The program or plan underwriter or payor. */ - @Child(name = "issuer", type = {Organization.class}, order=0, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="An identifier for the plan issuer", formalDefinition="The program or plan underwriter or payor." ) - protected Reference issuer; + @Child(name = "issuer", type = {Identifier.class, Organization.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Identifier for the plan issuer", formalDefinition="The program or plan underwriter or payor." ) + protected Type issuer; /** - * The actual object that is the target of the reference (The program or plan underwriter or payor.) + * Business Identification Number (BIN number) used to identify the routing of eClaims. */ - protected Organization issuerTarget; - - /** - * Business Identification Number (BIN number) used to identify the routing of eclaims if the insurer themselves don't have a BIN number for all of their business. - */ - @Child(name = "bin", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="BIN Number", formalDefinition="Business Identification Number (BIN number) used to identify the routing of eclaims if the insurer themselves don't have a BIN number for all of their business." ) - protected Identifier bin; + @Child(name = "bin", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="BIN Number", formalDefinition="Business Identification Number (BIN number) used to identify the routing of eClaims." ) + protected StringType bin; /** * Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force. @@ -82,77 +77,93 @@ public class Coverage extends DomainResource { protected Coding type; /** - * The id issued to the subscriber. + * The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due. */ - @Child(name = "subscriberId", type = {Identifier.class}, order=4, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Subscriber ID", formalDefinition="The id issued to the subscriber." ) - protected Identifier subscriberId; + @Child(name = "planholder", type = {Identifier.class, Patient.class, Organization.class}, order=4, min=1, max=1, modifier=true, summary=false) + @Description(shortDefinition="Plan holder", formalDefinition="The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due." ) + protected Type planholder; + + /** + * The party who benefits from the insurance coverage. + */ + @Child(name = "beneficiary", type = {Identifier.class, Patient.class}, order=5, min=1, max=1, modifier=true, summary=false) + @Description(shortDefinition="Plan Beneficiary", formalDefinition="The party who benefits from the insurance coverage." ) + protected Type beneficiary; + + /** + * The relationship of the patient to the planholdersubscriber). + */ + @Child(name = "relationship", type = {Coding.class}, order=6, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Patient relationship to planholder", formalDefinition="The relationship of the patient to the planholdersubscriber)." ) + protected Coding relationship; /** * The main (and possibly only) identifier for the coverage - often referred to as a Member Id, Subscriber Id, Certificate number or Personal Health Number or Case ID. */ - @Child(name = "identifier", type = {Identifier.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "identifier", type = {Identifier.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="The primary coverage ID", formalDefinition="The main (and possibly only) identifier for the coverage - often referred to as a Member Id, Subscriber Id, Certificate number or Personal Health Number or Case ID." ) protected List identifier; /** * Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID. */ - @Child(name = "group", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "group", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="An identifier for the group", formalDefinition="Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID." ) protected StringType group; /** * Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID. */ - @Child(name = "plan", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "plan", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="An identifier for the plan", formalDefinition="Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID." ) protected StringType plan; /** * Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID. */ - @Child(name = "subPlan", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "subPlan", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="An identifier for the subsection of the plan", formalDefinition="Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID." ) protected StringType subPlan; /** * A unique identifier for a dependent under the coverage. */ - @Child(name = "dependent", type = {PositiveIntType.class}, order=9, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The dependent number", formalDefinition="A unique identifier for a dependent under the coverage." ) + @Child(name = "dependent", type = {PositiveIntType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Dependent number", formalDefinition="A unique identifier for a dependent under the coverage." ) protected PositiveIntType dependent; /** * An optional counter for a particular instance of the identified coverage which increments upon each renewal. */ - @Child(name = "sequence", type = {PositiveIntType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Child(name = "sequence", type = {PositiveIntType.class}, order=12, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="The plan instance or sequence counter", formalDefinition="An optional counter for a particular instance of the identified coverage which increments upon each renewal." ) protected PositiveIntType sequence; /** - * The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due. + * Factors which may influence the applicability of coverage. */ - @Child(name = "subscriber", type = {Patient.class}, order=11, min=0, max=1, modifier=true, summary=false) - @Description(shortDefinition="Plan holder information", formalDefinition="The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due." ) - protected Reference subscriber; + @Child(name = "exception", type = {Coding.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) + protected List exception; /** - * The actual object that is the target of the reference (The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.) + * Name of school for over-aged dependants. */ - protected Patient subscriberTarget; + @Child(name = "school", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) + protected StringType school; /** * The identifier for a community of providers. */ - @Child(name = "network", type = {Identifier.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Child(name = "network", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Insurer network", formalDefinition="The identifier for a community of providers." ) - protected Identifier network; + protected StringType network; /** * The policy(s) which constitute this insurance coverage. */ - @Child(name = "contract", type = {Contract.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "contract", type = {Contract.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Contract details", formalDefinition="The policy(s) which constitute this insurance coverage." ) protected List contract; /** @@ -161,7 +172,7 @@ public class Coverage extends DomainResource { protected List contractTarget; - private static final long serialVersionUID = -1312031251L; + private static final long serialVersionUID = -1269320450L; /** * Constructor @@ -170,18 +181,50 @@ public class Coverage extends DomainResource { super(); } + /** + * Constructor + */ + public Coverage(Type issuer, Type planholder, Type beneficiary, Coding relationship) { + super(); + this.issuer = issuer; + this.planholder = planholder; + this.beneficiary = beneficiary; + this.relationship = relationship; + } + /** * @return {@link #issuer} (The program or plan underwriter or payor.) */ - public Reference getIssuer() { - if (this.issuer == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Coverage.issuer"); - else if (Configuration.doAutoCreate()) - this.issuer = new Reference(); // cc + public Type getIssuer() { return this.issuer; } + /** + * @return {@link #issuer} (The program or plan underwriter or payor.) + */ + public Identifier getIssuerIdentifier() throws FHIRException { + if (!(this.issuer instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.issuer.getClass().getName()+" was encountered"); + return (Identifier) this.issuer; + } + + public boolean hasIssuerIdentifier() { + return this.issuer instanceof Identifier; + } + + /** + * @return {@link #issuer} (The program or plan underwriter or payor.) + */ + public Reference getIssuerReference() throws FHIRException { + if (!(this.issuer instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.issuer.getClass().getName()+" was encountered"); + return (Reference) this.issuer; + } + + public boolean hasIssuerReference() { + return this.issuer instanceof Reference; + } + public boolean hasIssuer() { return this.issuer != null && !this.issuer.isEmpty(); } @@ -189,55 +232,60 @@ public class Coverage extends DomainResource { /** * @param value {@link #issuer} (The program or plan underwriter or payor.) */ - public Coverage setIssuer(Reference value) { + public Coverage setIssuer(Type value) { this.issuer = value; return this; } /** - * @return {@link #issuer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The program or plan underwriter or payor.) + * @return {@link #bin} (Business Identification Number (BIN number) used to identify the routing of eClaims.). This is the underlying object with id, value and extensions. The accessor "getBin" gives direct access to the value */ - public Organization getIssuerTarget() { - if (this.issuerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Coverage.issuer"); - else if (Configuration.doAutoCreate()) - this.issuerTarget = new Organization(); // aa - return this.issuerTarget; - } - - /** - * @param value {@link #issuer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The program or plan underwriter or payor.) - */ - public Coverage setIssuerTarget(Organization value) { - this.issuerTarget = value; - return this; - } - - /** - * @return {@link #bin} (Business Identification Number (BIN number) used to identify the routing of eclaims if the insurer themselves don't have a BIN number for all of their business.) - */ - public Identifier getBin() { + public StringType getBinElement() { if (this.bin == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Coverage.bin"); else if (Configuration.doAutoCreate()) - this.bin = new Identifier(); // cc + this.bin = new StringType(); // bb return this.bin; } + public boolean hasBinElement() { + return this.bin != null && !this.bin.isEmpty(); + } + public boolean hasBin() { return this.bin != null && !this.bin.isEmpty(); } /** - * @param value {@link #bin} (Business Identification Number (BIN number) used to identify the routing of eclaims if the insurer themselves don't have a BIN number for all of their business.) + * @param value {@link #bin} (Business Identification Number (BIN number) used to identify the routing of eClaims.). This is the underlying object with id, value and extensions. The accessor "getBin" gives direct access to the value */ - public Coverage setBin(Identifier value) { + public Coverage setBinElement(StringType value) { this.bin = value; return this; } + /** + * @return Business Identification Number (BIN number) used to identify the routing of eClaims. + */ + public String getBin() { + return this.bin == null ? null : this.bin.getValue(); + } + + /** + * @param value Business Identification Number (BIN number) used to identify the routing of eClaims. + */ + public Coverage setBin(String value) { + if (Utilities.noString(value)) + this.bin = null; + else { + if (this.bin == null) + this.bin = new StringType(); + this.bin.setValue(value); + } + return this; + } + /** * @return {@link #period} (Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.) */ @@ -287,26 +335,116 @@ public class Coverage extends DomainResource { } /** - * @return {@link #subscriberId} (The id issued to the subscriber.) + * @return {@link #planholder} (The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.) */ - public Identifier getSubscriberId() { - if (this.subscriberId == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Coverage.subscriberId"); - else if (Configuration.doAutoCreate()) - this.subscriberId = new Identifier(); // cc - return this.subscriberId; - } - - public boolean hasSubscriberId() { - return this.subscriberId != null && !this.subscriberId.isEmpty(); + public Type getPlanholder() { + return this.planholder; } /** - * @param value {@link #subscriberId} (The id issued to the subscriber.) + * @return {@link #planholder} (The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.) */ - public Coverage setSubscriberId(Identifier value) { - this.subscriberId = value; + public Identifier getPlanholderIdentifier() throws FHIRException { + if (!(this.planholder instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.planholder.getClass().getName()+" was encountered"); + return (Identifier) this.planholder; + } + + public boolean hasPlanholderIdentifier() { + return this.planholder instanceof Identifier; + } + + /** + * @return {@link #planholder} (The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.) + */ + public Reference getPlanholderReference() throws FHIRException { + if (!(this.planholder instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.planholder.getClass().getName()+" was encountered"); + return (Reference) this.planholder; + } + + public boolean hasPlanholderReference() { + return this.planholder instanceof Reference; + } + + public boolean hasPlanholder() { + return this.planholder != null && !this.planholder.isEmpty(); + } + + /** + * @param value {@link #planholder} (The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.) + */ + public Coverage setPlanholder(Type value) { + this.planholder = value; + return this; + } + + /** + * @return {@link #beneficiary} (The party who benefits from the insurance coverage.) + */ + public Type getBeneficiary() { + return this.beneficiary; + } + + /** + * @return {@link #beneficiary} (The party who benefits from the insurance coverage.) + */ + public Identifier getBeneficiaryIdentifier() throws FHIRException { + if (!(this.beneficiary instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.beneficiary.getClass().getName()+" was encountered"); + return (Identifier) this.beneficiary; + } + + public boolean hasBeneficiaryIdentifier() { + return this.beneficiary instanceof Identifier; + } + + /** + * @return {@link #beneficiary} (The party who benefits from the insurance coverage.) + */ + public Reference getBeneficiaryReference() throws FHIRException { + if (!(this.beneficiary instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.beneficiary.getClass().getName()+" was encountered"); + return (Reference) this.beneficiary; + } + + public boolean hasBeneficiaryReference() { + return this.beneficiary instanceof Reference; + } + + public boolean hasBeneficiary() { + return this.beneficiary != null && !this.beneficiary.isEmpty(); + } + + /** + * @param value {@link #beneficiary} (The party who benefits from the insurance coverage.) + */ + public Coverage setBeneficiary(Type value) { + this.beneficiary = value; + return this; + } + + /** + * @return {@link #relationship} (The relationship of the patient to the planholdersubscriber).) + */ + public Coding getRelationship() { + if (this.relationship == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Coverage.relationship"); + else if (Configuration.doAutoCreate()) + this.relationship = new Coding(); // cc + return this.relationship; + } + + public boolean hasRelationship() { + return this.relationship != null && !this.relationship.isEmpty(); + } + + /** + * @param value {@link #relationship} (The relationship of the patient to the planholdersubscriber).) + */ + public Coverage setRelationship(Coding value) { + this.relationship = value; return this; } @@ -588,73 +726,143 @@ public class Coverage extends DomainResource { } /** - * @return {@link #subscriber} (The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.) + * @return {@link #exception} (Factors which may influence the applicability of coverage.) */ - public Reference getSubscriber() { - if (this.subscriber == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Coverage.subscriber"); - else if (Configuration.doAutoCreate()) - this.subscriber = new Reference(); // cc - return this.subscriber; + public List getException() { + if (this.exception == null) + this.exception = new ArrayList(); + return this.exception; } - public boolean hasSubscriber() { - return this.subscriber != null && !this.subscriber.isEmpty(); + public boolean hasException() { + if (this.exception == null) + return false; + for (Coding item : this.exception) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #subscriber} (The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.) + * @return {@link #exception} (Factors which may influence the applicability of coverage.) */ - public Coverage setSubscriber(Reference value) { - this.subscriber = value; + // syntactic sugar + public Coding addException() { //3 + Coding t = new Coding(); + if (this.exception == null) + this.exception = new ArrayList(); + this.exception.add(t); + return t; + } + + // syntactic sugar + public Coverage addException(Coding t) { //3 + if (t == null) + return this; + if (this.exception == null) + this.exception = new ArrayList(); + this.exception.add(t); return this; } /** - * @return {@link #subscriber} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.) + * @return {@link #school} (Name of school for over-aged dependants.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value */ - public Patient getSubscriberTarget() { - if (this.subscriberTarget == null) + public StringType getSchoolElement() { + if (this.school == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Coverage.subscriber"); + throw new Error("Attempt to auto-create Coverage.school"); else if (Configuration.doAutoCreate()) - this.subscriberTarget = new Patient(); // aa - return this.subscriberTarget; + this.school = new StringType(); // bb + return this.school; + } + + public boolean hasSchoolElement() { + return this.school != null && !this.school.isEmpty(); + } + + public boolean hasSchool() { + return this.school != null && !this.school.isEmpty(); } /** - * @param value {@link #subscriber} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.) + * @param value {@link #school} (Name of school for over-aged dependants.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value */ - public Coverage setSubscriberTarget(Patient value) { - this.subscriberTarget = value; + public Coverage setSchoolElement(StringType value) { + this.school = value; return this; } /** - * @return {@link #network} (The identifier for a community of providers.) + * @return Name of school for over-aged dependants. */ - public Identifier getNetwork() { + public String getSchool() { + return this.school == null ? null : this.school.getValue(); + } + + /** + * @param value Name of school for over-aged dependants. + */ + public Coverage setSchool(String value) { + if (Utilities.noString(value)) + this.school = null; + else { + if (this.school == null) + this.school = new StringType(); + this.school.setValue(value); + } + return this; + } + + /** + * @return {@link #network} (The identifier for a community of providers.). This is the underlying object with id, value and extensions. The accessor "getNetwork" gives direct access to the value + */ + public StringType getNetworkElement() { if (this.network == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Coverage.network"); else if (Configuration.doAutoCreate()) - this.network = new Identifier(); // cc + this.network = new StringType(); // bb return this.network; } + public boolean hasNetworkElement() { + return this.network != null && !this.network.isEmpty(); + } + public boolean hasNetwork() { return this.network != null && !this.network.isEmpty(); } /** - * @param value {@link #network} (The identifier for a community of providers.) + * @param value {@link #network} (The identifier for a community of providers.). This is the underlying object with id, value and extensions. The accessor "getNetwork" gives direct access to the value */ - public Coverage setNetwork(Identifier value) { + public Coverage setNetworkElement(StringType value) { this.network = value; return this; } + /** + * @return The identifier for a community of providers. + */ + public String getNetwork() { + return this.network == null ? null : this.network.getValue(); + } + + /** + * @param value The identifier for a community of providers. + */ + public Coverage setNetwork(String value) { + if (Utilities.noString(value)) + this.network = null; + else { + if (this.network == null) + this.network = new StringType(); + this.network.setValue(value); + } + return this; + } + /** * @return {@link #contract} (The policy(s) which constitute this insurance coverage.) */ @@ -718,34 +926,41 @@ public class Coverage extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("issuer", "Reference(Organization)", "The program or plan underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, issuer)); - childrenList.add(new Property("bin", "Identifier", "Business Identification Number (BIN number) used to identify the routing of eclaims if the insurer themselves don't have a BIN number for all of their business.", 0, java.lang.Integer.MAX_VALUE, bin)); + childrenList.add(new Property("issuer[x]", "Identifier|Reference(Organization)", "The program or plan underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, issuer)); + childrenList.add(new Property("bin", "string", "Business Identification Number (BIN number) used to identify the routing of eClaims.", 0, java.lang.Integer.MAX_VALUE, bin)); childrenList.add(new Property("period", "Period", "Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.", 0, java.lang.Integer.MAX_VALUE, period)); childrenList.add(new Property("type", "Coding", "The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("subscriberId", "Identifier", "The id issued to the subscriber.", 0, java.lang.Integer.MAX_VALUE, subscriberId)); + childrenList.add(new Property("planholder[x]", "Identifier|Reference(Patient|Organization)", "The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.", 0, java.lang.Integer.MAX_VALUE, planholder)); + childrenList.add(new Property("beneficiary[x]", "Identifier|Reference(Patient)", "The party who benefits from the insurance coverage.", 0, java.lang.Integer.MAX_VALUE, beneficiary)); + childrenList.add(new Property("relationship", "Coding", "The relationship of the patient to the planholdersubscriber).", 0, java.lang.Integer.MAX_VALUE, relationship)); childrenList.add(new Property("identifier", "Identifier", "The main (and possibly only) identifier for the coverage - often referred to as a Member Id, Subscriber Id, Certificate number or Personal Health Number or Case ID.", 0, java.lang.Integer.MAX_VALUE, identifier)); childrenList.add(new Property("group", "string", "Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.", 0, java.lang.Integer.MAX_VALUE, group)); childrenList.add(new Property("plan", "string", "Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.", 0, java.lang.Integer.MAX_VALUE, plan)); childrenList.add(new Property("subPlan", "string", "Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID.", 0, java.lang.Integer.MAX_VALUE, subPlan)); childrenList.add(new Property("dependent", "positiveInt", "A unique identifier for a dependent under the coverage.", 0, java.lang.Integer.MAX_VALUE, dependent)); childrenList.add(new Property("sequence", "positiveInt", "An optional counter for a particular instance of the identified coverage which increments upon each renewal.", 0, java.lang.Integer.MAX_VALUE, sequence)); - childrenList.add(new Property("subscriber", "Reference(Patient)", "The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.", 0, java.lang.Integer.MAX_VALUE, subscriber)); - childrenList.add(new Property("network", "Identifier", "The identifier for a community of providers.", 0, java.lang.Integer.MAX_VALUE, network)); + childrenList.add(new Property("exception", "Coding", "Factors which may influence the applicability of coverage.", 0, java.lang.Integer.MAX_VALUE, exception)); + childrenList.add(new Property("school", "string", "Name of school for over-aged dependants.", 0, java.lang.Integer.MAX_VALUE, school)); + childrenList.add(new Property("network", "string", "The identifier for a community of providers.", 0, java.lang.Integer.MAX_VALUE, network)); childrenList.add(new Property("contract", "Reference(Contract)", "The policy(s) which constitute this insurance coverage.", 0, java.lang.Integer.MAX_VALUE, contract)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("issuer")) - this.issuer = castToReference(value); // Reference + if (name.equals("issuer[x]")) + this.issuer = (Type) value; // Type else if (name.equals("bin")) - this.bin = castToIdentifier(value); // Identifier + this.bin = castToString(value); // StringType else if (name.equals("period")) this.period = castToPeriod(value); // Period else if (name.equals("type")) this.type = castToCoding(value); // Coding - else if (name.equals("subscriberId")) - this.subscriberId = castToIdentifier(value); // Identifier + else if (name.equals("planholder[x]")) + this.planholder = (Type) value; // Type + else if (name.equals("beneficiary[x]")) + this.beneficiary = (Type) value; // Type + else if (name.equals("relationship")) + this.relationship = castToCoding(value); // Coding else if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); else if (name.equals("group")) @@ -758,10 +973,12 @@ public class Coverage extends DomainResource { this.dependent = castToPositiveInt(value); // PositiveIntType else if (name.equals("sequence")) this.sequence = castToPositiveInt(value); // PositiveIntType - else if (name.equals("subscriber")) - this.subscriber = castToReference(value); // Reference + else if (name.equals("exception")) + this.getException().add(castToCoding(value)); + else if (name.equals("school")) + this.school = castToString(value); // StringType else if (name.equals("network")) - this.network = castToIdentifier(value); // Identifier + this.network = castToString(value); // StringType else if (name.equals("contract")) this.getContract().add(castToReference(value)); else @@ -770,13 +987,16 @@ public class Coverage extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("issuer")) { + if (name.equals("issuerIdentifier")) { + this.issuer = new Identifier(); + return this.issuer; + } + else if (name.equals("issuerReference")) { this.issuer = new Reference(); return this.issuer; } else if (name.equals("bin")) { - this.bin = new Identifier(); - return this.bin; + throw new FHIRException("Cannot call addChild on a primitive type Coverage.bin"); } else if (name.equals("period")) { this.period = new Period(); @@ -786,9 +1006,25 @@ public class Coverage extends DomainResource { this.type = new Coding(); return this.type; } - else if (name.equals("subscriberId")) { - this.subscriberId = new Identifier(); - return this.subscriberId; + else if (name.equals("planholderIdentifier")) { + this.planholder = new Identifier(); + return this.planholder; + } + else if (name.equals("planholderReference")) { + this.planholder = new Reference(); + return this.planholder; + } + else if (name.equals("beneficiaryIdentifier")) { + this.beneficiary = new Identifier(); + return this.beneficiary; + } + else if (name.equals("beneficiaryReference")) { + this.beneficiary = new Reference(); + return this.beneficiary; + } + else if (name.equals("relationship")) { + this.relationship = new Coding(); + return this.relationship; } else if (name.equals("identifier")) { return addIdentifier(); @@ -808,13 +1044,14 @@ public class Coverage extends DomainResource { else if (name.equals("sequence")) { throw new FHIRException("Cannot call addChild on a primitive type Coverage.sequence"); } - else if (name.equals("subscriber")) { - this.subscriber = new Reference(); - return this.subscriber; + else if (name.equals("exception")) { + return addException(); + } + else if (name.equals("school")) { + throw new FHIRException("Cannot call addChild on a primitive type Coverage.school"); } else if (name.equals("network")) { - this.network = new Identifier(); - return this.network; + throw new FHIRException("Cannot call addChild on a primitive type Coverage.network"); } else if (name.equals("contract")) { return addContract(); @@ -835,7 +1072,9 @@ public class Coverage extends DomainResource { dst.bin = bin == null ? null : bin.copy(); dst.period = period == null ? null : period.copy(); dst.type = type == null ? null : type.copy(); - dst.subscriberId = subscriberId == null ? null : subscriberId.copy(); + dst.planholder = planholder == null ? null : planholder.copy(); + dst.beneficiary = beneficiary == null ? null : beneficiary.copy(); + dst.relationship = relationship == null ? null : relationship.copy(); if (identifier != null) { dst.identifier = new ArrayList(); for (Identifier i : identifier) @@ -846,7 +1085,12 @@ public class Coverage extends DomainResource { dst.subPlan = subPlan == null ? null : subPlan.copy(); dst.dependent = dependent == null ? null : dependent.copy(); dst.sequence = sequence == null ? null : sequence.copy(); - dst.subscriber = subscriber == null ? null : subscriber.copy(); + if (exception != null) { + dst.exception = new ArrayList(); + for (Coding i : exception) + dst.exception.add(i.copy()); + }; + dst.school = school == null ? null : school.copy(); dst.network = network == null ? null : network.copy(); if (contract != null) { dst.contract = new ArrayList(); @@ -868,10 +1112,12 @@ public class Coverage extends DomainResource { return false; Coverage o = (Coverage) other; return compareDeep(issuer, o.issuer, true) && compareDeep(bin, o.bin, true) && compareDeep(period, o.period, true) - && compareDeep(type, o.type, true) && compareDeep(subscriberId, o.subscriberId, true) && compareDeep(identifier, o.identifier, true) + && compareDeep(type, o.type, true) && compareDeep(planholder, o.planholder, true) && compareDeep(beneficiary, o.beneficiary, true) + && compareDeep(relationship, o.relationship, true) && compareDeep(identifier, o.identifier, true) && compareDeep(group, o.group, true) && compareDeep(plan, o.plan, true) && compareDeep(subPlan, o.subPlan, true) - && compareDeep(dependent, o.dependent, true) && compareDeep(sequence, o.sequence, true) && compareDeep(subscriber, o.subscriber, true) - && compareDeep(network, o.network, true) && compareDeep(contract, o.contract, true); + && compareDeep(dependent, o.dependent, true) && compareDeep(sequence, o.sequence, true) && compareDeep(exception, o.exception, true) + && compareDeep(school, o.school, true) && compareDeep(network, o.network, true) && compareDeep(contract, o.contract, true) + ; } @Override @@ -881,17 +1127,15 @@ public class Coverage extends DomainResource { if (!(other instanceof Coverage)) return false; Coverage o = (Coverage) other; - return compareValues(group, o.group, true) && compareValues(plan, o.plan, true) && compareValues(subPlan, o.subPlan, true) - && compareValues(dependent, o.dependent, true) && compareValues(sequence, o.sequence, true); + return compareValues(bin, o.bin, true) && compareValues(group, o.group, true) && compareValues(plan, o.plan, true) + && compareValues(subPlan, o.subPlan, true) && compareValues(dependent, o.dependent, true) && compareValues(sequence, o.sequence, true) + && compareValues(school, o.school, true) && compareValues(network, o.network, true); } public boolean isEmpty() { - return super.isEmpty() && (issuer == null || issuer.isEmpty()) && (bin == null || bin.isEmpty()) - && (period == null || period.isEmpty()) && (type == null || type.isEmpty()) && (subscriberId == null || subscriberId.isEmpty()) - && (identifier == null || identifier.isEmpty()) && (group == null || group.isEmpty()) && (plan == null || plan.isEmpty()) - && (subPlan == null || subPlan.isEmpty()) && (dependent == null || dependent.isEmpty()) && (sequence == null || sequence.isEmpty()) - && (subscriber == null || subscriber.isEmpty()) && (network == null || network.isEmpty()) - && (contract == null || contract.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( issuer, bin, period, type, planholder + , beneficiary, relationship, identifier, group, plan, subPlan, dependent, sequence, exception + , school, network, contract); } @Override @@ -902,17 +1146,17 @@ public class Coverage extends DomainResource { /** * Search parameter: identifier *

- * Description: The primary identifier of the insured
+ * Description: The primary identifier of the insured and the coverage
* Type: token
* Path: Coverage.identifier
*

*/ - @SearchParamDefinition(name="identifier", path="Coverage.identifier", description="The primary identifier of the insured", type="token" ) + @SearchParamDefinition(name="identifier", path="Coverage.identifier", description="The primary identifier of the insured and the coverage", type="token" ) public static final String SP_IDENTIFIER = "identifier"; /** * Fluent Client search parameter constant for identifier *

- * Description: The primary identifier of the insured
+ * Description: The primary identifier of the insured and the coverage
* Type: token
* Path: Coverage.identifier
*

@@ -920,50 +1164,30 @@ public class Coverage extends DomainResource { public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); /** - * Search parameter: sequence + * Search parameter: issuerreference *

- * Description: Sequence number
- * Type: token
- * Path: Coverage.sequence
- *

- */ - @SearchParamDefinition(name="sequence", path="Coverage.sequence", description="Sequence number", type="token" ) - public static final String SP_SEQUENCE = "sequence"; - /** - * Fluent Client search parameter constant for sequence - *

- * Description: Sequence number
- * Type: token
- * Path: Coverage.sequence
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam SEQUENCE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SEQUENCE); - - /** - * Search parameter: subscriber - *

- * Description: Reference to the subscriber
+ * Description: The identity of the insurer
* Type: reference
- * Path: Coverage.subscriber
+ * Path: Coverage.issuerReference
*

*/ - @SearchParamDefinition(name="subscriber", path="Coverage.subscriber", description="Reference to the subscriber", type="reference" ) - public static final String SP_SUBSCRIBER = "subscriber"; + @SearchParamDefinition(name="issuerreference", path="Coverage.issuerReference", description="The identity of the insurer", type="reference" ) + public static final String SP_ISSUERREFERENCE = "issuerreference"; /** - * Fluent Client search parameter constant for subscriber + * Fluent Client search parameter constant for issuerreference *

- * Description: Reference to the subscriber
+ * Description: The identity of the insurer
* Type: reference
- * Path: Coverage.subscriber
+ * Path: Coverage.issuerReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBSCRIBER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBSCRIBER); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ISSUERREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ISSUERREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Coverage:subscriber". + * the path value of "Coverage:issuerreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBSCRIBER = new ca.uhn.fhir.model.api.Include("Coverage:subscriber").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_ISSUERREFERENCE = new ca.uhn.fhir.model.api.Include("Coverage:issuerreference").toLocked(); /** * Search parameter: subplan @@ -988,23 +1212,129 @@ public class Coverage extends DomainResource { /** * Search parameter: type *

- * Description: The kind of coverage
+ * Description: The kind of coverage (health plan, auto, Workers Compensation)
* Type: token
* Path: Coverage.type
*

*/ - @SearchParamDefinition(name="type", path="Coverage.type", description="The kind of coverage", type="token" ) + @SearchParamDefinition(name="type", path="Coverage.type", description="The kind of coverage (health plan, auto, Workers Compensation)", type="token" ) public static final String SP_TYPE = "type"; /** * Fluent Client search parameter constant for type *

- * Description: The kind of coverage
+ * Description: The kind of coverage (health plan, auto, Workers Compensation)
* Type: token
* Path: Coverage.type
*

*/ public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); + /** + * Search parameter: beneficiaryidentifier + *

+ * Description: Covered party
+ * Type: token
+ * Path: Coverage.beneficiaryIdentifier
+ *

+ */ + @SearchParamDefinition(name="beneficiaryidentifier", path="Coverage.beneficiaryIdentifier", description="Covered party", type="token" ) + public static final String SP_BENEFICIARYIDENTIFIER = "beneficiaryidentifier"; + /** + * Fluent Client search parameter constant for beneficiaryidentifier + *

+ * Description: Covered party
+ * Type: token
+ * Path: Coverage.beneficiaryIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam BENEFICIARYIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_BENEFICIARYIDENTIFIER); + + /** + * Search parameter: planholderidentifier + *

+ * Description: Reference to the planholder
+ * Type: token
+ * Path: Coverage.planholderIdentifier
+ *

+ */ + @SearchParamDefinition(name="planholderidentifier", path="Coverage.planholderIdentifier", description="Reference to the planholder", type="token" ) + public static final String SP_PLANHOLDERIDENTIFIER = "planholderidentifier"; + /** + * Fluent Client search parameter constant for planholderidentifier + *

+ * Description: Reference to the planholder
+ * Type: token
+ * Path: Coverage.planholderIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam PLANHOLDERIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PLANHOLDERIDENTIFIER); + + /** + * Search parameter: sequence + *

+ * Description: Sequence number
+ * Type: token
+ * Path: Coverage.sequence
+ *

+ */ + @SearchParamDefinition(name="sequence", path="Coverage.sequence", description="Sequence number", type="token" ) + public static final String SP_SEQUENCE = "sequence"; + /** + * Fluent Client search parameter constant for sequence + *

+ * Description: Sequence number
+ * Type: token
+ * Path: Coverage.sequence
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam SEQUENCE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SEQUENCE); + + /** + * Search parameter: planholderreference + *

+ * Description: Reference to the planholder
+ * Type: reference
+ * Path: Coverage.planholderReference
+ *

+ */ + @SearchParamDefinition(name="planholderreference", path="Coverage.planholderReference", description="Reference to the planholder", type="reference" ) + public static final String SP_PLANHOLDERREFERENCE = "planholderreference"; + /** + * Fluent Client search parameter constant for planholderreference + *

+ * Description: Reference to the planholder
+ * Type: reference
+ * Path: Coverage.planholderReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PLANHOLDERREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PLANHOLDERREFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Coverage:planholderreference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PLANHOLDERREFERENCE = new ca.uhn.fhir.model.api.Include("Coverage:planholderreference").toLocked(); + + /** + * Search parameter: issueridentifier + *

+ * Description: The identity of the insurer
+ * Type: token
+ * Path: Coverage.issuerIdentifier
+ *

+ */ + @SearchParamDefinition(name="issueridentifier", path="Coverage.issuerIdentifier", description="The identity of the insurer", type="token" ) + public static final String SP_ISSUERIDENTIFIER = "issueridentifier"; + /** + * Fluent Client search parameter constant for issueridentifier + *

+ * Description: The identity of the insurer
+ * Type: token
+ * Path: Coverage.issuerIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam ISSUERIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ISSUERIDENTIFIER); + /** * Search parameter: plan *

@@ -1046,30 +1376,30 @@ public class Coverage extends DomainResource { public static final ca.uhn.fhir.rest.gclient.TokenClientParam DEPENDENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DEPENDENT); /** - * Search parameter: issuer + * Search parameter: beneficiaryreference *

- * Description: The identity of the insurer
+ * Description: Covered party
* Type: reference
- * Path: Coverage.issuer
+ * Path: Coverage.beneficiaryReference
*

*/ - @SearchParamDefinition(name="issuer", path="Coverage.issuer", description="The identity of the insurer", type="reference" ) - public static final String SP_ISSUER = "issuer"; + @SearchParamDefinition(name="beneficiaryreference", path="Coverage.beneficiaryReference", description="Covered party", type="reference" ) + public static final String SP_BENEFICIARYREFERENCE = "beneficiaryreference"; /** - * Fluent Client search parameter constant for issuer + * Fluent Client search parameter constant for beneficiaryreference *

- * Description: The identity of the insurer
+ * Description: Covered party
* Type: reference
- * Path: Coverage.issuer
+ * Path: Coverage.beneficiaryReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ISSUER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ISSUER); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BENEFICIARYREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BENEFICIARYREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Coverage:issuer". + * the path value of "Coverage:beneficiaryreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ISSUER = new ca.uhn.fhir.model.api.Include("Coverage:issuer").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_BENEFICIARYREFERENCE = new ca.uhn.fhir.model.api.Include("Coverage:beneficiaryreference").toLocked(); /** * Search parameter: group diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DataElement.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DataElement.java index 7cec4722596..0dfb2c0e670 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DataElement.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DataElement.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * The formal description of a single piece of information that can be gathered and reported. */ @@ -207,7 +205,7 @@ public class DataElement extends DomainResource { * The name of an individual to contact regarding the data element. */ @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the data element." ) + @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the data element." ) protected StringType name; /** @@ -376,8 +374,7 @@ public class DataElement extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); } public String fhirType() { @@ -413,11 +410,11 @@ public class DataElement extends DomainResource { /** * Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. */ - @Child(name = "comments", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Child(name = "comment", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Versions, Issues, Scope limitations etc.", formalDefinition="Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage." ) - protected StringType comments; + protected StringType comment; - private static final long serialVersionUID = 299630820L; + private static final long serialVersionUID = 9610265L; /** * Constructor @@ -578,50 +575,50 @@ public class DataElement extends DomainResource { } /** - * @return {@link #comments} (Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value + * @return {@link #comment} (Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value */ - public StringType getCommentsElement() { - if (this.comments == null) + public StringType getCommentElement() { + if (this.comment == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DataElementMappingComponent.comments"); + throw new Error("Attempt to auto-create DataElementMappingComponent.comment"); else if (Configuration.doAutoCreate()) - this.comments = new StringType(); // bb - return this.comments; + this.comment = new StringType(); // bb + return this.comment; } - public boolean hasCommentsElement() { - return this.comments != null && !this.comments.isEmpty(); + public boolean hasCommentElement() { + return this.comment != null && !this.comment.isEmpty(); } - public boolean hasComments() { - return this.comments != null && !this.comments.isEmpty(); + public boolean hasComment() { + return this.comment != null && !this.comment.isEmpty(); } /** - * @param value {@link #comments} (Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value + * @param value {@link #comment} (Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value */ - public DataElementMappingComponent setCommentsElement(StringType value) { - this.comments = value; + public DataElementMappingComponent setCommentElement(StringType value) { + this.comment = value; return this; } /** * @return Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. */ - public String getComments() { - return this.comments == null ? null : this.comments.getValue(); + public String getComment() { + return this.comment == null ? null : this.comment.getValue(); } /** * @param value Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage. */ - public DataElementMappingComponent setComments(String value) { + public DataElementMappingComponent setComment(String value) { if (Utilities.noString(value)) - this.comments = null; + this.comment = null; else { - if (this.comments == null) - this.comments = new StringType(); - this.comments.setValue(value); + if (this.comment == null) + this.comment = new StringType(); + this.comment.setValue(value); } return this; } @@ -631,7 +628,7 @@ public class DataElement extends DomainResource { childrenList.add(new Property("identity", "id", "An internal id that is used to identify this mapping set when specific mappings are made on a per-element basis.", 0, java.lang.Integer.MAX_VALUE, identity)); childrenList.add(new Property("uri", "uri", "An absolute URI that identifies the specification that this mapping is expressed to.", 0, java.lang.Integer.MAX_VALUE, uri)); childrenList.add(new Property("name", "string", "A name for the specification that is being mapped to.", 0, java.lang.Integer.MAX_VALUE, name)); - childrenList.add(new Property("comments", "string", "Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.", 0, java.lang.Integer.MAX_VALUE, comments)); + childrenList.add(new Property("comment", "string", "Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage.", 0, java.lang.Integer.MAX_VALUE, comment)); } @Override @@ -642,8 +639,8 @@ public class DataElement extends DomainResource { this.uri = castToUri(value); // UriType else if (name.equals("name")) this.name = castToString(value); // StringType - else if (name.equals("comments")) - this.comments = castToString(value); // StringType + else if (name.equals("comment")) + this.comment = castToString(value); // StringType else super.setProperty(name, value); } @@ -659,8 +656,8 @@ public class DataElement extends DomainResource { else if (name.equals("name")) { throw new FHIRException("Cannot call addChild on a primitive type DataElement.name"); } - else if (name.equals("comments")) { - throw new FHIRException("Cannot call addChild on a primitive type DataElement.comments"); + else if (name.equals("comment")) { + throw new FHIRException("Cannot call addChild on a primitive type DataElement.comment"); } else return super.addChild(name); @@ -672,7 +669,7 @@ public class DataElement extends DomainResource { dst.identity = identity == null ? null : identity.copy(); dst.uri = uri == null ? null : uri.copy(); dst.name = name == null ? null : name.copy(); - dst.comments = comments == null ? null : comments.copy(); + dst.comment = comment == null ? null : comment.copy(); return dst; } @@ -684,7 +681,7 @@ public class DataElement extends DomainResource { return false; DataElementMappingComponent o = (DataElementMappingComponent) other; return compareDeep(identity, o.identity, true) && compareDeep(uri, o.uri, true) && compareDeep(name, o.name, true) - && compareDeep(comments, o.comments, true); + && compareDeep(comment, o.comment, true); } @Override @@ -695,12 +692,12 @@ public class DataElement extends DomainResource { return false; DataElementMappingComponent o = (DataElementMappingComponent) other; return compareValues(identity, o.identity, true) && compareValues(uri, o.uri, true) && compareValues(name, o.name, true) - && compareValues(comments, o.comments, true); + && compareValues(comment, o.comment, true); } public boolean isEmpty() { - return super.isEmpty() && (identity == null || identity.isEmpty()) && (uri == null || uri.isEmpty()) - && (name == null || name.isEmpty()) && (comments == null || comments.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identity, uri, name, comment + ); } public String fhirType() { @@ -731,48 +728,48 @@ public class DataElement extends DomainResource { @Description(shortDefinition="Logical id for this version of the data element", formalDefinition="The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually." ) protected StringType version; - /** - * The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used. - */ - @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Descriptive label for this element definition", formalDefinition="The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used." ) - protected StringType name; - /** * The status of the data element. */ - @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true) + @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the data element." ) protected Enumeration status; /** * A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. */ - @Child(name = "experimental", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "experimental", type = {BooleanType.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; /** * The name of the individual or organization that published the data element. */ - @Child(name = "publisher", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "publisher", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the data element." ) protected StringType publisher; - /** - * Contacts to assist a user in finding and communicating with the publisher. - */ - @Child(name = "contact", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) - protected List contact; - /** * The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes. */ - @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "date", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Date for this version of the data element", formalDefinition="The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes." ) protected DateTimeType date; + /** + * The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used. + */ + @Child(name = "name", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Descriptive label for this element definition", formalDefinition="The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used." ) + protected StringType name; + + /** + * Contacts to assist a user in finding and communicating with the publisher. + */ + @Child(name = "contact", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; + /** * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions. */ @@ -808,7 +805,7 @@ public class DataElement extends DomainResource { @Description(shortDefinition="Definition of element", formalDefinition="Defines the structure, type, allowed values and other constraining characteristics of the data element." ) protected List element; - private static final long serialVersionUID = 2017352331L; + private static final long serialVersionUID = 411433995L; /** * Constructor @@ -963,55 +960,6 @@ public class DataElement extends DomainResource { return this; } - /** - * @return {@link #name} (The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value - */ - public StringType getNameElement() { - if (this.name == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DataElement.name"); - else if (Configuration.doAutoCreate()) - this.name = new StringType(); // bb - return this.name; - } - - public boolean hasNameElement() { - return this.name != null && !this.name.isEmpty(); - } - - public boolean hasName() { - return this.name != null && !this.name.isEmpty(); - } - - /** - * @param value {@link #name} (The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value - */ - public DataElement setNameElement(StringType value) { - this.name = value; - return this; - } - - /** - * @return The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used. - */ - public String getName() { - return this.name == null ? null : this.name.getValue(); - } - - /** - * @param value The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used. - */ - public DataElement setName(String value) { - if (Utilities.noString(value)) - this.name = null; - else { - if (this.name == null) - this.name = new StringType(); - this.name.setValue(value); - } - return this; - } - /** * @return {@link #status} (The status of the data element.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value */ @@ -1151,46 +1099,6 @@ public class DataElement extends DomainResource { return this; } - /** - * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) - */ - public List getContact() { - if (this.contact == null) - this.contact = new ArrayList(); - return this.contact; - } - - public boolean hasContact() { - if (this.contact == null) - return false; - for (DataElementContactComponent item : this.contact) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) - */ - // syntactic sugar - public DataElementContactComponent addContact() { //3 - DataElementContactComponent t = new DataElementContactComponent(); - if (this.contact == null) - this.contact = new ArrayList(); - this.contact.add(t); - return t; - } - - // syntactic sugar - public DataElement addContact(DataElementContactComponent t) { //3 - if (t == null) - return this; - if (this.contact == null) - this.contact = new ArrayList(); - this.contact.add(t); - return this; - } - /** * @return {@link #date} (The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value */ @@ -1240,6 +1148,95 @@ public class DataElement extends DomainResource { return this; } + /** + * @return {@link #name} (The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataElement.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public DataElement setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used. + */ + public DataElement setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (DataElementContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + // syntactic sugar + public DataElementContactComponent addContact() { //3 + DataElementContactComponent t = new DataElementContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public DataElement addContact(DataElementContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + /** * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions.) */ @@ -1463,12 +1460,12 @@ public class DataElement extends DomainResource { childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this data element when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this data element is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); childrenList.add(new Property("identifier", "Identifier", "Formal identifier that is used to identify this data element when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the data element when it is referenced in a StructureDefinition, Questionnaire or instance. This is an arbitrary value managed by the definition author manually.", 0, java.lang.Integer.MAX_VALUE, version)); - childrenList.add(new Property("name", "string", "The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.", 0, java.lang.Integer.MAX_VALUE, name)); childrenList.add(new Property("status", "code", "The status of the data element.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("experimental", "boolean", "A flag to indicate that this search data element definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the data element.", 0, java.lang.Integer.MAX_VALUE, publisher)); - childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); childrenList.add(new Property("date", "dateTime", "The date this version of the data element was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the data element changes.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("name", "string", "The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of data element definitions.", 0, java.lang.Integer.MAX_VALUE, useContext)); childrenList.add(new Property("copyright", "string", "A copyright statement relating to the definition of the data element. Copyright statements are generally legal restrictions on the use and publishing of the details of the definition of the data element.", 0, java.lang.Integer.MAX_VALUE, copyright)); childrenList.add(new Property("stringency", "code", "Identifies how precise the data element is in its definition.", 0, java.lang.Integer.MAX_VALUE, stringency)); @@ -1484,18 +1481,18 @@ public class DataElement extends DomainResource { this.getIdentifier().add(castToIdentifier(value)); else if (name.equals("version")) this.version = castToString(value); // StringType - else if (name.equals("name")) - this.name = castToString(value); // StringType else if (name.equals("status")) this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration else if (name.equals("experimental")) this.experimental = castToBoolean(value); // BooleanType else if (name.equals("publisher")) this.publisher = castToString(value); // StringType - else if (name.equals("contact")) - this.getContact().add((DataElementContactComponent) value); else if (name.equals("date")) this.date = castToDateTime(value); // DateTimeType + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("contact")) + this.getContact().add((DataElementContactComponent) value); else if (name.equals("useContext")) this.getUseContext().add(castToCodeableConcept(value)); else if (name.equals("copyright")) @@ -1521,9 +1518,6 @@ public class DataElement extends DomainResource { else if (name.equals("version")) { throw new FHIRException("Cannot call addChild on a primitive type DataElement.version"); } - else if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a primitive type DataElement.name"); - } else if (name.equals("status")) { throw new FHIRException("Cannot call addChild on a primitive type DataElement.status"); } @@ -1533,12 +1527,15 @@ public class DataElement extends DomainResource { else if (name.equals("publisher")) { throw new FHIRException("Cannot call addChild on a primitive type 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"); } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type DataElement.name"); + } + else if (name.equals("contact")) { + return addContact(); + } else if (name.equals("useContext")) { return addUseContext(); } @@ -1573,16 +1570,16 @@ public class DataElement extends DomainResource { dst.identifier.add(i.copy()); }; dst.version = version == null ? null : version.copy(); - dst.name = name == null ? null : name.copy(); dst.status = status == null ? null : status.copy(); dst.experimental = experimental == null ? null : experimental.copy(); dst.publisher = publisher == null ? null : publisher.copy(); + dst.date = date == null ? null : date.copy(); + dst.name = name == null ? null : name.copy(); if (contact != null) { dst.contact = new ArrayList(); for (DataElementContactComponent i : contact) dst.contact.add(i.copy()); }; - dst.date = date == null ? null : date.copy(); if (useContext != null) { dst.useContext = new ArrayList(); for (CodeableConcept i : useContext) @@ -1615,8 +1612,8 @@ public class DataElement extends DomainResource { return false; DataElement o = (DataElement) other; return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) - && compareDeep(name, o.name, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) - && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) + && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) && compareDeep(publisher, o.publisher, true) + && compareDeep(date, o.date, true) && compareDeep(name, o.name, true) && compareDeep(contact, o.contact, true) && compareDeep(useContext, o.useContext, true) && compareDeep(copyright, o.copyright, true) && compareDeep(stringency, o.stringency, true) && compareDeep(mapping, o.mapping, true) && compareDeep(element, o.element, true); } @@ -1628,19 +1625,16 @@ public class DataElement extends DomainResource { if (!(other instanceof DataElement)) return false; DataElement o = (DataElement) other; - return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) - && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) - && compareValues(date, o.date, true) && compareValues(copyright, o.copyright, true) && compareValues(stringency, o.stringency, true) - ; + return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(status, o.status, true) + && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) + && compareValues(date, o.date, true) && compareValues(name, o.name, true) && compareValues(copyright, o.copyright, true) + && compareValues(stringency, o.stringency, true); } public boolean isEmpty() { - return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) - && (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty()) - && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (useContext == null || useContext.isEmpty()) - && (copyright == null || copyright.isEmpty()) && (stringency == null || stringency.isEmpty()) - && (mapping == null || mapping.isEmpty()) && (element == null || element.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, identifier, version, status + , experimental, publisher, date, name, contact, useContext, copyright, stringency, mapping + , element); } @Override diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DataRequirement.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DataRequirement.java new file mode 100644 index 00000000000..6593e1d9c39 --- /dev/null +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DataRequirement.java @@ -0,0 +1,1018 @@ +package org.hl7.fhir.dstu3.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu3.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; +/** + * Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data. + */ +@DatatypeDef(name="DataRequirement") +public class DataRequirement extends Type implements ICompositeType { + + @Block() + public static class DataRequirementCodeFilterComponent extends Element implements IBaseDatatypeElement { + /** + * The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept. + */ + @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The code-valued attribute of the filter", formalDefinition="The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept." ) + protected StringType path; + + /** + * The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset. + */ + @Child(name = "valueSet", type = {StringType.class, ValueSet.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Valueset for the filter", formalDefinition="The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset." ) + protected Type valueSet; + + /** + * The codes for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes. + */ + @Child(name = "valueCode", type = {CodeType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Code value of the filter", formalDefinition="The codes for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes." ) + protected List valueCode; + + /** + * The Codings for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified Codings. + */ + @Child(name = "valueCoding", type = {Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Coding value of the filter", formalDefinition="The Codings for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified Codings." ) + protected List valueCoding; + + /** + * The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts. + */ + @Child(name = "valueCodeableConcept", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="CodeableConcept value of the filter", formalDefinition="The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts." ) + protected List valueCodeableConcept; + + private static final long serialVersionUID = -888422840L; + + /** + * Constructor + */ + public DataRequirementCodeFilterComponent() { + super(); + } + + /** + * Constructor + */ + public DataRequirementCodeFilterComponent(StringType path) { + super(); + this.path = path; + } + + /** + * @return {@link #path} (The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public StringType getPathElement() { + if (this.path == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataRequirementCodeFilterComponent.path"); + else if (Configuration.doAutoCreate()) + this.path = new StringType(); // bb + return this.path; + } + + public boolean hasPathElement() { + return this.path != null && !this.path.isEmpty(); + } + + public boolean hasPath() { + return this.path != null && !this.path.isEmpty(); + } + + /** + * @param value {@link #path} (The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public DataRequirementCodeFilterComponent setPathElement(StringType value) { + this.path = value; + return this; + } + + /** + * @return The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept. + */ + public String getPath() { + return this.path == null ? null : this.path.getValue(); + } + + /** + * @param value The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept. + */ + public DataRequirementCodeFilterComponent setPath(String value) { + if (this.path == null) + this.path = new StringType(); + this.path.setValue(value); + return this; + } + + /** + * @return {@link #valueSet} (The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) + */ + public Type getValueSet() { + return this.valueSet; + } + + /** + * @return {@link #valueSet} (The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) + */ + public StringType getValueSetStringType() throws FHIRException { + if (!(this.valueSet instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.valueSet.getClass().getName()+" was encountered"); + return (StringType) this.valueSet; + } + + public boolean hasValueSetStringType() { + return this.valueSet instanceof StringType; + } + + /** + * @return {@link #valueSet} (The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) + */ + public Reference getValueSetReference() throws FHIRException { + if (!(this.valueSet instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.valueSet.getClass().getName()+" was encountered"); + return (Reference) this.valueSet; + } + + public boolean hasValueSetReference() { + return this.valueSet instanceof Reference; + } + + public boolean hasValueSet() { + return this.valueSet != null && !this.valueSet.isEmpty(); + } + + /** + * @param value {@link #valueSet} (The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) + */ + public DataRequirementCodeFilterComponent setValueSet(Type value) { + this.valueSet = value; + return this; + } + + /** + * @return {@link #valueCode} (The codes for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.) + */ + public List getValueCode() { + if (this.valueCode == null) + this.valueCode = new ArrayList(); + return this.valueCode; + } + + public boolean hasValueCode() { + if (this.valueCode == null) + return false; + for (CodeType item : this.valueCode) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #valueCode} (The codes for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.) + */ + // syntactic sugar + public CodeType addValueCodeElement() {//2 + CodeType t = new CodeType(); + if (this.valueCode == null) + this.valueCode = new ArrayList(); + this.valueCode.add(t); + return t; + } + + /** + * @param value {@link #valueCode} (The codes for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.) + */ + public DataRequirementCodeFilterComponent addValueCode(String value) { //1 + CodeType t = new CodeType(); + t.setValue(value); + if (this.valueCode == null) + this.valueCode = new ArrayList(); + this.valueCode.add(t); + return this; + } + + /** + * @param value {@link #valueCode} (The codes for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.) + */ + public boolean hasValueCode(String value) { + if (this.valueCode == null) + return false; + for (CodeType v : this.valueCode) + if (v.equals(value)) // code + return true; + return false; + } + + /** + * @return {@link #valueCoding} (The Codings for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified Codings.) + */ + public List getValueCoding() { + if (this.valueCoding == null) + this.valueCoding = new ArrayList(); + return this.valueCoding; + } + + public boolean hasValueCoding() { + if (this.valueCoding == null) + return false; + for (Coding item : this.valueCoding) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #valueCoding} (The Codings for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified Codings.) + */ + // syntactic sugar + public Coding addValueCoding() { //3 + Coding t = new Coding(); + if (this.valueCoding == null) + this.valueCoding = new ArrayList(); + this.valueCoding.add(t); + return t; + } + + // syntactic sugar + public DataRequirementCodeFilterComponent addValueCoding(Coding t) { //3 + if (t == null) + return this; + if (this.valueCoding == null) + this.valueCoding = new ArrayList(); + this.valueCoding.add(t); + return this; + } + + /** + * @return {@link #valueCodeableConcept} (The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts.) + */ + public List getValueCodeableConcept() { + if (this.valueCodeableConcept == null) + this.valueCodeableConcept = new ArrayList(); + return this.valueCodeableConcept; + } + + public boolean hasValueCodeableConcept() { + if (this.valueCodeableConcept == null) + return false; + for (CodeableConcept item : this.valueCodeableConcept) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #valueCodeableConcept} (The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts.) + */ + // syntactic sugar + public CodeableConcept addValueCodeableConcept() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.valueCodeableConcept == null) + this.valueCodeableConcept = new ArrayList(); + this.valueCodeableConcept.add(t); + return t; + } + + // syntactic sugar + public DataRequirementCodeFilterComponent addValueCodeableConcept(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.valueCodeableConcept == null) + this.valueCodeableConcept = new ArrayList(); + this.valueCodeableConcept.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("path", "string", "The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.", 0, java.lang.Integer.MAX_VALUE, path)); + childrenList.add(new Property("valueSet[x]", "string|Reference(ValueSet)", "The valueset for the code filter. The valueSet and value elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.", 0, java.lang.Integer.MAX_VALUE, valueSet)); + childrenList.add(new Property("valueCode", "code", "The codes for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codes.", 0, java.lang.Integer.MAX_VALUE, valueCode)); + childrenList.add(new Property("valueCoding", "Coding", "The Codings for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified Codings.", 0, java.lang.Integer.MAX_VALUE, valueCoding)); + childrenList.add(new Property("valueCodeableConcept", "CodeableConcept", "The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts.", 0, java.lang.Integer.MAX_VALUE, valueCodeableConcept)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("path")) + this.path = castToString(value); // StringType + else if (name.equals("valueSet[x]")) + this.valueSet = (Type) value; // Type + else if (name.equals("valueCode")) + this.getValueCode().add(castToCode(value)); + else if (name.equals("valueCoding")) + this.getValueCoding().add(castToCoding(value)); + else if (name.equals("valueCodeableConcept")) + this.getValueCodeableConcept().add(castToCodeableConcept(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("path")) { + throw new FHIRException("Cannot call addChild on a primitive type DataRequirement.path"); + } + else if (name.equals("valueSetString")) { + this.valueSet = new StringType(); + return this.valueSet; + } + else if (name.equals("valueSetReference")) { + this.valueSet = new Reference(); + return this.valueSet; + } + else if (name.equals("valueCode")) { + throw new FHIRException("Cannot call addChild on a primitive type DataRequirement.valueCode"); + } + else if (name.equals("valueCoding")) { + return addValueCoding(); + } + else if (name.equals("valueCodeableConcept")) { + return addValueCodeableConcept(); + } + else + return super.addChild(name); + } + + public DataRequirementCodeFilterComponent copy() { + DataRequirementCodeFilterComponent dst = new DataRequirementCodeFilterComponent(); + copyValues(dst); + dst.path = path == null ? null : path.copy(); + dst.valueSet = valueSet == null ? null : valueSet.copy(); + if (valueCode != null) { + dst.valueCode = new ArrayList(); + for (CodeType i : valueCode) + dst.valueCode.add(i.copy()); + }; + if (valueCoding != null) { + dst.valueCoding = new ArrayList(); + for (Coding i : valueCoding) + dst.valueCoding.add(i.copy()); + }; + if (valueCodeableConcept != null) { + dst.valueCodeableConcept = new ArrayList(); + for (CodeableConcept i : valueCodeableConcept) + dst.valueCodeableConcept.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DataRequirementCodeFilterComponent)) + return false; + DataRequirementCodeFilterComponent o = (DataRequirementCodeFilterComponent) other; + return compareDeep(path, o.path, true) && compareDeep(valueSet, o.valueSet, true) && compareDeep(valueCode, o.valueCode, true) + && compareDeep(valueCoding, o.valueCoding, true) && compareDeep(valueCodeableConcept, o.valueCodeableConcept, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DataRequirementCodeFilterComponent)) + return false; + DataRequirementCodeFilterComponent o = (DataRequirementCodeFilterComponent) other; + return compareValues(path, o.path, true) && compareValues(valueCode, o.valueCode, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( path, valueSet, valueCode, valueCoding + , valueCodeableConcept); + } + + public String fhirType() { + return "DataRequirement.codeFilter"; + + } + + } + + @Block() + public static class DataRequirementDateFilterComponent extends Element implements IBaseDatatypeElement { + /** + * The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing. + */ + @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The date-valued attribute of the filter", formalDefinition="The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing." ) + protected StringType path; + + /** + * The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. + */ + @Child(name = "value", type = {DateTimeType.class, Period.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The value of the filter, as a Period or dateTime value", formalDefinition="The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime." ) + protected Type value; + + private static final long serialVersionUID = 1791957163L; + + /** + * Constructor + */ + public DataRequirementDateFilterComponent() { + super(); + } + + /** + * Constructor + */ + public DataRequirementDateFilterComponent(StringType path) { + super(); + this.path = path; + } + + /** + * @return {@link #path} (The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public StringType getPathElement() { + if (this.path == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataRequirementDateFilterComponent.path"); + else if (Configuration.doAutoCreate()) + this.path = new StringType(); // bb + return this.path; + } + + public boolean hasPathElement() { + return this.path != null && !this.path.isEmpty(); + } + + public boolean hasPath() { + return this.path != null && !this.path.isEmpty(); + } + + /** + * @param value {@link #path} (The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public DataRequirementDateFilterComponent setPathElement(StringType value) { + this.path = value; + return this; + } + + /** + * @return The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing. + */ + public String getPath() { + return this.path == null ? null : this.path.getValue(); + } + + /** + * @param value The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing. + */ + public DataRequirementDateFilterComponent setPath(String value) { + if (this.path == null) + this.path = new StringType(); + this.path.setValue(value); + return this; + } + + /** + * @return {@link #value} (The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.) + */ + public Type getValue() { + return this.value; + } + + /** + * @return {@link #value} (The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.) + */ + public DateTimeType getValueDateTimeType() throws FHIRException { + if (!(this.value instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (DateTimeType) this.value; + } + + public boolean hasValueDateTimeType() { + return this.value instanceof DateTimeType; + } + + /** + * @return {@link #value} (The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.) + */ + public Period getValuePeriod() throws FHIRException { + if (!(this.value instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Period) this.value; + } + + public boolean hasValuePeriod() { + return this.value instanceof Period; + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.) + */ + public DataRequirementDateFilterComponent setValue(Type value) { + this.value = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("path", "string", "The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.", 0, java.lang.Integer.MAX_VALUE, path)); + childrenList.add(new Property("value[x]", "dateTime|Period", "The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("path")) + this.path = castToString(value); // StringType + else if (name.equals("value[x]")) + this.value = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("path")) { + throw new FHIRException("Cannot call addChild on a primitive type DataRequirement.path"); + } + else if (name.equals("valueDateTime")) { + this.value = new DateTimeType(); + return this.value; + } + else if (name.equals("valuePeriod")) { + this.value = new Period(); + return this.value; + } + else + return super.addChild(name); + } + + public DataRequirementDateFilterComponent copy() { + DataRequirementDateFilterComponent dst = new DataRequirementDateFilterComponent(); + copyValues(dst); + dst.path = path == null ? null : path.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DataRequirementDateFilterComponent)) + return false; + DataRequirementDateFilterComponent o = (DataRequirementDateFilterComponent) other; + return compareDeep(path, o.path, true) && compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DataRequirementDateFilterComponent)) + return false; + DataRequirementDateFilterComponent o = (DataRequirementDateFilterComponent) other; + return compareValues(path, o.path, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( path, value); + } + + public String fhirType() { + return "DataRequirement.dateFilter"; + + } + + } + + /** + * The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile. + */ + @Child(name = "type", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The type of the required data", formalDefinition="The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile." ) + protected CodeType type; + + /** + * The profile of the required data, specified as the uri of the profile definition. + */ + @Child(name = "profile", type = {StructureDefinition.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The profile of the required data", formalDefinition="The profile of the required data, specified as the uri of the profile definition." ) + protected Reference profile; + + /** + * The actual object that is the target of the reference (The profile of the required data, specified as the uri of the profile definition.) + */ + protected StructureDefinition profileTarget; + + /** + * Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. + */ + @Child(name = "mustSupport", type = {StringType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Indicates that specific structure elements are referenced by the knowledge module", formalDefinition="Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available." ) + protected List mustSupport; + + /** + * Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data. + */ + @Child(name = "codeFilter", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Code filters for the data", formalDefinition="Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data." ) + protected List codeFilter; + + /** + * Date filters specify additional constraints on the data in terms of the applicable date range for specific elements. + */ + @Child(name = "dateFilter", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Date filters for the data", formalDefinition="Date filters specify additional constraints on the data in terms of the applicable date range for specific elements." ) + protected List dateFilter; + + private static final long serialVersionUID = 1768899744L; + + /** + * Constructor + */ + public DataRequirement() { + super(); + } + + /** + * Constructor + */ + public DataRequirement(CodeType type) { + super(); + this.type = type; + } + + /** + * @return {@link #type} (The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public CodeType getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataRequirement.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeType(); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public DataRequirement setTypeElement(CodeType value) { + this.type = value; + return this; + } + + /** + * @return The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile. + */ + public String getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile. + */ + public DataRequirement setType(String value) { + if (this.type == null) + this.type = new CodeType(); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #profile} (The profile of the required data, specified as the uri of the profile definition.) + */ + public Reference getProfile() { + if (this.profile == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataRequirement.profile"); + else if (Configuration.doAutoCreate()) + this.profile = new Reference(); // cc + return this.profile; + } + + public boolean hasProfile() { + return this.profile != null && !this.profile.isEmpty(); + } + + /** + * @param value {@link #profile} (The profile of the required data, specified as the uri of the profile definition.) + */ + public DataRequirement setProfile(Reference value) { + this.profile = value; + return this; + } + + /** + * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The profile of the required data, specified as the uri of the profile definition.) + */ + public StructureDefinition getProfileTarget() { + if (this.profileTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DataRequirement.profile"); + else if (Configuration.doAutoCreate()) + this.profileTarget = new StructureDefinition(); // aa + return this.profileTarget; + } + + /** + * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The profile of the required data, specified as the uri of the profile definition.) + */ + public DataRequirement setProfileTarget(StructureDefinition value) { + this.profileTarget = value; + return this; + } + + /** + * @return {@link #mustSupport} (Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.) + */ + public List getMustSupport() { + if (this.mustSupport == null) + this.mustSupport = new ArrayList(); + return this.mustSupport; + } + + public boolean hasMustSupport() { + if (this.mustSupport == null) + return false; + for (StringType item : this.mustSupport) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #mustSupport} (Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.) + */ + // syntactic sugar + public StringType addMustSupportElement() {//2 + StringType t = new StringType(); + if (this.mustSupport == null) + this.mustSupport = new ArrayList(); + this.mustSupport.add(t); + return t; + } + + /** + * @param value {@link #mustSupport} (Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.) + */ + public DataRequirement addMustSupport(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.mustSupport == null) + this.mustSupport = new ArrayList(); + this.mustSupport.add(t); + return this; + } + + /** + * @param value {@link #mustSupport} (Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.) + */ + public boolean hasMustSupport(String value) { + if (this.mustSupport == null) + return false; + for (StringType v : this.mustSupport) + if (v.equals(value)) // string + return true; + return false; + } + + /** + * @return {@link #codeFilter} (Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data.) + */ + public List getCodeFilter() { + if (this.codeFilter == null) + this.codeFilter = new ArrayList(); + return this.codeFilter; + } + + public boolean hasCodeFilter() { + if (this.codeFilter == null) + return false; + for (DataRequirementCodeFilterComponent item : this.codeFilter) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #codeFilter} (Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data.) + */ + // syntactic sugar + public DataRequirementCodeFilterComponent addCodeFilter() { //3 + DataRequirementCodeFilterComponent t = new DataRequirementCodeFilterComponent(); + if (this.codeFilter == null) + this.codeFilter = new ArrayList(); + this.codeFilter.add(t); + return t; + } + + // syntactic sugar + public DataRequirement addCodeFilter(DataRequirementCodeFilterComponent t) { //3 + if (t == null) + return this; + if (this.codeFilter == null) + this.codeFilter = new ArrayList(); + this.codeFilter.add(t); + return this; + } + + /** + * @return {@link #dateFilter} (Date filters specify additional constraints on the data in terms of the applicable date range for specific elements.) + */ + public List getDateFilter() { + if (this.dateFilter == null) + this.dateFilter = new ArrayList(); + return this.dateFilter; + } + + public boolean hasDateFilter() { + if (this.dateFilter == null) + return false; + for (DataRequirementDateFilterComponent item : this.dateFilter) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dateFilter} (Date filters specify additional constraints on the data in terms of the applicable date range for specific elements.) + */ + // syntactic sugar + public DataRequirementDateFilterComponent addDateFilter() { //3 + DataRequirementDateFilterComponent t = new DataRequirementDateFilterComponent(); + if (this.dateFilter == null) + this.dateFilter = new ArrayList(); + this.dateFilter.add(t); + return t; + } + + // syntactic sugar + public DataRequirement addDateFilter(DataRequirementDateFilterComponent t) { //3 + if (t == null) + return this; + if (this.dateFilter == null) + this.dateFilter = new ArrayList(); + this.dateFilter.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "The type of the required data, specified as the type name of a resource. For profiles, this value is set to the type of the base resource of the profile.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("profile", "Reference(StructureDefinition)", "The profile of the required data, specified as the uri of the profile definition.", 0, java.lang.Integer.MAX_VALUE, profile)); + childrenList.add(new Property("mustSupport", "string", "Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.", 0, java.lang.Integer.MAX_VALUE, mustSupport)); + childrenList.add(new Property("codeFilter", "", "Code filters specify additional constraints on the data, specifying the value set of interest for a particular element of the data.", 0, java.lang.Integer.MAX_VALUE, codeFilter)); + childrenList.add(new Property("dateFilter", "", "Date filters specify additional constraints on the data in terms of the applicable date range for specific elements.", 0, java.lang.Integer.MAX_VALUE, dateFilter)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCode(value); // CodeType + else if (name.equals("profile")) + this.profile = castToReference(value); // Reference + else if (name.equals("mustSupport")) + this.getMustSupport().add(castToString(value)); + else if (name.equals("codeFilter")) + this.getCodeFilter().add((DataRequirementCodeFilterComponent) value); + else if (name.equals("dateFilter")) + this.getDateFilter().add((DataRequirementDateFilterComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type DataRequirement.type"); + } + else if (name.equals("profile")) { + this.profile = new Reference(); + return this.profile; + } + else if (name.equals("mustSupport")) { + throw new FHIRException("Cannot call addChild on a primitive type DataRequirement.mustSupport"); + } + else if (name.equals("codeFilter")) { + return addCodeFilter(); + } + else if (name.equals("dateFilter")) { + return addDateFilter(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "DataRequirement"; + + } + + public DataRequirement copy() { + DataRequirement dst = new DataRequirement(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.profile = profile == null ? null : profile.copy(); + if (mustSupport != null) { + dst.mustSupport = new ArrayList(); + for (StringType i : mustSupport) + dst.mustSupport.add(i.copy()); + }; + if (codeFilter != null) { + dst.codeFilter = new ArrayList(); + for (DataRequirementCodeFilterComponent i : codeFilter) + dst.codeFilter.add(i.copy()); + }; + if (dateFilter != null) { + dst.dateFilter = new ArrayList(); + for (DataRequirementDateFilterComponent i : dateFilter) + dst.dateFilter.add(i.copy()); + }; + return dst; + } + + protected DataRequirement typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof DataRequirement)) + return false; + DataRequirement o = (DataRequirement) other; + return compareDeep(type, o.type, true) && compareDeep(profile, o.profile, true) && compareDeep(mustSupport, o.mustSupport, true) + && compareDeep(codeFilter, o.codeFilter, true) && compareDeep(dateFilter, o.dateFilter, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof DataRequirement)) + return false; + DataRequirement o = (DataRequirement) other; + return compareValues(type, o.type, true) && compareValues(mustSupport, o.mustSupport, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, profile, mustSupport, codeFilter + , dateFilter); + } + + +} + diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DecisionSupportRule.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DecisionSupportRule.java index 0104e482c0f..9887f610b7c 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DecisionSupportRule.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DecisionSupportRule.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,1789 +39,26 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** - * This resource defines a decision support rule of the form [on Event] if Condition then Action. + * This resource defines a decision support rule of the form [on Event] if Condition then Action. It is intended to be a shareable, computable definition of a actions that should be taken whenever some condition is met in response to a particular event or events. */ @ResourceDef(name="DecisionSupportRule", profile="http://hl7.org/fhir/Profile/DecisionSupportRule") public class DecisionSupportRule extends DomainResource { - public enum DecisionSupportRuleTriggerType { - /** - * The trigger occurs in response to a specific named event - */ - NAMEDEVENT, - /** - * The trigger occurs at a specific time or periodically as described by a timing or schedule - */ - PERIODIC, - /** - * The trigger occurs whenever data of a particular type is added - */ - DATAADDED, - /** - * The trigger occurs whenever data of a particular type is modified - */ - DATAMODIFIED, - /** - * The trigger occurs whenever data of a particular type is removed - */ - DATAREMOVED, - /** - * The trigger occurs whenever data of a particular type is accessed - */ - DATAACCESSED, - /** - * The trigger occurs whenever access to data of a particular type is completed - */ - DATAACCESSENDED, - /** - * added to help the parsers - */ - NULL; - public static DecisionSupportRuleTriggerType fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("named-event".equals(codeString)) - return NAMEDEVENT; - if ("periodic".equals(codeString)) - return PERIODIC; - if ("data-added".equals(codeString)) - return DATAADDED; - if ("data-modified".equals(codeString)) - return DATAMODIFIED; - if ("data-removed".equals(codeString)) - return DATAREMOVED; - if ("data-accessed".equals(codeString)) - return DATAACCESSED; - if ("data-access-ended".equals(codeString)) - return DATAACCESSENDED; - throw new FHIRException("Unknown DecisionSupportRuleTriggerType code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case NAMEDEVENT: return "named-event"; - case PERIODIC: return "periodic"; - case DATAADDED: return "data-added"; - case DATAMODIFIED: return "data-modified"; - case DATAREMOVED: return "data-removed"; - case DATAACCESSED: return "data-accessed"; - case DATAACCESSENDED: return "data-access-ended"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case NAMEDEVENT: return "http://hl7.org/fhir/cds-rule-trigger-type"; - case PERIODIC: return "http://hl7.org/fhir/cds-rule-trigger-type"; - case DATAADDED: return "http://hl7.org/fhir/cds-rule-trigger-type"; - case DATAMODIFIED: return "http://hl7.org/fhir/cds-rule-trigger-type"; - case DATAREMOVED: return "http://hl7.org/fhir/cds-rule-trigger-type"; - case DATAACCESSED: return "http://hl7.org/fhir/cds-rule-trigger-type"; - case DATAACCESSENDED: return "http://hl7.org/fhir/cds-rule-trigger-type"; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case NAMEDEVENT: return "The trigger occurs in response to a specific named event"; - case PERIODIC: return "The trigger occurs at a specific time or periodically as described by a timing or schedule"; - case DATAADDED: return "The trigger occurs whenever data of a particular type is added"; - case DATAMODIFIED: return "The trigger occurs whenever data of a particular type is modified"; - case DATAREMOVED: return "The trigger occurs whenever data of a particular type is removed"; - case DATAACCESSED: return "The trigger occurs whenever data of a particular type is accessed"; - case DATAACCESSENDED: return "The trigger occurs whenever access to data of a particular type is completed"; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case NAMEDEVENT: return "Named Event"; - case PERIODIC: return "Periodic"; - case DATAADDED: return "Data Added"; - case DATAMODIFIED: return "Data Modified"; - case DATAREMOVED: return "Data Removed"; - case DATAACCESSED: return "Data Accessed"; - case DATAACCESSENDED: return "Data Access Ended"; - default: return "?"; - } - } - } - - public static class DecisionSupportRuleTriggerTypeEnumFactory implements EnumFactory { - public DecisionSupportRuleTriggerType fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("named-event".equals(codeString)) - return DecisionSupportRuleTriggerType.NAMEDEVENT; - if ("periodic".equals(codeString)) - return DecisionSupportRuleTriggerType.PERIODIC; - if ("data-added".equals(codeString)) - return DecisionSupportRuleTriggerType.DATAADDED; - if ("data-modified".equals(codeString)) - return DecisionSupportRuleTriggerType.DATAMODIFIED; - if ("data-removed".equals(codeString)) - return DecisionSupportRuleTriggerType.DATAREMOVED; - if ("data-accessed".equals(codeString)) - return DecisionSupportRuleTriggerType.DATAACCESSED; - if ("data-access-ended".equals(codeString)) - return DecisionSupportRuleTriggerType.DATAACCESSENDED; - throw new IllegalArgumentException("Unknown DecisionSupportRuleTriggerType code '"+codeString+"'"); - } - public Enumeration fromType(Base code) throws FHIRException { - if (code == null || code.isEmpty()) - return null; - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return null; - if ("named-event".equals(codeString)) - return new Enumeration(this, DecisionSupportRuleTriggerType.NAMEDEVENT); - if ("periodic".equals(codeString)) - return new Enumeration(this, DecisionSupportRuleTriggerType.PERIODIC); - if ("data-added".equals(codeString)) - return new Enumeration(this, DecisionSupportRuleTriggerType.DATAADDED); - if ("data-modified".equals(codeString)) - return new Enumeration(this, DecisionSupportRuleTriggerType.DATAMODIFIED); - if ("data-removed".equals(codeString)) - return new Enumeration(this, DecisionSupportRuleTriggerType.DATAREMOVED); - if ("data-accessed".equals(codeString)) - return new Enumeration(this, DecisionSupportRuleTriggerType.DATAACCESSED); - if ("data-access-ended".equals(codeString)) - return new Enumeration(this, DecisionSupportRuleTriggerType.DATAACCESSENDED); - throw new FHIRException("Unknown DecisionSupportRuleTriggerType code '"+codeString+"'"); - } - public String toCode(DecisionSupportRuleTriggerType code) { - if (code == DecisionSupportRuleTriggerType.NAMEDEVENT) - return "named-event"; - if (code == DecisionSupportRuleTriggerType.PERIODIC) - return "periodic"; - if (code == DecisionSupportRuleTriggerType.DATAADDED) - return "data-added"; - if (code == DecisionSupportRuleTriggerType.DATAMODIFIED) - return "data-modified"; - if (code == DecisionSupportRuleTriggerType.DATAREMOVED) - return "data-removed"; - if (code == DecisionSupportRuleTriggerType.DATAACCESSED) - return "data-accessed"; - if (code == DecisionSupportRuleTriggerType.DATAACCESSENDED) - return "data-access-ended"; - return "?"; - } - public String toSystem(DecisionSupportRuleTriggerType code) { - return code.getSystem(); - } - } - - public enum DecisionSupportRuleParticipantType { - /** - * The participant is the patient under evaluation - */ - PATIENT, - /** - * The participant is a person - */ - PERSON, - /** - * The participant is a practitioner involved in the patient's care - */ - PRACTITIONER, - /** - * The participant is a person related to the patient - */ - RELATEDPERSON, - /** - * added to help the parsers - */ - NULL; - public static DecisionSupportRuleParticipantType fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("patient".equals(codeString)) - return PATIENT; - if ("person".equals(codeString)) - return PERSON; - if ("practitioner".equals(codeString)) - return PRACTITIONER; - if ("related-person".equals(codeString)) - return RELATEDPERSON; - throw new FHIRException("Unknown DecisionSupportRuleParticipantType code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case PATIENT: return "patient"; - case PERSON: return "person"; - case PRACTITIONER: return "practitioner"; - case RELATEDPERSON: return "related-person"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case PATIENT: return "http://hl7.org/fhir/cds-rule-participant"; - case PERSON: return "http://hl7.org/fhir/cds-rule-participant"; - case PRACTITIONER: return "http://hl7.org/fhir/cds-rule-participant"; - case RELATEDPERSON: return "http://hl7.org/fhir/cds-rule-participant"; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case PATIENT: return "The participant is the patient under evaluation"; - case PERSON: return "The participant is a person"; - case PRACTITIONER: return "The participant is a practitioner involved in the patient's care"; - case RELATEDPERSON: return "The participant is a person related to the patient"; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case PATIENT: return "Patient"; - case PERSON: return "Person"; - case PRACTITIONER: return "Practitioner"; - case RELATEDPERSON: return "Related Person"; - default: return "?"; - } - } - } - - public static class DecisionSupportRuleParticipantTypeEnumFactory implements EnumFactory { - public DecisionSupportRuleParticipantType fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("patient".equals(codeString)) - return DecisionSupportRuleParticipantType.PATIENT; - if ("person".equals(codeString)) - return DecisionSupportRuleParticipantType.PERSON; - if ("practitioner".equals(codeString)) - return DecisionSupportRuleParticipantType.PRACTITIONER; - if ("related-person".equals(codeString)) - return DecisionSupportRuleParticipantType.RELATEDPERSON; - throw new IllegalArgumentException("Unknown DecisionSupportRuleParticipantType code '"+codeString+"'"); - } - public Enumeration fromType(Base code) throws FHIRException { - if (code == null || code.isEmpty()) - return null; - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return null; - if ("patient".equals(codeString)) - return new Enumeration(this, DecisionSupportRuleParticipantType.PATIENT); - if ("person".equals(codeString)) - return new Enumeration(this, DecisionSupportRuleParticipantType.PERSON); - if ("practitioner".equals(codeString)) - return new Enumeration(this, DecisionSupportRuleParticipantType.PRACTITIONER); - if ("related-person".equals(codeString)) - return new Enumeration(this, DecisionSupportRuleParticipantType.RELATEDPERSON); - throw new FHIRException("Unknown DecisionSupportRuleParticipantType code '"+codeString+"'"); - } - public String toCode(DecisionSupportRuleParticipantType code) { - if (code == DecisionSupportRuleParticipantType.PATIENT) - return "patient"; - if (code == DecisionSupportRuleParticipantType.PERSON) - return "person"; - if (code == DecisionSupportRuleParticipantType.PRACTITIONER) - return "practitioner"; - if (code == DecisionSupportRuleParticipantType.RELATEDPERSON) - return "related-person"; - return "?"; - } - public String toSystem(DecisionSupportRuleParticipantType code) { - return code.getSystem(); - } - } - - public enum DecisionSupportRuleActionType { - /** - * The action is to create a new resource - */ - CREATE, - /** - * The action is to update an existing resource - */ - UPDATE, - /** - * The action is to remove an existing resource - */ - REMOVE, - /** - * The action is to fire a specific event - */ - FIREEVENT, - /** - * added to help the parsers - */ - NULL; - public static DecisionSupportRuleActionType fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("create".equals(codeString)) - return CREATE; - if ("update".equals(codeString)) - return UPDATE; - if ("remove".equals(codeString)) - return REMOVE; - if ("fire-event".equals(codeString)) - return FIREEVENT; - throw new FHIRException("Unknown DecisionSupportRuleActionType code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case CREATE: return "create"; - case UPDATE: return "update"; - case REMOVE: return "remove"; - case FIREEVENT: return "fire-event"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case CREATE: return "http://hl7.org/fhir/cds-rule-action-type"; - case UPDATE: return "http://hl7.org/fhir/cds-rule-action-type"; - case REMOVE: return "http://hl7.org/fhir/cds-rule-action-type"; - case FIREEVENT: return "http://hl7.org/fhir/cds-rule-action-type"; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case CREATE: return "The action is to create a new resource"; - case UPDATE: return "The action is to update an existing resource"; - case REMOVE: return "The action is to remove an existing resource"; - case FIREEVENT: return "The action is to fire a specific event"; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case CREATE: return "Create"; - case UPDATE: return "Update"; - case REMOVE: return "Remove"; - case FIREEVENT: return "Fire Event"; - default: return "?"; - } - } - } - - public static class DecisionSupportRuleActionTypeEnumFactory implements EnumFactory { - public DecisionSupportRuleActionType fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("create".equals(codeString)) - return DecisionSupportRuleActionType.CREATE; - if ("update".equals(codeString)) - return DecisionSupportRuleActionType.UPDATE; - if ("remove".equals(codeString)) - return DecisionSupportRuleActionType.REMOVE; - if ("fire-event".equals(codeString)) - return DecisionSupportRuleActionType.FIREEVENT; - throw new IllegalArgumentException("Unknown DecisionSupportRuleActionType code '"+codeString+"'"); - } - public Enumeration fromType(Base code) throws FHIRException { - if (code == null || code.isEmpty()) - return null; - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return null; - if ("create".equals(codeString)) - return new Enumeration(this, DecisionSupportRuleActionType.CREATE); - if ("update".equals(codeString)) - return new Enumeration(this, DecisionSupportRuleActionType.UPDATE); - if ("remove".equals(codeString)) - return new Enumeration(this, DecisionSupportRuleActionType.REMOVE); - if ("fire-event".equals(codeString)) - return new Enumeration(this, DecisionSupportRuleActionType.FIREEVENT); - throw new FHIRException("Unknown DecisionSupportRuleActionType code '"+codeString+"'"); - } - public String toCode(DecisionSupportRuleActionType code) { - if (code == DecisionSupportRuleActionType.CREATE) - return "create"; - if (code == DecisionSupportRuleActionType.UPDATE) - return "update"; - if (code == DecisionSupportRuleActionType.REMOVE) - return "remove"; - if (code == DecisionSupportRuleActionType.FIREEVENT) - return "fire-event"; - return "?"; - } - public String toSystem(DecisionSupportRuleActionType code) { - return code.getSystem(); - } - } - - @Block() - public static class DecisionSupportRuleTriggerComponent extends BackboneElement implements IBaseBackboneElement { - /** - * The type of triggering event. - */ - @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="named-event | periodic | data-added | data-modified | data-removed | data-accessed | data-access-ended", formalDefinition="The type of triggering event." ) - protected Enumeration type; - - /** - * The name of the event (if this is a named-event trigger). - */ - @Child(name = "eventName", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The name of the event (if this is a named-event trigger)." ) - protected StringType eventName; - - /** - * The timing of the event (if this is a period trigger). - */ - @Child(name = "eventTiming", type = {Timing.class, Schedule.class, DateType.class, DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The timing of the event (if this is a period trigger)." ) - protected Type eventTiming; - - private static final long serialVersionUID = 1233218436L; - /** - * Constructor + * The metadata for the decision support rule, including publishing, life-cycle, version, documentation, and supporting evidence. */ - public DecisionSupportRuleTriggerComponent() { - super(); - } - - /** - * Constructor - */ - public DecisionSupportRuleTriggerComponent(Enumeration type) { - super(); - this.type = type; - } - - /** - * @return {@link #type} (The type of triggering event.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value - */ - public Enumeration getTypeElement() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportRuleTriggerComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Enumeration(new DecisionSupportRuleTriggerTypeEnumFactory()); // bb - return this.type; - } - - public boolean hasTypeElement() { - return this.type != null && !this.type.isEmpty(); - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of triggering event.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value - */ - public DecisionSupportRuleTriggerComponent setTypeElement(Enumeration value) { - this.type = value; - return this; - } - - /** - * @return The type of triggering event. - */ - public DecisionSupportRuleTriggerType getType() { - return this.type == null ? null : this.type.getValue(); - } - - /** - * @param value The type of triggering event. - */ - public DecisionSupportRuleTriggerComponent setType(DecisionSupportRuleTriggerType value) { - if (this.type == null) - this.type = new Enumeration(new DecisionSupportRuleTriggerTypeEnumFactory()); - this.type.setValue(value); - return this; - } - - /** - * @return {@link #eventName} (The name of the event (if this is a named-event trigger).). This is the underlying object with id, value and extensions. The accessor "getEventName" gives direct access to the value - */ - public StringType getEventNameElement() { - if (this.eventName == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportRuleTriggerComponent.eventName"); - else if (Configuration.doAutoCreate()) - this.eventName = new StringType(); // bb - return this.eventName; - } - - public boolean hasEventNameElement() { - return this.eventName != null && !this.eventName.isEmpty(); - } - - public boolean hasEventName() { - return this.eventName != null && !this.eventName.isEmpty(); - } - - /** - * @param value {@link #eventName} (The name of the event (if this is a named-event trigger).). This is the underlying object with id, value and extensions. The accessor "getEventName" gives direct access to the value - */ - public DecisionSupportRuleTriggerComponent setEventNameElement(StringType value) { - this.eventName = value; - return this; - } - - /** - * @return The name of the event (if this is a named-event trigger). - */ - public String getEventName() { - return this.eventName == null ? null : this.eventName.getValue(); - } - - /** - * @param value The name of the event (if this is a named-event trigger). - */ - public DecisionSupportRuleTriggerComponent setEventName(String value) { - if (Utilities.noString(value)) - this.eventName = null; - else { - if (this.eventName == null) - this.eventName = new StringType(); - this.eventName.setValue(value); - } - return this; - } - - /** - * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) - */ - public Type getEventTiming() { - return this.eventTiming; - } - - /** - * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) - */ - public Timing getEventTimingTiming() throws FHIRException { - if (!(this.eventTiming instanceof Timing)) - throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.eventTiming.getClass().getName()+" was encountered"); - return (Timing) this.eventTiming; - } - - public boolean hasEventTimingTiming() { - return this.eventTiming instanceof Timing; - } - - /** - * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) - */ - public Reference getEventTimingReference() throws FHIRException { - if (!(this.eventTiming instanceof Reference)) - throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.eventTiming.getClass().getName()+" was encountered"); - return (Reference) this.eventTiming; - } - - public boolean hasEventTimingReference() { - return this.eventTiming instanceof Reference; - } - - /** - * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) - */ - public DateType getEventTimingDateType() throws FHIRException { - if (!(this.eventTiming instanceof DateType)) - throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.eventTiming.getClass().getName()+" was encountered"); - return (DateType) this.eventTiming; - } - - public boolean hasEventTimingDateType() { - return this.eventTiming instanceof DateType; - } - - /** - * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) - */ - public DateTimeType getEventTimingDateTimeType() throws FHIRException { - if (!(this.eventTiming instanceof DateTimeType)) - throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.eventTiming.getClass().getName()+" was encountered"); - return (DateTimeType) this.eventTiming; - } - - public boolean hasEventTimingDateTimeType() { - return this.eventTiming instanceof DateTimeType; - } - - public boolean hasEventTiming() { - return this.eventTiming != null && !this.eventTiming.isEmpty(); - } - - /** - * @param value {@link #eventTiming} (The timing of the event (if this is a period trigger).) - */ - public DecisionSupportRuleTriggerComponent setEventTiming(Type value) { - this.eventTiming = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("type", "code", "The type of triggering event.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("eventName", "string", "The name of the event (if this is a named-event trigger).", 0, java.lang.Integer.MAX_VALUE, eventName)); - childrenList.add(new Property("eventTiming[x]", "Timing|Reference(Schedule)|date|dateTime", "The timing of the event (if this is a period trigger).", 0, java.lang.Integer.MAX_VALUE, eventTiming)); - } - - @Override - public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("type")) - this.type = new DecisionSupportRuleTriggerTypeEnumFactory().fromType(value); // Enumeration - else if (name.equals("eventName")) - this.eventName = castToString(value); // StringType - else if (name.equals("eventTiming[x]")) - this.eventTiming = (Type) value; // Type - else - super.setProperty(name, value); - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("type")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.type"); - } - else if (name.equals("eventName")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.eventName"); - } - else if (name.equals("eventTimingTiming")) { - this.eventTiming = new Timing(); - return this.eventTiming; - } - else if (name.equals("eventTimingReference")) { - this.eventTiming = new Reference(); - return this.eventTiming; - } - else if (name.equals("eventTimingDate")) { - this.eventTiming = new DateType(); - return this.eventTiming; - } - else if (name.equals("eventTimingDateTime")) { - this.eventTiming = new DateTimeType(); - return this.eventTiming; - } - else - return super.addChild(name); - } - - public DecisionSupportRuleTriggerComponent copy() { - DecisionSupportRuleTriggerComponent dst = new DecisionSupportRuleTriggerComponent(); - copyValues(dst); - dst.type = type == null ? null : type.copy(); - dst.eventName = eventName == null ? null : eventName.copy(); - dst.eventTiming = eventTiming == null ? null : eventTiming.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof DecisionSupportRuleTriggerComponent)) - return false; - DecisionSupportRuleTriggerComponent o = (DecisionSupportRuleTriggerComponent) other; - return compareDeep(type, o.type, true) && compareDeep(eventName, o.eventName, true) && compareDeep(eventTiming, o.eventTiming, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof DecisionSupportRuleTriggerComponent)) - return false; - DecisionSupportRuleTriggerComponent o = (DecisionSupportRuleTriggerComponent) other; - return compareValues(type, o.type, true) && compareValues(eventName, o.eventName, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (eventName == null || eventName.isEmpty()) - && (eventTiming == null || eventTiming.isEmpty()); - } - - public String fhirType() { - return "DecisionSupportRule.trigger"; - - } - - } - - @Block() - public static class DecisionSupportRuleActionComponent extends BackboneElement implements IBaseBackboneElement { - /** - * A unique identifier for the action. - */ - @Child(name = "actionIdentifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="A unique identifier for the action." ) - protected Identifier actionIdentifier; - - /** - * A user-visible number for the action. - */ - @Child(name = "number", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="A user-visible number for the action." ) - protected StringType number; - - /** - * Supporting evidence for the action. - */ - @Child(name = "supportingEvidence", type = {Attachment.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Supporting evidence for the action." ) - protected List supportingEvidence; - - /** - * Supporting documentation for the action. - */ - @Child(name = "documentation", type = {Attachment.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Supporting documentation for the action." ) - protected List documentation; - - /** - * The type of participant in the action. - */ - @Child(name = "participantType", type = {CodeType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="patient | person | practitioner | related-person", formalDefinition="The type of participant in the action." ) - protected List> participantType; - - /** - * The title of the action. - */ - @Child(name = "title", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The title of the action." ) - protected StringType title; - - /** - * A short description of the action. - */ - @Child(name = "description", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="A short description of the action." ) - protected StringType description; - - /** - * A text equivalent of the action to be performed. - */ - @Child(name = "textEquivalent", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="A text equivalent of the action to be performed." ) - protected StringType textEquivalent; - - /** - * Concepts associated with the action. - */ - @Child(name = "concept", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Concepts associated with the action." ) - protected List concept; - - /** - * The type of action to perform (create, update, remove). - */ - @Child(name = "type", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="create | update | remove | fire-event", formalDefinition="The type of action to perform (create, update, remove)." ) - protected Enumeration type; - - /** - * The resource that is the target of the action (e.g. CommunicationRequest). - */ - @Child(name = "resource", type = {}, order=11, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The resource that is the target of the action (e.g. CommunicationRequest)." ) - protected Reference resource; - - /** - * The actual object that is the target of the reference (The resource that is the target of the action (e.g. CommunicationRequest).) - */ - protected Resource resourceTarget; - - /** - * Customizations that should be applied to the statically defined resource. - */ - @Child(name = "customization", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Customizations that should be applied to the statically defined resource." ) - protected List customization; - - /** - * Sub actions. - */ - @Child(name = "actions", type = {DecisionSupportRuleActionComponent.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Sub actions." ) - protected List actions; - - private static final long serialVersionUID = -450005378L; - - /** - * Constructor - */ - public DecisionSupportRuleActionComponent() { - super(); - } - - /** - * @return {@link #actionIdentifier} (A unique identifier for the action.) - */ - public Identifier getActionIdentifier() { - if (this.actionIdentifier == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportRuleActionComponent.actionIdentifier"); - else if (Configuration.doAutoCreate()) - this.actionIdentifier = new Identifier(); // cc - return this.actionIdentifier; - } - - public boolean hasActionIdentifier() { - return this.actionIdentifier != null && !this.actionIdentifier.isEmpty(); - } - - /** - * @param value {@link #actionIdentifier} (A unique identifier for the action.) - */ - public DecisionSupportRuleActionComponent setActionIdentifier(Identifier value) { - this.actionIdentifier = value; - return this; - } - - /** - * @return {@link #number} (A user-visible number for the action.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value - */ - public StringType getNumberElement() { - if (this.number == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportRuleActionComponent.number"); - else if (Configuration.doAutoCreate()) - this.number = new StringType(); // bb - return this.number; - } - - public boolean hasNumberElement() { - return this.number != null && !this.number.isEmpty(); - } - - public boolean hasNumber() { - return this.number != null && !this.number.isEmpty(); - } - - /** - * @param value {@link #number} (A user-visible number for the action.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value - */ - public DecisionSupportRuleActionComponent setNumberElement(StringType value) { - this.number = value; - return this; - } - - /** - * @return A user-visible number for the action. - */ - public String getNumber() { - return this.number == null ? null : this.number.getValue(); - } - - /** - * @param value A user-visible number for the action. - */ - public DecisionSupportRuleActionComponent setNumber(String value) { - if (Utilities.noString(value)) - this.number = null; - else { - if (this.number == null) - this.number = new StringType(); - this.number.setValue(value); - } - return this; - } - - /** - * @return {@link #supportingEvidence} (Supporting evidence for the action.) - */ - public List getSupportingEvidence() { - if (this.supportingEvidence == null) - this.supportingEvidence = new ArrayList(); - return this.supportingEvidence; - } - - public boolean hasSupportingEvidence() { - if (this.supportingEvidence == null) - return false; - for (Attachment item : this.supportingEvidence) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #supportingEvidence} (Supporting evidence for the action.) - */ - // syntactic sugar - public Attachment addSupportingEvidence() { //3 - Attachment t = new Attachment(); - if (this.supportingEvidence == null) - this.supportingEvidence = new ArrayList(); - this.supportingEvidence.add(t); - return t; - } - - // syntactic sugar - public DecisionSupportRuleActionComponent addSupportingEvidence(Attachment t) { //3 - if (t == null) - return this; - if (this.supportingEvidence == null) - this.supportingEvidence = new ArrayList(); - this.supportingEvidence.add(t); - return this; - } - - /** - * @return {@link #documentation} (Supporting documentation for the action.) - */ - public List getDocumentation() { - if (this.documentation == null) - this.documentation = new ArrayList(); - return this.documentation; - } - - public boolean hasDocumentation() { - if (this.documentation == null) - return false; - for (Attachment item : this.documentation) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #documentation} (Supporting documentation for the action.) - */ - // syntactic sugar - public Attachment addDocumentation() { //3 - Attachment t = new Attachment(); - if (this.documentation == null) - this.documentation = new ArrayList(); - this.documentation.add(t); - return t; - } - - // syntactic sugar - public DecisionSupportRuleActionComponent addDocumentation(Attachment t) { //3 - if (t == null) - return this; - if (this.documentation == null) - this.documentation = new ArrayList(); - this.documentation.add(t); - return this; - } - - /** - * @return {@link #participantType} (The type of participant in the action.) - */ - public List> getParticipantType() { - if (this.participantType == null) - this.participantType = new ArrayList>(); - return this.participantType; - } - - public boolean hasParticipantType() { - if (this.participantType == null) - return false; - for (Enumeration item : this.participantType) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #participantType} (The type of participant in the action.) - */ - // syntactic sugar - public Enumeration addParticipantTypeElement() {//2 - Enumeration t = new Enumeration(new DecisionSupportRuleParticipantTypeEnumFactory()); - if (this.participantType == null) - this.participantType = new ArrayList>(); - this.participantType.add(t); - return t; - } - - /** - * @param value {@link #participantType} (The type of participant in the action.) - */ - public DecisionSupportRuleActionComponent addParticipantType(DecisionSupportRuleParticipantType value) { //1 - Enumeration t = new Enumeration(new DecisionSupportRuleParticipantTypeEnumFactory()); - t.setValue(value); - if (this.participantType == null) - this.participantType = new ArrayList>(); - this.participantType.add(t); - return this; - } - - /** - * @param value {@link #participantType} (The type of participant in the action.) - */ - public boolean hasParticipantType(DecisionSupportRuleParticipantType value) { - if (this.participantType == null) - return false; - for (Enumeration v : this.participantType) - if (v.equals(value)) // code - return true; - return false; - } - - /** - * @return {@link #title} (The title of the action.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value - */ - public StringType getTitleElement() { - if (this.title == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportRuleActionComponent.title"); - else if (Configuration.doAutoCreate()) - this.title = new StringType(); // bb - return this.title; - } - - public boolean hasTitleElement() { - return this.title != null && !this.title.isEmpty(); - } - - public boolean hasTitle() { - return this.title != null && !this.title.isEmpty(); - } - - /** - * @param value {@link #title} (The title of the action.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value - */ - public DecisionSupportRuleActionComponent setTitleElement(StringType value) { - this.title = value; - return this; - } - - /** - * @return The title of the action. - */ - public String getTitle() { - return this.title == null ? null : this.title.getValue(); - } - - /** - * @param value The title of the action. - */ - public DecisionSupportRuleActionComponent setTitle(String value) { - if (Utilities.noString(value)) - this.title = null; - else { - if (this.title == null) - this.title = new StringType(); - this.title.setValue(value); - } - return this; - } - - /** - * @return {@link #description} (A short description of the action.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public StringType getDescriptionElement() { - if (this.description == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportRuleActionComponent.description"); - else if (Configuration.doAutoCreate()) - this.description = new StringType(); // bb - return this.description; - } - - public boolean hasDescriptionElement() { - return this.description != null && !this.description.isEmpty(); - } - - public boolean hasDescription() { - return this.description != null && !this.description.isEmpty(); - } - - /** - * @param value {@link #description} (A short description of the action.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public DecisionSupportRuleActionComponent setDescriptionElement(StringType value) { - this.description = value; - return this; - } - - /** - * @return A short description of the action. - */ - public String getDescription() { - return this.description == null ? null : this.description.getValue(); - } - - /** - * @param value A short description of the action. - */ - public DecisionSupportRuleActionComponent setDescription(String value) { - if (Utilities.noString(value)) - this.description = null; - else { - if (this.description == null) - this.description = new StringType(); - this.description.setValue(value); - } - return this; - } - - /** - * @return {@link #textEquivalent} (A text equivalent of the action to be performed.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value - */ - public StringType getTextEquivalentElement() { - if (this.textEquivalent == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportRuleActionComponent.textEquivalent"); - else if (Configuration.doAutoCreate()) - this.textEquivalent = new StringType(); // bb - return this.textEquivalent; - } - - public boolean hasTextEquivalentElement() { - return this.textEquivalent != null && !this.textEquivalent.isEmpty(); - } - - public boolean hasTextEquivalent() { - return this.textEquivalent != null && !this.textEquivalent.isEmpty(); - } - - /** - * @param value {@link #textEquivalent} (A text equivalent of the action to be performed.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value - */ - public DecisionSupportRuleActionComponent setTextEquivalentElement(StringType value) { - this.textEquivalent = value; - return this; - } - - /** - * @return A text equivalent of the action to be performed. - */ - public String getTextEquivalent() { - return this.textEquivalent == null ? null : this.textEquivalent.getValue(); - } - - /** - * @param value A text equivalent of the action to be performed. - */ - public DecisionSupportRuleActionComponent setTextEquivalent(String value) { - if (Utilities.noString(value)) - this.textEquivalent = null; - else { - if (this.textEquivalent == null) - this.textEquivalent = new StringType(); - this.textEquivalent.setValue(value); - } - return this; - } - - /** - * @return {@link #concept} (Concepts associated with the action.) - */ - public List getConcept() { - if (this.concept == null) - this.concept = new ArrayList(); - return this.concept; - } - - public boolean hasConcept() { - if (this.concept == null) - return false; - for (CodeableConcept item : this.concept) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #concept} (Concepts associated with the action.) - */ - // syntactic sugar - public CodeableConcept addConcept() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.concept == null) - this.concept = new ArrayList(); - this.concept.add(t); - return t; - } - - // syntactic sugar - public DecisionSupportRuleActionComponent addConcept(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.concept == null) - this.concept = new ArrayList(); - this.concept.add(t); - return this; - } - - /** - * @return {@link #type} (The type of action to perform (create, update, remove).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value - */ - public Enumeration getTypeElement() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportRuleActionComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Enumeration(new DecisionSupportRuleActionTypeEnumFactory()); // bb - return this.type; - } - - public boolean hasTypeElement() { - return this.type != null && !this.type.isEmpty(); - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of action to perform (create, update, remove).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value - */ - public DecisionSupportRuleActionComponent setTypeElement(Enumeration value) { - this.type = value; - return this; - } - - /** - * @return The type of action to perform (create, update, remove). - */ - public DecisionSupportRuleActionType getType() { - return this.type == null ? null : this.type.getValue(); - } - - /** - * @param value The type of action to perform (create, update, remove). - */ - public DecisionSupportRuleActionComponent setType(DecisionSupportRuleActionType value) { - if (value == null) - this.type = null; - else { - if (this.type == null) - this.type = new Enumeration(new DecisionSupportRuleActionTypeEnumFactory()); - this.type.setValue(value); - } - return this; - } - - /** - * @return {@link #resource} (The resource that is the target of the action (e.g. CommunicationRequest).) - */ - public Reference getResource() { - if (this.resource == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportRuleActionComponent.resource"); - else if (Configuration.doAutoCreate()) - this.resource = new Reference(); // cc - return this.resource; - } - - public boolean hasResource() { - return this.resource != null && !this.resource.isEmpty(); - } - - /** - * @param value {@link #resource} (The resource that is the target of the action (e.g. CommunicationRequest).) - */ - public DecisionSupportRuleActionComponent setResource(Reference value) { - this.resource = value; - return this; - } - - /** - * @return {@link #resource} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The resource that is the target of the action (e.g. CommunicationRequest).) - */ - public Resource getResourceTarget() { - return this.resourceTarget; - } - - /** - * @param value {@link #resource} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The resource that is the target of the action (e.g. CommunicationRequest).) - */ - public DecisionSupportRuleActionComponent setResourceTarget(Resource value) { - this.resourceTarget = value; - return this; - } - - /** - * @return {@link #customization} (Customizations that should be applied to the statically defined resource.) - */ - public List getCustomization() { - if (this.customization == null) - this.customization = new ArrayList(); - return this.customization; - } - - public boolean hasCustomization() { - if (this.customization == null) - return false; - for (DecisionSupportRuleActionCustomizationComponent item : this.customization) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #customization} (Customizations that should be applied to the statically defined resource.) - */ - // syntactic sugar - public DecisionSupportRuleActionCustomizationComponent addCustomization() { //3 - DecisionSupportRuleActionCustomizationComponent t = new DecisionSupportRuleActionCustomizationComponent(); - if (this.customization == null) - this.customization = new ArrayList(); - this.customization.add(t); - return t; - } - - // syntactic sugar - public DecisionSupportRuleActionComponent addCustomization(DecisionSupportRuleActionCustomizationComponent t) { //3 - if (t == null) - return this; - if (this.customization == null) - this.customization = new ArrayList(); - this.customization.add(t); - return this; - } - - /** - * @return {@link #actions} (Sub actions.) - */ - public List getActions() { - if (this.actions == null) - this.actions = new ArrayList(); - return this.actions; - } - - public boolean hasActions() { - if (this.actions == null) - return false; - for (DecisionSupportRuleActionComponent item : this.actions) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #actions} (Sub actions.) - */ - // syntactic sugar - public DecisionSupportRuleActionComponent addActions() { //3 - DecisionSupportRuleActionComponent t = new DecisionSupportRuleActionComponent(); - if (this.actions == null) - this.actions = new ArrayList(); - this.actions.add(t); - return t; - } - - // syntactic sugar - public DecisionSupportRuleActionComponent addActions(DecisionSupportRuleActionComponent t) { //3 - if (t == null) - return this; - if (this.actions == null) - this.actions = new ArrayList(); - this.actions.add(t); - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("actionIdentifier", "Identifier", "A unique identifier for the action.", 0, java.lang.Integer.MAX_VALUE, actionIdentifier)); - childrenList.add(new Property("number", "string", "A user-visible number for the action.", 0, java.lang.Integer.MAX_VALUE, number)); - childrenList.add(new Property("supportingEvidence", "Attachment", "Supporting evidence for the action.", 0, java.lang.Integer.MAX_VALUE, supportingEvidence)); - childrenList.add(new Property("documentation", "Attachment", "Supporting documentation for the action.", 0, java.lang.Integer.MAX_VALUE, documentation)); - childrenList.add(new Property("participantType", "code", "The type of participant in the action.", 0, java.lang.Integer.MAX_VALUE, participantType)); - childrenList.add(new Property("title", "string", "The title of the action.", 0, java.lang.Integer.MAX_VALUE, title)); - childrenList.add(new Property("description", "string", "A short description of the action.", 0, java.lang.Integer.MAX_VALUE, description)); - childrenList.add(new Property("textEquivalent", "string", "A text equivalent of the action to be performed.", 0, java.lang.Integer.MAX_VALUE, textEquivalent)); - childrenList.add(new Property("concept", "CodeableConcept", "Concepts associated with the action.", 0, java.lang.Integer.MAX_VALUE, concept)); - childrenList.add(new Property("type", "code", "The type of action to perform (create, update, remove).", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("resource", "Reference(Any)", "The resource that is the target of the action (e.g. CommunicationRequest).", 0, java.lang.Integer.MAX_VALUE, resource)); - childrenList.add(new Property("customization", "", "Customizations that should be applied to the statically defined resource.", 0, java.lang.Integer.MAX_VALUE, customization)); - childrenList.add(new Property("actions", "@DecisionSupportRule.action", "Sub actions.", 0, java.lang.Integer.MAX_VALUE, actions)); - } - - @Override - public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("actionIdentifier")) - this.actionIdentifier = castToIdentifier(value); // Identifier - else if (name.equals("number")) - this.number = castToString(value); // StringType - else if (name.equals("supportingEvidence")) - this.getSupportingEvidence().add(castToAttachment(value)); - else if (name.equals("documentation")) - this.getDocumentation().add(castToAttachment(value)); - else if (name.equals("participantType")) - this.getParticipantType().add(new DecisionSupportRuleParticipantTypeEnumFactory().fromType(value)); - else if (name.equals("title")) - this.title = castToString(value); // StringType - else if (name.equals("description")) - this.description = castToString(value); // StringType - else if (name.equals("textEquivalent")) - this.textEquivalent = castToString(value); // StringType - else if (name.equals("concept")) - this.getConcept().add(castToCodeableConcept(value)); - else if (name.equals("type")) - this.type = new DecisionSupportRuleActionTypeEnumFactory().fromType(value); // Enumeration - else if (name.equals("resource")) - this.resource = castToReference(value); // Reference - else if (name.equals("customization")) - this.getCustomization().add((DecisionSupportRuleActionCustomizationComponent) value); - else if (name.equals("actions")) - this.getActions().add((DecisionSupportRuleActionComponent) value); - else - super.setProperty(name, value); - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("actionIdentifier")) { - this.actionIdentifier = new Identifier(); - return this.actionIdentifier; - } - else if (name.equals("number")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.number"); - } - else if (name.equals("supportingEvidence")) { - return addSupportingEvidence(); - } - else if (name.equals("documentation")) { - return addDocumentation(); - } - else if (name.equals("participantType")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.participantType"); - } - else if (name.equals("title")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.title"); - } - else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.description"); - } - else if (name.equals("textEquivalent")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.textEquivalent"); - } - else if (name.equals("concept")) { - return addConcept(); - } - else if (name.equals("type")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.type"); - } - else if (name.equals("resource")) { - this.resource = new Reference(); - return this.resource; - } - else if (name.equals("customization")) { - return addCustomization(); - } - else if (name.equals("actions")) { - return addActions(); - } - else - return super.addChild(name); - } - - public DecisionSupportRuleActionComponent copy() { - DecisionSupportRuleActionComponent dst = new DecisionSupportRuleActionComponent(); - copyValues(dst); - dst.actionIdentifier = actionIdentifier == null ? null : actionIdentifier.copy(); - dst.number = number == null ? null : number.copy(); - if (supportingEvidence != null) { - dst.supportingEvidence = new ArrayList(); - for (Attachment i : supportingEvidence) - dst.supportingEvidence.add(i.copy()); - }; - if (documentation != null) { - dst.documentation = new ArrayList(); - for (Attachment i : documentation) - dst.documentation.add(i.copy()); - }; - if (participantType != null) { - dst.participantType = new ArrayList>(); - for (Enumeration i : participantType) - dst.participantType.add(i.copy()); - }; - dst.title = title == null ? null : title.copy(); - dst.description = description == null ? null : description.copy(); - dst.textEquivalent = textEquivalent == null ? null : textEquivalent.copy(); - if (concept != null) { - dst.concept = new ArrayList(); - for (CodeableConcept i : concept) - dst.concept.add(i.copy()); - }; - dst.type = type == null ? null : type.copy(); - dst.resource = resource == null ? null : resource.copy(); - if (customization != null) { - dst.customization = new ArrayList(); - for (DecisionSupportRuleActionCustomizationComponent i : customization) - dst.customization.add(i.copy()); - }; - if (actions != null) { - dst.actions = new ArrayList(); - for (DecisionSupportRuleActionComponent i : actions) - dst.actions.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof DecisionSupportRuleActionComponent)) - return false; - DecisionSupportRuleActionComponent o = (DecisionSupportRuleActionComponent) other; - return compareDeep(actionIdentifier, o.actionIdentifier, true) && compareDeep(number, o.number, true) - && compareDeep(supportingEvidence, o.supportingEvidence, true) && compareDeep(documentation, o.documentation, true) - && compareDeep(participantType, o.participantType, true) && compareDeep(title, o.title, true) && compareDeep(description, o.description, true) - && compareDeep(textEquivalent, o.textEquivalent, true) && compareDeep(concept, o.concept, true) - && compareDeep(type, o.type, true) && compareDeep(resource, o.resource, true) && compareDeep(customization, o.customization, true) - && compareDeep(actions, o.actions, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof DecisionSupportRuleActionComponent)) - return false; - DecisionSupportRuleActionComponent o = (DecisionSupportRuleActionComponent) other; - return compareValues(number, o.number, true) && compareValues(participantType, o.participantType, true) - && compareValues(title, o.title, true) && compareValues(description, o.description, true) && compareValues(textEquivalent, o.textEquivalent, true) - && compareValues(type, o.type, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (actionIdentifier == null || actionIdentifier.isEmpty()) && (number == null || number.isEmpty()) - && (supportingEvidence == null || supportingEvidence.isEmpty()) && (documentation == null || documentation.isEmpty()) - && (participantType == null || participantType.isEmpty()) && (title == null || title.isEmpty()) - && (description == null || description.isEmpty()) && (textEquivalent == null || textEquivalent.isEmpty()) - && (concept == null || concept.isEmpty()) && (type == null || type.isEmpty()) && (resource == null || resource.isEmpty()) - && (customization == null || customization.isEmpty()) && (actions == null || actions.isEmpty()) - ; - } - - public String fhirType() { - return "DecisionSupportRule.action"; - - } - - } - - @Block() - public static class DecisionSupportRuleActionCustomizationComponent extends BackboneElement implements IBaseBackboneElement { - /** - * The path to the element to be customized. - */ - @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The path to the element to be customized." ) - protected StringType path; - - /** - * An expression specifying the value of the customized element. - */ - @Child(name = "expression", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="An expression specifying the value of the customized element." ) - protected StringType expression; - - private static final long serialVersionUID = -252690483L; - - /** - * Constructor - */ - public DecisionSupportRuleActionCustomizationComponent() { - super(); - } - - /** - * Constructor - */ - public DecisionSupportRuleActionCustomizationComponent(StringType path, StringType expression) { - super(); - this.path = path; - this.expression = expression; - } - - /** - * @return {@link #path} (The path to the element to be customized.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value - */ - public StringType getPathElement() { - if (this.path == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportRuleActionCustomizationComponent.path"); - else if (Configuration.doAutoCreate()) - this.path = new StringType(); // bb - return this.path; - } - - public boolean hasPathElement() { - return this.path != null && !this.path.isEmpty(); - } - - public boolean hasPath() { - return this.path != null && !this.path.isEmpty(); - } - - /** - * @param value {@link #path} (The path to the element to be customized.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value - */ - public DecisionSupportRuleActionCustomizationComponent setPathElement(StringType value) { - this.path = value; - return this; - } - - /** - * @return The path to the element to be customized. - */ - public String getPath() { - return this.path == null ? null : this.path.getValue(); - } - - /** - * @param value The path to the element to be customized. - */ - public DecisionSupportRuleActionCustomizationComponent setPath(String value) { - if (this.path == null) - this.path = new StringType(); - this.path.setValue(value); - return this; - } - - /** - * @return {@link #expression} (An expression specifying the value of the customized element.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value - */ - public StringType getExpressionElement() { - if (this.expression == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportRuleActionCustomizationComponent.expression"); - else if (Configuration.doAutoCreate()) - this.expression = new StringType(); // bb - return this.expression; - } - - public boolean hasExpressionElement() { - return this.expression != null && !this.expression.isEmpty(); - } - - public boolean hasExpression() { - return this.expression != null && !this.expression.isEmpty(); - } - - /** - * @param value {@link #expression} (An expression specifying the value of the customized element.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value - */ - public DecisionSupportRuleActionCustomizationComponent setExpressionElement(StringType value) { - this.expression = value; - return this; - } - - /** - * @return An expression specifying the value of the customized element. - */ - public String getExpression() { - return this.expression == null ? null : this.expression.getValue(); - } - - /** - * @param value An expression specifying the value of the customized element. - */ - public DecisionSupportRuleActionCustomizationComponent setExpression(String value) { - if (this.expression == null) - this.expression = new StringType(); - this.expression.setValue(value); - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("path", "string", "The path to the element to be customized.", 0, java.lang.Integer.MAX_VALUE, path)); - childrenList.add(new Property("expression", "string", "An expression specifying the value of the customized element.", 0, java.lang.Integer.MAX_VALUE, expression)); - } - - @Override - public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("path")) - this.path = castToString(value); // StringType - else if (name.equals("expression")) - this.expression = castToString(value); // StringType - else - super.setProperty(name, value); - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("path")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.path"); - } - else if (name.equals("expression")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.expression"); - } - else - return super.addChild(name); - } - - public DecisionSupportRuleActionCustomizationComponent copy() { - DecisionSupportRuleActionCustomizationComponent dst = new DecisionSupportRuleActionCustomizationComponent(); - copyValues(dst); - dst.path = path == null ? null : path.copy(); - dst.expression = expression == null ? null : expression.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof DecisionSupportRuleActionCustomizationComponent)) - return false; - DecisionSupportRuleActionCustomizationComponent o = (DecisionSupportRuleActionCustomizationComponent) other; - return compareDeep(path, o.path, true) && compareDeep(expression, o.expression, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof DecisionSupportRuleActionCustomizationComponent)) - return false; - DecisionSupportRuleActionCustomizationComponent o = (DecisionSupportRuleActionCustomizationComponent) other; - return compareValues(path, o.path, true) && compareValues(expression, o.expression, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (path == null || path.isEmpty()) && (expression == null || expression.isEmpty()) - ; - } - - public String fhirType() { - return "DecisionSupportRule.action.customization"; - - } - - } - - /** - * A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact. - */ - @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Logical identifier", formalDefinition="A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact." ) - protected List identifier; - - /** - * The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. - */ - @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The version of the module, if any", formalDefinition="The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification." ) - protected StringType version; - - /** - * A reference to a ModuleMetadata resource that provides metadata for the rule. - */ - @Child(name = "moduleMetadata", type = {ModuleMetadata.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Module information for the rule", formalDefinition="A reference to a ModuleMetadata resource that provides metadata for the rule." ) - protected Reference moduleMetadata; - - /** - * The actual object that is the target of the reference (A reference to a ModuleMetadata resource that provides metadata for the rule.) - */ - protected ModuleMetadata moduleMetadataTarget; + @Child(name = "moduleMetadata", type = {ModuleMetadata.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Module information for the rule", formalDefinition="The metadata for the decision support rule, including publishing, life-cycle, version, documentation, and supporting evidence." ) + protected ModuleMetadata moduleMetadata; /** * A reference to a Library containing the formal logic used by the rule. */ - @Child(name = "library", type = {Library.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="A library containing logic used by the rule", formalDefinition="A reference to a Library containing the formal logic used by the rule." ) + @Child(name = "library", type = {Library.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Logic used within the rule", formalDefinition="A reference to a Library containing the formal logic used by the rule." ) protected List library; /** * The actual objects that are the target of the reference (A reference to a Library containing the formal logic used by the rule.) @@ -1830,27 +67,27 @@ public class DecisionSupportRule extends DomainResource { /** - * A description of a triggering event. + * The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow. */ - @Child(name = "trigger", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="A description of a triggering event." ) - protected List trigger; + @Child(name = "trigger", type = {TriggerDefinition.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="\"when\" the rule should be invoked", formalDefinition="The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow." ) + protected List trigger; /** - * The condition for the artifact. + * The condition element describes he "if" portion of the rule that determines whether or not the rule "fires". The condition must be the name of an expression in a referenced library. */ - @Child(name = "condition", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The condition for the artifact." ) + @Child(name = "condition", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="\"if\" some condition is true", formalDefinition="The condition element describes he \"if\" portion of the rule that determines whether or not the rule \"fires\". The condition must be the name of an expression in a referenced library." ) protected StringType condition; /** - * The definition of the actions that should be returned by evaluation of the artifact. + * The action element defines the "when" portion of the rule that determines what actions should be performed if the condition evaluates to true. */ - @Child(name = "action", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The definition of the actions that should be returned by evaluation of the artifact." ) - protected List action; + @Child(name = "action", type = {ActionDefinition.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="\"then\" perform these actions", formalDefinition="The action element defines the \"when\" portion of the rule that determines what actions should be performed if the condition evaluates to true." ) + protected List action; - private static final long serialVersionUID = 1585395635L; + private static final long serialVersionUID = -810482843L; /** * Constructor @@ -1860,103 +97,14 @@ public class DecisionSupportRule extends DomainResource { } /** - * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + * @return {@link #moduleMetadata} (The metadata for the decision support rule, including publishing, life-cycle, version, documentation, and supporting evidence.) */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - // syntactic sugar - public DecisionSupportRule addIdentifier(Identifier t) { //3 - if (t == null) - return this; - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return this; - } - - /** - * @return {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value - */ - public StringType getVersionElement() { - if (this.version == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportRule.version"); - else if (Configuration.doAutoCreate()) - this.version = new StringType(); // bb - return this.version; - } - - public boolean hasVersionElement() { - return this.version != null && !this.version.isEmpty(); - } - - public boolean hasVersion() { - return this.version != null && !this.version.isEmpty(); - } - - /** - * @param value {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value - */ - public DecisionSupportRule setVersionElement(StringType value) { - this.version = value; - return this; - } - - /** - * @return The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. - */ - public String getVersion() { - return this.version == null ? null : this.version.getValue(); - } - - /** - * @param value The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. - */ - public DecisionSupportRule setVersion(String value) { - if (Utilities.noString(value)) - this.version = null; - else { - if (this.version == null) - this.version = new StringType(); - this.version.setValue(value); - } - return this; - } - - /** - * @return {@link #moduleMetadata} (A reference to a ModuleMetadata resource that provides metadata for the rule.) - */ - public Reference getModuleMetadata() { + public ModuleMetadata getModuleMetadata() { if (this.moduleMetadata == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create DecisionSupportRule.moduleMetadata"); else if (Configuration.doAutoCreate()) - this.moduleMetadata = new Reference(); // cc + this.moduleMetadata = new ModuleMetadata(); // cc return this.moduleMetadata; } @@ -1965,33 +113,13 @@ public class DecisionSupportRule extends DomainResource { } /** - * @param value {@link #moduleMetadata} (A reference to a ModuleMetadata resource that provides metadata for the rule.) + * @param value {@link #moduleMetadata} (The metadata for the decision support rule, including publishing, life-cycle, version, documentation, and supporting evidence.) */ - public DecisionSupportRule setModuleMetadata(Reference value) { + public DecisionSupportRule setModuleMetadata(ModuleMetadata value) { this.moduleMetadata = value; return this; } - /** - * @return {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource that provides metadata for the rule.) - */ - public ModuleMetadata getModuleMetadataTarget() { - if (this.moduleMetadataTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportRule.moduleMetadata"); - else if (Configuration.doAutoCreate()) - this.moduleMetadataTarget = new ModuleMetadata(); // aa - return this.moduleMetadataTarget; - } - - /** - * @param value {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource that provides metadata for the rule.) - */ - public DecisionSupportRule setModuleMetadataTarget(ModuleMetadata value) { - this.moduleMetadataTarget = value; - return this; - } - /** * @return {@link #library} (A reference to a Library containing the formal logic used by the rule.) */ @@ -2054,47 +182,47 @@ public class DecisionSupportRule extends DomainResource { } /** - * @return {@link #trigger} (A description of a triggering event.) + * @return {@link #trigger} (The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow.) */ - public List getTrigger() { + public List getTrigger() { if (this.trigger == null) - this.trigger = new ArrayList(); + this.trigger = new ArrayList(); return this.trigger; } public boolean hasTrigger() { if (this.trigger == null) return false; - for (DecisionSupportRuleTriggerComponent item : this.trigger) + for (TriggerDefinition item : this.trigger) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #trigger} (A description of a triggering event.) + * @return {@link #trigger} (The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow.) */ // syntactic sugar - public DecisionSupportRuleTriggerComponent addTrigger() { //3 - DecisionSupportRuleTriggerComponent t = new DecisionSupportRuleTriggerComponent(); + public TriggerDefinition addTrigger() { //3 + TriggerDefinition t = new TriggerDefinition(); if (this.trigger == null) - this.trigger = new ArrayList(); + this.trigger = new ArrayList(); this.trigger.add(t); return t; } // syntactic sugar - public DecisionSupportRule addTrigger(DecisionSupportRuleTriggerComponent t) { //3 + public DecisionSupportRule addTrigger(TriggerDefinition t) { //3 if (t == null) return this; if (this.trigger == null) - this.trigger = new ArrayList(); + this.trigger = new ArrayList(); this.trigger.add(t); return this; } /** - * @return {@link #condition} (The condition for the artifact.). This is the underlying object with id, value and extensions. The accessor "getCondition" gives direct access to the value + * @return {@link #condition} (The condition element describes he "if" portion of the rule that determines whether or not the rule "fires". The condition must be the name of an expression in a referenced library.). This is the underlying object with id, value and extensions. The accessor "getCondition" gives direct access to the value */ public StringType getConditionElement() { if (this.condition == null) @@ -2114,7 +242,7 @@ public class DecisionSupportRule extends DomainResource { } /** - * @param value {@link #condition} (The condition for the artifact.). This is the underlying object with id, value and extensions. The accessor "getCondition" gives direct access to the value + * @param value {@link #condition} (The condition element describes he "if" portion of the rule that determines whether or not the rule "fires". The condition must be the name of an expression in a referenced library.). This is the underlying object with id, value and extensions. The accessor "getCondition" gives direct access to the value */ public DecisionSupportRule setConditionElement(StringType value) { this.condition = value; @@ -2122,14 +250,14 @@ public class DecisionSupportRule extends DomainResource { } /** - * @return The condition for the artifact. + * @return The condition element describes he "if" portion of the rule that determines whether or not the rule "fires". The condition must be the name of an expression in a referenced library. */ public String getCondition() { return this.condition == null ? null : this.condition.getValue(); } /** - * @param value The condition for the artifact. + * @param value The condition element describes he "if" portion of the rule that determines whether or not the rule "fires". The condition must be the name of an expression in a referenced library. */ public DecisionSupportRule setCondition(String value) { if (Utilities.noString(value)) @@ -2143,86 +271,74 @@ public class DecisionSupportRule extends DomainResource { } /** - * @return {@link #action} (The definition of the actions that should be returned by evaluation of the artifact.) + * @return {@link #action} (The action element defines the "when" portion of the rule that determines what actions should be performed if the condition evaluates to true.) */ - public List getAction() { + public List getAction() { if (this.action == null) - this.action = new ArrayList(); + this.action = new ArrayList(); return this.action; } public boolean hasAction() { if (this.action == null) return false; - for (DecisionSupportRuleActionComponent item : this.action) + for (ActionDefinition item : this.action) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #action} (The definition of the actions that should be returned by evaluation of the artifact.) + * @return {@link #action} (The action element defines the "when" portion of the rule that determines what actions should be performed if the condition evaluates to true.) */ // syntactic sugar - public DecisionSupportRuleActionComponent addAction() { //3 - DecisionSupportRuleActionComponent t = new DecisionSupportRuleActionComponent(); + public ActionDefinition addAction() { //3 + ActionDefinition t = new ActionDefinition(); if (this.action == null) - this.action = new ArrayList(); + this.action = new ArrayList(); this.action.add(t); return t; } // syntactic sugar - public DecisionSupportRule addAction(DecisionSupportRuleActionComponent t) { //3 + public DecisionSupportRule addAction(ActionDefinition t) { //3 if (t == null) return this; if (this.action == null) - this.action = new ArrayList(); + this.action = new ArrayList(); this.action.add(t); return this; } protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("version", "string", "The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.", 0, java.lang.Integer.MAX_VALUE, version)); - childrenList.add(new Property("moduleMetadata", "Reference(ModuleMetadata)", "A reference to a ModuleMetadata resource that provides metadata for the rule.", 0, java.lang.Integer.MAX_VALUE, moduleMetadata)); + childrenList.add(new Property("moduleMetadata", "ModuleMetadata", "The metadata for the decision support rule, including publishing, life-cycle, version, documentation, and supporting evidence.", 0, java.lang.Integer.MAX_VALUE, moduleMetadata)); childrenList.add(new Property("library", "Reference(Library)", "A reference to a Library containing the formal logic used by the rule.", 0, java.lang.Integer.MAX_VALUE, library)); - childrenList.add(new Property("trigger", "", "A description of a triggering event.", 0, java.lang.Integer.MAX_VALUE, trigger)); - childrenList.add(new Property("condition", "string", "The condition for the artifact.", 0, java.lang.Integer.MAX_VALUE, condition)); - childrenList.add(new Property("action", "", "The definition of the actions that should be returned by evaluation of the artifact.", 0, java.lang.Integer.MAX_VALUE, action)); + childrenList.add(new Property("trigger", "TriggerDefinition", "The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow.", 0, java.lang.Integer.MAX_VALUE, trigger)); + childrenList.add(new Property("condition", "string", "The condition element describes he \"if\" portion of the rule that determines whether or not the rule \"fires\". The condition must be the name of an expression in a referenced library.", 0, java.lang.Integer.MAX_VALUE, condition)); + childrenList.add(new Property("action", "ActionDefinition", "The action element defines the \"when\" portion of the rule that determines what actions should be performed if the condition evaluates to true.", 0, java.lang.Integer.MAX_VALUE, action)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("identifier")) - this.getIdentifier().add(castToIdentifier(value)); - else if (name.equals("version")) - this.version = castToString(value); // StringType - else if (name.equals("moduleMetadata")) - this.moduleMetadata = castToReference(value); // Reference + if (name.equals("moduleMetadata")) + this.moduleMetadata = castToModuleMetadata(value); // ModuleMetadata else if (name.equals("library")) this.getLibrary().add(castToReference(value)); else if (name.equals("trigger")) - this.getTrigger().add((DecisionSupportRuleTriggerComponent) value); + this.getTrigger().add(castToTriggerDefinition(value)); else if (name.equals("condition")) this.condition = castToString(value); // StringType else if (name.equals("action")) - this.getAction().add((DecisionSupportRuleActionComponent) value); + this.getAction().add(castToActionDefinition(value)); else super.setProperty(name, value); } @Override public Base addChild(String name) throws FHIRException { - if (name.equals("identifier")) { - return addIdentifier(); - } - else if (name.equals("version")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportRule.version"); - } - else if (name.equals("moduleMetadata")) { - this.moduleMetadata = new Reference(); + if (name.equals("moduleMetadata")) { + this.moduleMetadata = new ModuleMetadata(); return this.moduleMetadata; } else if (name.equals("library")) { @@ -2249,12 +365,6 @@ public class DecisionSupportRule extends DomainResource { public DecisionSupportRule copy() { DecisionSupportRule dst = new DecisionSupportRule(); copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.version = version == null ? null : version.copy(); dst.moduleMetadata = moduleMetadata == null ? null : moduleMetadata.copy(); if (library != null) { dst.library = new ArrayList(); @@ -2262,14 +372,14 @@ public class DecisionSupportRule extends DomainResource { dst.library.add(i.copy()); }; if (trigger != null) { - dst.trigger = new ArrayList(); - for (DecisionSupportRuleTriggerComponent i : trigger) + dst.trigger = new ArrayList(); + for (TriggerDefinition i : trigger) dst.trigger.add(i.copy()); }; dst.condition = condition == null ? null : condition.copy(); if (action != null) { - dst.action = new ArrayList(); - for (DecisionSupportRuleActionComponent i : action) + dst.action = new ArrayList(); + for (ActionDefinition i : action) dst.action.add(i.copy()); }; return dst; @@ -2286,9 +396,9 @@ public class DecisionSupportRule extends DomainResource { if (!(other instanceof DecisionSupportRule)) return false; DecisionSupportRule o = (DecisionSupportRule) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(moduleMetadata, o.moduleMetadata, true) - && compareDeep(library, o.library, true) && compareDeep(trigger, o.trigger, true) && compareDeep(condition, o.condition, true) - && compareDeep(action, o.action, true); + return compareDeep(moduleMetadata, o.moduleMetadata, true) && compareDeep(library, o.library, true) + && compareDeep(trigger, o.trigger, true) && compareDeep(condition, o.condition, true) && compareDeep(action, o.action, true) + ; } @Override @@ -2298,14 +408,12 @@ public class DecisionSupportRule extends DomainResource { if (!(other instanceof DecisionSupportRule)) return false; DecisionSupportRule o = (DecisionSupportRule) other; - return compareValues(version, o.version, true) && compareValues(condition, o.condition, true); + return compareValues(condition, o.condition, true); } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) - && (moduleMetadata == null || moduleMetadata.isEmpty()) && (library == null || library.isEmpty()) - && (trigger == null || trigger.isEmpty()) && (condition == null || condition.isEmpty()) && (action == null || action.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( moduleMetadata, library, trigger + , condition, action); } @Override @@ -2313,6 +421,126 @@ public class DecisionSupportRule extends DomainResource { return ResourceType.DecisionSupportRule; } + /** + * Search parameter: identifier + *

+ * Description: Logical identifier for the module (e.g. CMS-143)
+ * Type: token
+ * Path: DecisionSupportRule.moduleMetadata.identifier
+ *

+ */ + @SearchParamDefinition(name="identifier", path="DecisionSupportRule.moduleMetadata.identifier", description="Logical identifier for the module (e.g. CMS-143)", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + /** + * Fluent Client search parameter constant for identifier + *

+ * Description: Logical identifier for the module (e.g. CMS-143)
+ * Type: token
+ * Path: DecisionSupportRule.moduleMetadata.identifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); + + /** + * Search parameter: topic + *

+ * Description: Topics associated with the module
+ * Type: token
+ * Path: DecisionSupportRule.moduleMetadata.topic
+ *

+ */ + @SearchParamDefinition(name="topic", path="DecisionSupportRule.moduleMetadata.topic", description="Topics associated with the module", type="token" ) + public static final String SP_TOPIC = "topic"; + /** + * Fluent Client search parameter constant for topic + *

+ * Description: Topics associated with the module
+ * Type: token
+ * Path: DecisionSupportRule.moduleMetadata.topic
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TOPIC); + + /** + * Search parameter: description + *

+ * Description: Text search against the description
+ * Type: string
+ * Path: DecisionSupportRule.moduleMetadata.description
+ *

+ */ + @SearchParamDefinition(name="description", path="DecisionSupportRule.moduleMetadata.description", description="Text search against the description", type="string" ) + public static final String SP_DESCRIPTION = "description"; + /** + * Fluent Client search parameter constant for description + *

+ * Description: Text search against the description
+ * Type: string
+ * Path: DecisionSupportRule.moduleMetadata.description
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); + + /** + * Search parameter: title + *

+ * Description: Text search against the title
+ * Type: string
+ * Path: DecisionSupportRule.moduleMetadata.title
+ *

+ */ + @SearchParamDefinition(name="title", path="DecisionSupportRule.moduleMetadata.title", description="Text search against the title", type="string" ) + public static final String SP_TITLE = "title"; + /** + * Fluent Client search parameter constant for title + *

+ * Description: Text search against the title
+ * Type: string
+ * Path: DecisionSupportRule.moduleMetadata.title
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); + + /** + * Search parameter: version + *

+ * Description: Version of the module (e.g. 1.0.0)
+ * Type: string
+ * Path: DecisionSupportRule.moduleMetadata.version
+ *

+ */ + @SearchParamDefinition(name="version", path="DecisionSupportRule.moduleMetadata.version", description="Version of the module (e.g. 1.0.0)", type="string" ) + public static final String SP_VERSION = "version"; + /** + * Fluent Client search parameter constant for version + *

+ * Description: Version of the module (e.g. 1.0.0)
+ * Type: string
+ * Path: DecisionSupportRule.moduleMetadata.version
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam VERSION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_VERSION); + + /** + * Search parameter: status + *

+ * Description: Status of the module
+ * Type: token
+ * Path: DecisionSupportRule.moduleMetadata.status
+ *

+ */ + @SearchParamDefinition(name="status", path="DecisionSupportRule.moduleMetadata.status", description="Status of the module", type="token" ) + public static final String SP_STATUS = "status"; + /** + * Fluent Client search parameter constant for status + *

+ * Description: Status of the module
+ * Type: token
+ * Path: DecisionSupportRule.moduleMetadata.status
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); + } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DecisionSupportServiceModule.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DecisionSupportServiceModule.java index 1cf1af48885..5a19c2cd953 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DecisionSupportServiceModule.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DecisionSupportServiceModule.java @@ -29,1086 +29,52 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; -import org.hl7.fhir.utilities.Utilities; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** - * The DecisionSupportServiceModule resource describes decision support functionality that is available as a service. + * The DecisionSupportServiceModule describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking. */ @ResourceDef(name="DecisionSupportServiceModule", profile="http://hl7.org/fhir/Profile/DecisionSupportServiceModule") public class DecisionSupportServiceModule extends DomainResource { - @Block() - public static class DecisionSupportServiceModuleParameterComponent extends BackboneElement implements IBaseBackboneElement { - /** - * The name of the parameter. - */ - @Child(name = "name", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Parameter name", formalDefinition="The name of the parameter." ) - protected CodeType name; - - /** - * Whether the parameter is input or output for the module. - */ - @Child(name = "use", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Whether the parameter is input or output for the module." ) - protected CodeType use; - - /** - * A brief discussion of what the parameter is for and how it is used by the module. - */ - @Child(name = "documentation", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="A brief description of the parameter", formalDefinition="A brief discussion of what the parameter is for and how it is used by the module." ) - protected StringType documentation; - - /** - * The type of the parameter. - */ - @Child(name = "type", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The type of the parameter." ) - protected CodeType type; - - /** - * If specified, this indicates a profile that the input data must conform to, or that the output data will conform to. - */ - @Child(name = "profile", type = {StructureDefinition.class}, order=5, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The profile of the parameter, any", formalDefinition="If specified, this indicates a profile that the input data must conform to, or that the output data will conform to." ) - protected Reference profile; - - /** - * The actual object that is the target of the reference (If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.) - */ - protected StructureDefinition profileTarget; - - /** - * Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available. - */ - @Child(name = "mustSupport", type = {StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Indicates that specific structure elements are referenced by the knowledge module", formalDefinition="Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available." ) - protected List mustSupport; - - /** - * Indicates that incoming data for this parameter is expected to match the given code filter. In other words, every instance should have a value for the path element that comes from the specified value set (or list of concepts). - */ - @Child(name = "codeFilter", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Code filters for the required data, if any", formalDefinition="Indicates that incoming data for this parameter is expected to match the given code filter. In other words, every instance should have a value for the path element that comes from the specified value set (or list of concepts)." ) - protected List codeFilter; - - /** - * Indicates that incoming data for this parameter is expected to match the given date filter. In other words, every instance should have a value for the path element that is equal to the given datetime (or within the given Period). - */ - @Child(name = "dateFilter", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Date filters for the required data, if any", formalDefinition="Indicates that incoming data for this parameter is expected to match the given date filter. In other words, every instance should have a value for the path element that is equal to the given datetime (or within the given Period)." ) - protected List dateFilter; - - private static final long serialVersionUID = 484857813L; + /** + * The metadata for the decision support service module, including publishing, life-cycle, version, documentation, and supporting evidence. + */ + @Child(name = "moduleMetadata", type = {ModuleMetadata.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Metadata for the service module", formalDefinition="The metadata for the decision support service module, including publishing, life-cycle, version, documentation, and supporting evidence." ) + protected ModuleMetadata moduleMetadata; /** - * Constructor + * The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow. */ - public DecisionSupportServiceModuleParameterComponent() { - super(); - } - - /** - * Constructor - */ - public DecisionSupportServiceModuleParameterComponent(CodeType use, CodeType type) { - super(); - this.use = use; - this.type = type; - } - - /** - * @return {@link #name} (The name of the parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value - */ - public CodeType getNameElement() { - if (this.name == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportServiceModuleParameterComponent.name"); - else if (Configuration.doAutoCreate()) - this.name = new CodeType(); // bb - return this.name; - } - - public boolean hasNameElement() { - return this.name != null && !this.name.isEmpty(); - } - - public boolean hasName() { - return this.name != null && !this.name.isEmpty(); - } - - /** - * @param value {@link #name} (The name of the parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value - */ - public DecisionSupportServiceModuleParameterComponent setNameElement(CodeType value) { - this.name = value; - return this; - } - - /** - * @return The name of the parameter. - */ - public String getName() { - return this.name == null ? null : this.name.getValue(); - } - - /** - * @param value The name of the parameter. - */ - public DecisionSupportServiceModuleParameterComponent setName(String value) { - if (Utilities.noString(value)) - this.name = null; - else { - if (this.name == null) - this.name = new CodeType(); - this.name.setValue(value); - } - return this; - } - - /** - * @return {@link #use} (Whether the parameter is input or output for the module.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value - */ - public CodeType getUseElement() { - if (this.use == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportServiceModuleParameterComponent.use"); - else if (Configuration.doAutoCreate()) - this.use = new CodeType(); // bb - return this.use; - } - - public boolean hasUseElement() { - return this.use != null && !this.use.isEmpty(); - } - - public boolean hasUse() { - return this.use != null && !this.use.isEmpty(); - } - - /** - * @param value {@link #use} (Whether the parameter is input or output for the module.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value - */ - public DecisionSupportServiceModuleParameterComponent setUseElement(CodeType value) { - this.use = value; - return this; - } - - /** - * @return Whether the parameter is input or output for the module. - */ - public String getUse() { - return this.use == null ? null : this.use.getValue(); - } - - /** - * @param value Whether the parameter is input or output for the module. - */ - public DecisionSupportServiceModuleParameterComponent setUse(String value) { - if (this.use == null) - this.use = new CodeType(); - this.use.setValue(value); - return this; - } - - /** - * @return {@link #documentation} (A brief discussion of what the parameter is for and how it is used by the module.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value - */ - public StringType getDocumentationElement() { - if (this.documentation == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportServiceModuleParameterComponent.documentation"); - else if (Configuration.doAutoCreate()) - this.documentation = new StringType(); // bb - return this.documentation; - } - - public boolean hasDocumentationElement() { - return this.documentation != null && !this.documentation.isEmpty(); - } - - public boolean hasDocumentation() { - return this.documentation != null && !this.documentation.isEmpty(); - } - - /** - * @param value {@link #documentation} (A brief discussion of what the parameter is for and how it is used by the module.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value - */ - public DecisionSupportServiceModuleParameterComponent setDocumentationElement(StringType value) { - this.documentation = value; - return this; - } - - /** - * @return A brief discussion of what the parameter is for and how it is used by the module. - */ - public String getDocumentation() { - return this.documentation == null ? null : this.documentation.getValue(); - } - - /** - * @param value A brief discussion of what the parameter is for and how it is used by the module. - */ - public DecisionSupportServiceModuleParameterComponent setDocumentation(String value) { - if (Utilities.noString(value)) - this.documentation = null; - else { - if (this.documentation == null) - this.documentation = new StringType(); - this.documentation.setValue(value); - } - return this; - } - - /** - * @return {@link #type} (The type of the parameter.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value - */ - public CodeType getTypeElement() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportServiceModuleParameterComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new CodeType(); // bb - return this.type; - } - - public boolean hasTypeElement() { - return this.type != null && !this.type.isEmpty(); - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of the parameter.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value - */ - public DecisionSupportServiceModuleParameterComponent setTypeElement(CodeType value) { - this.type = value; - return this; - } - - /** - * @return The type of the parameter. - */ - public String getType() { - return this.type == null ? null : this.type.getValue(); - } - - /** - * @param value The type of the parameter. - */ - public DecisionSupportServiceModuleParameterComponent setType(String value) { - if (this.type == null) - this.type = new CodeType(); - this.type.setValue(value); - return this; - } - - /** - * @return {@link #profile} (If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.) - */ - public Reference getProfile() { - if (this.profile == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportServiceModuleParameterComponent.profile"); - else if (Configuration.doAutoCreate()) - this.profile = new Reference(); // cc - return this.profile; - } - - public boolean hasProfile() { - return this.profile != null && !this.profile.isEmpty(); - } - - /** - * @param value {@link #profile} (If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.) - */ - public DecisionSupportServiceModuleParameterComponent setProfile(Reference value) { - this.profile = value; - return this; - } - - /** - * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.) - */ - public StructureDefinition getProfileTarget() { - if (this.profileTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportServiceModuleParameterComponent.profile"); - else if (Configuration.doAutoCreate()) - this.profileTarget = new StructureDefinition(); // aa - return this.profileTarget; - } - - /** - * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.) - */ - public DecisionSupportServiceModuleParameterComponent setProfileTarget(StructureDefinition value) { - this.profileTarget = value; - return this; - } - - /** - * @return {@link #mustSupport} (Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.) - */ - public List getMustSupport() { - if (this.mustSupport == null) - this.mustSupport = new ArrayList(); - return this.mustSupport; - } - - public boolean hasMustSupport() { - if (this.mustSupport == null) - return false; - for (StringType item : this.mustSupport) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #mustSupport} (Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.) - */ - // syntactic sugar - public StringType addMustSupportElement() {//2 - StringType t = new StringType(); - if (this.mustSupport == null) - this.mustSupport = new ArrayList(); - this.mustSupport.add(t); - return t; - } - - /** - * @param value {@link #mustSupport} (Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.) - */ - public DecisionSupportServiceModuleParameterComponent addMustSupport(String value) { //1 - StringType t = new StringType(); - t.setValue(value); - if (this.mustSupport == null) - this.mustSupport = new ArrayList(); - this.mustSupport.add(t); - return this; - } - - /** - * @param value {@link #mustSupport} (Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.) - */ - public boolean hasMustSupport(String value) { - if (this.mustSupport == null) - return false; - for (StringType v : this.mustSupport) - if (v.equals(value)) // string - return true; - return false; - } - - /** - * @return {@link #codeFilter} (Indicates that incoming data for this parameter is expected to match the given code filter. In other words, every instance should have a value for the path element that comes from the specified value set (or list of concepts).) - */ - public List getCodeFilter() { - if (this.codeFilter == null) - this.codeFilter = new ArrayList(); - return this.codeFilter; - } - - public boolean hasCodeFilter() { - if (this.codeFilter == null) - return false; - for (DecisionSupportServiceModuleParameterCodeFilterComponent item : this.codeFilter) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #codeFilter} (Indicates that incoming data for this parameter is expected to match the given code filter. In other words, every instance should have a value for the path element that comes from the specified value set (or list of concepts).) - */ - // syntactic sugar - public DecisionSupportServiceModuleParameterCodeFilterComponent addCodeFilter() { //3 - DecisionSupportServiceModuleParameterCodeFilterComponent t = new DecisionSupportServiceModuleParameterCodeFilterComponent(); - if (this.codeFilter == null) - this.codeFilter = new ArrayList(); - this.codeFilter.add(t); - return t; - } - - // syntactic sugar - public DecisionSupportServiceModuleParameterComponent addCodeFilter(DecisionSupportServiceModuleParameterCodeFilterComponent t) { //3 - if (t == null) - return this; - if (this.codeFilter == null) - this.codeFilter = new ArrayList(); - this.codeFilter.add(t); - return this; - } - - /** - * @return {@link #dateFilter} (Indicates that incoming data for this parameter is expected to match the given date filter. In other words, every instance should have a value for the path element that is equal to the given datetime (or within the given Period).) - */ - public List getDateFilter() { - if (this.dateFilter == null) - this.dateFilter = new ArrayList(); - return this.dateFilter; - } - - public boolean hasDateFilter() { - if (this.dateFilter == null) - return false; - for (DecisionSupportServiceModuleParameterDateFilterComponent item : this.dateFilter) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #dateFilter} (Indicates that incoming data for this parameter is expected to match the given date filter. In other words, every instance should have a value for the path element that is equal to the given datetime (or within the given Period).) - */ - // syntactic sugar - public DecisionSupportServiceModuleParameterDateFilterComponent addDateFilter() { //3 - DecisionSupportServiceModuleParameterDateFilterComponent t = new DecisionSupportServiceModuleParameterDateFilterComponent(); - if (this.dateFilter == null) - this.dateFilter = new ArrayList(); - this.dateFilter.add(t); - return t; - } - - // syntactic sugar - public DecisionSupportServiceModuleParameterComponent addDateFilter(DecisionSupportServiceModuleParameterDateFilterComponent t) { //3 - if (t == null) - return this; - if (this.dateFilter == null) - this.dateFilter = new ArrayList(); - this.dateFilter.add(t); - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("name", "code", "The name of the parameter.", 0, java.lang.Integer.MAX_VALUE, name)); - childrenList.add(new Property("use", "code", "Whether the parameter is input or output for the module.", 0, java.lang.Integer.MAX_VALUE, use)); - childrenList.add(new Property("documentation", "string", "A brief discussion of what the parameter is for and how it is used by the module.", 0, java.lang.Integer.MAX_VALUE, documentation)); - childrenList.add(new Property("type", "code", "The type of the parameter.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("profile", "Reference(StructureDefinition)", "If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.", 0, java.lang.Integer.MAX_VALUE, profile)); - childrenList.add(new Property("mustSupport", "string", "Indicates that specific elements of the type are referenced by the knowledge module and must be supported by the consumer in order to obtain an effective evaluation. This does not mean that a value is required for this element, only that the consuming system must understand the element and be able to provide values for it if they are available.", 0, java.lang.Integer.MAX_VALUE, mustSupport)); - childrenList.add(new Property("codeFilter", "", "Indicates that incoming data for this parameter is expected to match the given code filter. In other words, every instance should have a value for the path element that comes from the specified value set (or list of concepts).", 0, java.lang.Integer.MAX_VALUE, codeFilter)); - childrenList.add(new Property("dateFilter", "", "Indicates that incoming data for this parameter is expected to match the given date filter. In other words, every instance should have a value for the path element that is equal to the given datetime (or within the given Period).", 0, java.lang.Integer.MAX_VALUE, dateFilter)); - } - - @Override - public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("name")) - this.name = castToCode(value); // CodeType - else if (name.equals("use")) - this.use = castToCode(value); // CodeType - else if (name.equals("documentation")) - this.documentation = castToString(value); // StringType - else if (name.equals("type")) - this.type = castToCode(value); // CodeType - else if (name.equals("profile")) - this.profile = castToReference(value); // Reference - else if (name.equals("mustSupport")) - this.getMustSupport().add(castToString(value)); - else if (name.equals("codeFilter")) - this.getCodeFilter().add((DecisionSupportServiceModuleParameterCodeFilterComponent) value); - else if (name.equals("dateFilter")) - this.getDateFilter().add((DecisionSupportServiceModuleParameterDateFilterComponent) value); - else - super.setProperty(name, value); - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("name")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportServiceModule.name"); - } - else if (name.equals("use")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportServiceModule.use"); - } - else if (name.equals("documentation")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportServiceModule.documentation"); - } - else if (name.equals("type")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportServiceModule.type"); - } - else if (name.equals("profile")) { - this.profile = new Reference(); - return this.profile; - } - else if (name.equals("mustSupport")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportServiceModule.mustSupport"); - } - else if (name.equals("codeFilter")) { - return addCodeFilter(); - } - else if (name.equals("dateFilter")) { - return addDateFilter(); - } - else - return super.addChild(name); - } - - public DecisionSupportServiceModuleParameterComponent copy() { - DecisionSupportServiceModuleParameterComponent dst = new DecisionSupportServiceModuleParameterComponent(); - copyValues(dst); - dst.name = name == null ? null : name.copy(); - dst.use = use == null ? null : use.copy(); - dst.documentation = documentation == null ? null : documentation.copy(); - dst.type = type == null ? null : type.copy(); - dst.profile = profile == null ? null : profile.copy(); - if (mustSupport != null) { - dst.mustSupport = new ArrayList(); - for (StringType i : mustSupport) - dst.mustSupport.add(i.copy()); - }; - if (codeFilter != null) { - dst.codeFilter = new ArrayList(); - for (DecisionSupportServiceModuleParameterCodeFilterComponent i : codeFilter) - dst.codeFilter.add(i.copy()); - }; - if (dateFilter != null) { - dst.dateFilter = new ArrayList(); - for (DecisionSupportServiceModuleParameterDateFilterComponent i : dateFilter) - dst.dateFilter.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof DecisionSupportServiceModuleParameterComponent)) - return false; - DecisionSupportServiceModuleParameterComponent o = (DecisionSupportServiceModuleParameterComponent) other; - return compareDeep(name, o.name, true) && compareDeep(use, o.use, true) && compareDeep(documentation, o.documentation, true) - && compareDeep(type, o.type, true) && compareDeep(profile, o.profile, true) && compareDeep(mustSupport, o.mustSupport, true) - && compareDeep(codeFilter, o.codeFilter, true) && compareDeep(dateFilter, o.dateFilter, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof DecisionSupportServiceModuleParameterComponent)) - return false; - DecisionSupportServiceModuleParameterComponent o = (DecisionSupportServiceModuleParameterComponent) other; - return compareValues(name, o.name, true) && compareValues(use, o.use, true) && compareValues(documentation, o.documentation, true) - && compareValues(type, o.type, true) && compareValues(mustSupport, o.mustSupport, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (use == null || use.isEmpty()) - && (documentation == null || documentation.isEmpty()) && (type == null || type.isEmpty()) - && (profile == null || profile.isEmpty()) && (mustSupport == null || mustSupport.isEmpty()) - && (codeFilter == null || codeFilter.isEmpty()) && (dateFilter == null || dateFilter.isEmpty()) - ; - } - - public String fhirType() { - return "DecisionSupportServiceModule.parameter"; - - } - - } - - @Block() - public static class DecisionSupportServiceModuleParameterCodeFilterComponent extends BackboneElement implements IBaseBackboneElement { - /** - * The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept. - */ - @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="The code-valued attribute of the filter", formalDefinition="The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept." ) - protected StringType path; - - /** - * The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset. - */ - @Child(name = "valueSet", type = {UriType.class, ValueSet.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The valueset for the code filter", formalDefinition="The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset." ) - protected Type valueSet; - - /** - * The codeable concept for the code filter. Only one of valueSet or codeableConcept may be specified. If codeableConcepts are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codeable concepts. - */ - @Child(name = "codeableConcept", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="The codeableConcepts for the filter", formalDefinition="The codeable concept for the code filter. Only one of valueSet or codeableConcept may be specified. If codeableConcepts are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codeable concepts." ) - protected List codeableConcept; - - private static final long serialVersionUID = -666343535L; - - /** - * Constructor - */ - public DecisionSupportServiceModuleParameterCodeFilterComponent() { - super(); - } - - /** - * Constructor - */ - public DecisionSupportServiceModuleParameterCodeFilterComponent(StringType path) { - super(); - this.path = path; - } - - /** - * @return {@link #path} (The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value - */ - public StringType getPathElement() { - if (this.path == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportServiceModuleParameterCodeFilterComponent.path"); - else if (Configuration.doAutoCreate()) - this.path = new StringType(); // bb - return this.path; - } - - public boolean hasPathElement() { - return this.path != null && !this.path.isEmpty(); - } - - public boolean hasPath() { - return this.path != null && !this.path.isEmpty(); - } - - /** - * @param value {@link #path} (The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value - */ - public DecisionSupportServiceModuleParameterCodeFilterComponent setPathElement(StringType value) { - this.path = value; - return this; - } - - /** - * @return The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept. - */ - public String getPath() { - return this.path == null ? null : this.path.getValue(); - } - - /** - * @param value The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept. - */ - public DecisionSupportServiceModuleParameterCodeFilterComponent setPath(String value) { - if (this.path == null) - this.path = new StringType(); - this.path.setValue(value); - return this; - } - - /** - * @return {@link #valueSet} (The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) - */ - public Type getValueSet() { - return this.valueSet; - } - - /** - * @return {@link #valueSet} (The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) - */ - public UriType getValueSetUriType() throws FHIRException { - if (!(this.valueSet instanceof UriType)) - throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.valueSet.getClass().getName()+" was encountered"); - return (UriType) this.valueSet; - } - - public boolean hasValueSetUriType() { - return this.valueSet instanceof UriType; - } - - /** - * @return {@link #valueSet} (The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) - */ - public Reference getValueSetReference() throws FHIRException { - if (!(this.valueSet instanceof Reference)) - throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.valueSet.getClass().getName()+" was encountered"); - return (Reference) this.valueSet; - } - - public boolean hasValueSetReference() { - return this.valueSet instanceof Reference; - } - - public boolean hasValueSet() { - return this.valueSet != null && !this.valueSet.isEmpty(); - } - - /** - * @param value {@link #valueSet} (The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.) - */ - public DecisionSupportServiceModuleParameterCodeFilterComponent setValueSet(Type value) { - this.valueSet = value; - return this; - } - - /** - * @return {@link #codeableConcept} (The codeable concept for the code filter. Only one of valueSet or codeableConcept may be specified. If codeableConcepts are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codeable concepts.) - */ - public List getCodeableConcept() { - if (this.codeableConcept == null) - this.codeableConcept = new ArrayList(); - return this.codeableConcept; - } - - public boolean hasCodeableConcept() { - if (this.codeableConcept == null) - return false; - for (CodeableConcept item : this.codeableConcept) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #codeableConcept} (The codeable concept for the code filter. Only one of valueSet or codeableConcept may be specified. If codeableConcepts are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codeable concepts.) - */ - // syntactic sugar - public CodeableConcept addCodeableConcept() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.codeableConcept == null) - this.codeableConcept = new ArrayList(); - this.codeableConcept.add(t); - return t; - } - - // syntactic sugar - public DecisionSupportServiceModuleParameterCodeFilterComponent addCodeableConcept(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.codeableConcept == null) - this.codeableConcept = new ArrayList(); - this.codeableConcept.add(t); - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("path", "string", "The code-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type code, Coding, or CodeableConcept.", 0, java.lang.Integer.MAX_VALUE, path)); - childrenList.add(new Property("valueSet[x]", "uri|Reference(ValueSet)", "The valueset for the code filter. The valueSet or codeableConcept elements are exclusive. If valueSet is specified, the filter will return only those data items for which the value of the code-valued element specified in the path is a member of the specified valueset.", 0, java.lang.Integer.MAX_VALUE, valueSet)); - childrenList.add(new Property("codeableConcept", "CodeableConcept", "The codeable concept for the code filter. Only one of valueSet or codeableConcept may be specified. If codeableConcepts are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified codeable concepts.", 0, java.lang.Integer.MAX_VALUE, codeableConcept)); - } - - @Override - public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("path")) - this.path = castToString(value); // StringType - else if (name.equals("valueSet[x]")) - this.valueSet = (Type) value; // Type - else if (name.equals("codeableConcept")) - this.getCodeableConcept().add(castToCodeableConcept(value)); - else - super.setProperty(name, value); - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("path")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportServiceModule.path"); - } - else if (name.equals("valueSetUri")) { - this.valueSet = new UriType(); - return this.valueSet; - } - else if (name.equals("valueSetReference")) { - this.valueSet = new Reference(); - return this.valueSet; - } - else if (name.equals("codeableConcept")) { - return addCodeableConcept(); - } - else - return super.addChild(name); - } - - public DecisionSupportServiceModuleParameterCodeFilterComponent copy() { - DecisionSupportServiceModuleParameterCodeFilterComponent dst = new DecisionSupportServiceModuleParameterCodeFilterComponent(); - copyValues(dst); - dst.path = path == null ? null : path.copy(); - dst.valueSet = valueSet == null ? null : valueSet.copy(); - if (codeableConcept != null) { - dst.codeableConcept = new ArrayList(); - for (CodeableConcept i : codeableConcept) - dst.codeableConcept.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof DecisionSupportServiceModuleParameterCodeFilterComponent)) - return false; - DecisionSupportServiceModuleParameterCodeFilterComponent o = (DecisionSupportServiceModuleParameterCodeFilterComponent) other; - return compareDeep(path, o.path, true) && compareDeep(valueSet, o.valueSet, true) && compareDeep(codeableConcept, o.codeableConcept, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof DecisionSupportServiceModuleParameterCodeFilterComponent)) - return false; - DecisionSupportServiceModuleParameterCodeFilterComponent o = (DecisionSupportServiceModuleParameterCodeFilterComponent) other; - return compareValues(path, o.path, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (path == null || path.isEmpty()) && (valueSet == null || valueSet.isEmpty()) - && (codeableConcept == null || codeableConcept.isEmpty()); - } - - public String fhirType() { - return "DecisionSupportServiceModule.parameter.codeFilter"; - - } - - } - - @Block() - public static class DecisionSupportServiceModuleParameterDateFilterComponent extends BackboneElement implements IBaseBackboneElement { - /** - * The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing. - */ - @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="The date-valued attribute of the filter", formalDefinition="The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing." ) - protected StringType path; - - /** - * The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime. - */ - @Child(name = "value", type = {DateTimeType.class, Period.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The value of the filter, as a Period or dateTime value", formalDefinition="The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime." ) - protected Type value; - - private static final long serialVersionUID = 1791957163L; - - /** - * Constructor - */ - public DecisionSupportServiceModuleParameterDateFilterComponent() { - super(); - } - - /** - * Constructor - */ - public DecisionSupportServiceModuleParameterDateFilterComponent(StringType path) { - super(); - this.path = path; - } - - /** - * @return {@link #path} (The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value - */ - public StringType getPathElement() { - if (this.path == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportServiceModuleParameterDateFilterComponent.path"); - else if (Configuration.doAutoCreate()) - this.path = new StringType(); // bb - return this.path; - } - - public boolean hasPathElement() { - return this.path != null && !this.path.isEmpty(); - } - - public boolean hasPath() { - return this.path != null && !this.path.isEmpty(); - } - - /** - * @param value {@link #path} (The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value - */ - public DecisionSupportServiceModuleParameterDateFilterComponent setPathElement(StringType value) { - this.path = value; - return this; - } - - /** - * @return The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing. - */ - public String getPath() { - return this.path == null ? null : this.path.getValue(); - } - - /** - * @param value The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing. - */ - public DecisionSupportServiceModuleParameterDateFilterComponent setPath(String value) { - if (this.path == null) - this.path = new StringType(); - this.path.setValue(value); - return this; - } - - /** - * @return {@link #value} (The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.) - */ - public Type getValue() { - return this.value; - } - - /** - * @return {@link #value} (The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.) - */ - public DateTimeType getValueDateTimeType() throws FHIRException { - if (!(this.value instanceof DateTimeType)) - throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered"); - return (DateTimeType) this.value; - } - - public boolean hasValueDateTimeType() { - return this.value instanceof DateTimeType; - } - - /** - * @return {@link #value} (The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.) - */ - public Period getValuePeriod() throws FHIRException { - if (!(this.value instanceof Period)) - throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered"); - return (Period) this.value; - } - - public boolean hasValuePeriod() { - return this.value instanceof Period; - } - - public boolean hasValue() { - return this.value != null && !this.value.isEmpty(); - } - - /** - * @param value {@link #value} (The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.) - */ - public DecisionSupportServiceModuleParameterDateFilterComponent setValue(Type value) { - this.value = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("path", "string", "The date-valued attribute of the filter. The specified path must be resolvable from the type of the required data. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements. Note that the index must be an integer constant. The path must resolve to an element of type dateTime, Period, Schedule, or Timing.", 0, java.lang.Integer.MAX_VALUE, path)); - childrenList.add(new Property("value[x]", "dateTime|Period", "The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.", 0, java.lang.Integer.MAX_VALUE, value)); - } - - @Override - public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("path")) - this.path = castToString(value); // StringType - else if (name.equals("value[x]")) - this.value = (Type) value; // Type - else - super.setProperty(name, value); - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("path")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportServiceModule.path"); - } - else if (name.equals("valueDateTime")) { - this.value = new DateTimeType(); - return this.value; - } - else if (name.equals("valuePeriod")) { - this.value = new Period(); - return this.value; - } - else - return super.addChild(name); - } - - public DecisionSupportServiceModuleParameterDateFilterComponent copy() { - DecisionSupportServiceModuleParameterDateFilterComponent dst = new DecisionSupportServiceModuleParameterDateFilterComponent(); - copyValues(dst); - dst.path = path == null ? null : path.copy(); - dst.value = value == null ? null : value.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof DecisionSupportServiceModuleParameterDateFilterComponent)) - return false; - DecisionSupportServiceModuleParameterDateFilterComponent o = (DecisionSupportServiceModuleParameterDateFilterComponent) other; - return compareDeep(path, o.path, true) && compareDeep(value, o.value, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof DecisionSupportServiceModuleParameterDateFilterComponent)) - return false; - DecisionSupportServiceModuleParameterDateFilterComponent o = (DecisionSupportServiceModuleParameterDateFilterComponent) other; - return compareValues(path, o.path, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (path == null || path.isEmpty()) && (value == null || value.isEmpty()) - ; - } - - public String fhirType() { - return "DecisionSupportServiceModule.parameter.dateFilter"; - - } - - } - - /** - * A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact. - */ - @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Logical identifier", formalDefinition="A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact." ) - protected List identifier; - - /** - * The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. - */ - @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The version of the module, if any", formalDefinition="The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification." ) - protected StringType version; - - /** - * A reference to a ModuleMetadata resource describing the metadata for the decision support service module. - */ - @Child(name = "moduleMetadata", type = {ModuleMetadata.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Metadata for the service module", formalDefinition="A reference to a ModuleMetadata resource describing the metadata for the decision support service module." ) - protected Reference moduleMetadata; - - /** - * The actual object that is the target of the reference (A reference to a ModuleMetadata resource describing the metadata for the decision support service module.) - */ - protected ModuleMetadata moduleMetadataTarget; + @Child(name = "trigger", type = {TriggerDefinition.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="\"when\" the module should be invoked", formalDefinition="The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow." ) + protected List trigger; /** * The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse. */ - @Child(name = "parameter", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "parameter", type = {ParameterDefinition.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Parameters to the module", formalDefinition="The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse." ) - protected List parameter; + protected List parameter; - private static final long serialVersionUID = 1535823227L; + /** + * Data requirements are a machine processable description of the data required by the module in order to perform a successful evaluation. + */ + @Child(name = "dataRequirement", type = {DataRequirement.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Data requirements for the module", formalDefinition="Data requirements are a machine processable description of the data required by the module in order to perform a successful evaluation." ) + protected List dataRequirement; + + private static final long serialVersionUID = 1154664442L; /** * Constructor @@ -1118,103 +84,14 @@ public class DecisionSupportServiceModule extends DomainResource { } /** - * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + * @return {@link #moduleMetadata} (The metadata for the decision support service module, including publishing, life-cycle, version, documentation, and supporting evidence.) */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - // syntactic sugar - public DecisionSupportServiceModule addIdentifier(Identifier t) { //3 - if (t == null) - return this; - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return this; - } - - /** - * @return {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value - */ - public StringType getVersionElement() { - if (this.version == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportServiceModule.version"); - else if (Configuration.doAutoCreate()) - this.version = new StringType(); // bb - return this.version; - } - - public boolean hasVersionElement() { - return this.version != null && !this.version.isEmpty(); - } - - public boolean hasVersion() { - return this.version != null && !this.version.isEmpty(); - } - - /** - * @param value {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value - */ - public DecisionSupportServiceModule setVersionElement(StringType value) { - this.version = value; - return this; - } - - /** - * @return The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. - */ - public String getVersion() { - return this.version == null ? null : this.version.getValue(); - } - - /** - * @param value The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. - */ - public DecisionSupportServiceModule setVersion(String value) { - if (Utilities.noString(value)) - this.version = null; - else { - if (this.version == null) - this.version = new StringType(); - this.version.setValue(value); - } - return this; - } - - /** - * @return {@link #moduleMetadata} (A reference to a ModuleMetadata resource describing the metadata for the decision support service module.) - */ - public Reference getModuleMetadata() { + public ModuleMetadata getModuleMetadata() { if (this.moduleMetadata == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create DecisionSupportServiceModule.moduleMetadata"); else if (Configuration.doAutoCreate()) - this.moduleMetadata = new Reference(); // cc + this.moduleMetadata = new ModuleMetadata(); // cc return this.moduleMetadata; } @@ -1223,46 +100,66 @@ public class DecisionSupportServiceModule extends DomainResource { } /** - * @param value {@link #moduleMetadata} (A reference to a ModuleMetadata resource describing the metadata for the decision support service module.) + * @param value {@link #moduleMetadata} (The metadata for the decision support service module, including publishing, life-cycle, version, documentation, and supporting evidence.) */ - public DecisionSupportServiceModule setModuleMetadata(Reference value) { + public DecisionSupportServiceModule setModuleMetadata(ModuleMetadata value) { this.moduleMetadata = value; return this; } /** - * @return {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource describing the metadata for the decision support service module.) + * @return {@link #trigger} (The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow.) */ - public ModuleMetadata getModuleMetadataTarget() { - if (this.moduleMetadataTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DecisionSupportServiceModule.moduleMetadata"); - else if (Configuration.doAutoCreate()) - this.moduleMetadataTarget = new ModuleMetadata(); // aa - return this.moduleMetadataTarget; + public List getTrigger() { + if (this.trigger == null) + this.trigger = new ArrayList(); + return this.trigger; + } + + public boolean hasTrigger() { + if (this.trigger == null) + return false; + for (TriggerDefinition item : this.trigger) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource describing the metadata for the decision support service module.) + * @return {@link #trigger} (The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow.) */ - public DecisionSupportServiceModule setModuleMetadataTarget(ModuleMetadata value) { - this.moduleMetadataTarget = value; + // syntactic sugar + public TriggerDefinition addTrigger() { //3 + TriggerDefinition t = new TriggerDefinition(); + if (this.trigger == null) + this.trigger = new ArrayList(); + this.trigger.add(t); + return t; + } + + // syntactic sugar + public DecisionSupportServiceModule addTrigger(TriggerDefinition t) { //3 + if (t == null) + return this; + if (this.trigger == null) + this.trigger = new ArrayList(); + this.trigger.add(t); return this; } /** * @return {@link #parameter} (The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.) */ - public List getParameter() { + public List getParameter() { if (this.parameter == null) - this.parameter = new ArrayList(); + this.parameter = new ArrayList(); return this.parameter; } public boolean hasParameter() { if (this.parameter == null) return false; - for (DecisionSupportServiceModuleParameterComponent item : this.parameter) + for (ParameterDefinition item : this.parameter) if (!item.isEmpty()) return true; return false; @@ -1272,61 +169,101 @@ public class DecisionSupportServiceModule extends DomainResource { * @return {@link #parameter} (The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.) */ // syntactic sugar - public DecisionSupportServiceModuleParameterComponent addParameter() { //3 - DecisionSupportServiceModuleParameterComponent t = new DecisionSupportServiceModuleParameterComponent(); + public ParameterDefinition addParameter() { //3 + ParameterDefinition t = new ParameterDefinition(); if (this.parameter == null) - this.parameter = new ArrayList(); + this.parameter = new ArrayList(); this.parameter.add(t); return t; } // syntactic sugar - public DecisionSupportServiceModule addParameter(DecisionSupportServiceModuleParameterComponent t) { //3 + public DecisionSupportServiceModule addParameter(ParameterDefinition t) { //3 if (t == null) return this; if (this.parameter == null) - this.parameter = new ArrayList(); + this.parameter = new ArrayList(); this.parameter.add(t); return this; } + /** + * @return {@link #dataRequirement} (Data requirements are a machine processable description of the data required by the module in order to perform a successful evaluation.) + */ + public List getDataRequirement() { + if (this.dataRequirement == null) + this.dataRequirement = new ArrayList(); + return this.dataRequirement; + } + + public boolean hasDataRequirement() { + if (this.dataRequirement == null) + return false; + for (DataRequirement item : this.dataRequirement) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dataRequirement} (Data requirements are a machine processable description of the data required by the module in order to perform a successful evaluation.) + */ + // syntactic sugar + public DataRequirement addDataRequirement() { //3 + DataRequirement t = new DataRequirement(); + if (this.dataRequirement == null) + this.dataRequirement = new ArrayList(); + this.dataRequirement.add(t); + return t; + } + + // syntactic sugar + public DecisionSupportServiceModule addDataRequirement(DataRequirement t) { //3 + if (t == null) + return this; + if (this.dataRequirement == null) + this.dataRequirement = new ArrayList(); + this.dataRequirement.add(t); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("version", "string", "The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.", 0, java.lang.Integer.MAX_VALUE, version)); - childrenList.add(new Property("moduleMetadata", "Reference(ModuleMetadata)", "A reference to a ModuleMetadata resource describing the metadata for the decision support service module.", 0, java.lang.Integer.MAX_VALUE, moduleMetadata)); - childrenList.add(new Property("parameter", "", "The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.", 0, java.lang.Integer.MAX_VALUE, parameter)); + childrenList.add(new Property("moduleMetadata", "ModuleMetadata", "The metadata for the decision support service module, including publishing, life-cycle, version, documentation, and supporting evidence.", 0, java.lang.Integer.MAX_VALUE, moduleMetadata)); + childrenList.add(new Property("trigger", "TriggerDefinition", "The trigger element defines when the rule should be invoked. This information is used by consumers of the rule to determine how to integrate the rule into a specific workflow.", 0, java.lang.Integer.MAX_VALUE, trigger)); + childrenList.add(new Property("parameter", "ParameterDefinition", "The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.", 0, java.lang.Integer.MAX_VALUE, parameter)); + childrenList.add(new Property("dataRequirement", "DataRequirement", "Data requirements are a machine processable description of the data required by the module in order to perform a successful evaluation.", 0, java.lang.Integer.MAX_VALUE, dataRequirement)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("identifier")) - this.getIdentifier().add(castToIdentifier(value)); - else if (name.equals("version")) - this.version = castToString(value); // StringType - else if (name.equals("moduleMetadata")) - this.moduleMetadata = castToReference(value); // Reference + if (name.equals("moduleMetadata")) + this.moduleMetadata = castToModuleMetadata(value); // ModuleMetadata + else if (name.equals("trigger")) + this.getTrigger().add(castToTriggerDefinition(value)); else if (name.equals("parameter")) - this.getParameter().add((DecisionSupportServiceModuleParameterComponent) value); + this.getParameter().add(castToParameterDefinition(value)); + else if (name.equals("dataRequirement")) + this.getDataRequirement().add(castToDataRequirement(value)); else super.setProperty(name, value); } @Override public Base addChild(String name) throws FHIRException { - if (name.equals("identifier")) { - return addIdentifier(); - } - else if (name.equals("version")) { - throw new FHIRException("Cannot call addChild on a primitive type DecisionSupportServiceModule.version"); - } - else if (name.equals("moduleMetadata")) { - this.moduleMetadata = new Reference(); + if (name.equals("moduleMetadata")) { + this.moduleMetadata = new ModuleMetadata(); return this.moduleMetadata; } + else if (name.equals("trigger")) { + return addTrigger(); + } else if (name.equals("parameter")) { return addParameter(); } + else if (name.equals("dataRequirement")) { + return addDataRequirement(); + } else return super.addChild(name); } @@ -1339,18 +276,22 @@ public class DecisionSupportServiceModule extends DomainResource { public DecisionSupportServiceModule copy() { DecisionSupportServiceModule dst = new DecisionSupportServiceModule(); copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.version = version == null ? null : version.copy(); dst.moduleMetadata = moduleMetadata == null ? null : moduleMetadata.copy(); + if (trigger != null) { + dst.trigger = new ArrayList(); + for (TriggerDefinition i : trigger) + dst.trigger.add(i.copy()); + }; if (parameter != null) { - dst.parameter = new ArrayList(); - for (DecisionSupportServiceModuleParameterComponent i : parameter) + dst.parameter = new ArrayList(); + for (ParameterDefinition i : parameter) dst.parameter.add(i.copy()); }; + if (dataRequirement != null) { + dst.dataRequirement = new ArrayList(); + for (DataRequirement i : dataRequirement) + dst.dataRequirement.add(i.copy()); + }; return dst; } @@ -1365,8 +306,9 @@ public class DecisionSupportServiceModule extends DomainResource { if (!(other instanceof DecisionSupportServiceModule)) return false; DecisionSupportServiceModule o = (DecisionSupportServiceModule) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(moduleMetadata, o.moduleMetadata, true) - && compareDeep(parameter, o.parameter, true); + return compareDeep(moduleMetadata, o.moduleMetadata, true) && compareDeep(trigger, o.trigger, true) + && compareDeep(parameter, o.parameter, true) && compareDeep(dataRequirement, o.dataRequirement, true) + ; } @Override @@ -1376,13 +318,12 @@ public class DecisionSupportServiceModule extends DomainResource { if (!(other instanceof DecisionSupportServiceModule)) return false; DecisionSupportServiceModule o = (DecisionSupportServiceModule) other; - return compareValues(version, o.version, true); + return true; } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) - && (moduleMetadata == null || moduleMetadata.isEmpty()) && (parameter == null || parameter.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( moduleMetadata, trigger, parameter + , dataRequirement); } @Override @@ -1390,6 +331,126 @@ public class DecisionSupportServiceModule extends DomainResource { return ResourceType.DecisionSupportServiceModule; } + /** + * Search parameter: identifier + *

+ * Description: Logical identifier for the module (e.g. CMS-143)
+ * Type: token
+ * Path: DecisionSupportServiceModule.moduleMetadata.identifier
+ *

+ */ + @SearchParamDefinition(name="identifier", path="DecisionSupportServiceModule.moduleMetadata.identifier", description="Logical identifier for the module (e.g. CMS-143)", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + /** + * Fluent Client search parameter constant for identifier + *

+ * Description: Logical identifier for the module (e.g. CMS-143)
+ * Type: token
+ * Path: DecisionSupportServiceModule.moduleMetadata.identifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); + + /** + * Search parameter: topic + *

+ * Description: Topics associated with the module
+ * Type: token
+ * Path: DecisionSupportServiceModule.moduleMetadata.topic
+ *

+ */ + @SearchParamDefinition(name="topic", path="DecisionSupportServiceModule.moduleMetadata.topic", description="Topics associated with the module", type="token" ) + public static final String SP_TOPIC = "topic"; + /** + * Fluent Client search parameter constant for topic + *

+ * Description: Topics associated with the module
+ * Type: token
+ * Path: DecisionSupportServiceModule.moduleMetadata.topic
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TOPIC); + + /** + * Search parameter: description + *

+ * Description: Text search against the description
+ * Type: string
+ * Path: DecisionSupportServiceModule.moduleMetadata.description
+ *

+ */ + @SearchParamDefinition(name="description", path="DecisionSupportServiceModule.moduleMetadata.description", description="Text search against the description", type="string" ) + public static final String SP_DESCRIPTION = "description"; + /** + * Fluent Client search parameter constant for description + *

+ * Description: Text search against the description
+ * Type: string
+ * Path: DecisionSupportServiceModule.moduleMetadata.description
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); + + /** + * Search parameter: title + *

+ * Description: Text search against the title
+ * Type: string
+ * Path: DecisionSupportServiceModule.moduleMetadata.title
+ *

+ */ + @SearchParamDefinition(name="title", path="DecisionSupportServiceModule.moduleMetadata.title", description="Text search against the title", type="string" ) + public static final String SP_TITLE = "title"; + /** + * Fluent Client search parameter constant for title + *

+ * Description: Text search against the title
+ * Type: string
+ * Path: DecisionSupportServiceModule.moduleMetadata.title
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); + + /** + * Search parameter: version + *

+ * Description: Version of the module (e.g. 1.0.0)
+ * Type: string
+ * Path: DecisionSupportServiceModule.moduleMetadata.version
+ *

+ */ + @SearchParamDefinition(name="version", path="DecisionSupportServiceModule.moduleMetadata.version", description="Version of the module (e.g. 1.0.0)", type="string" ) + public static final String SP_VERSION = "version"; + /** + * Fluent Client search parameter constant for version + *

+ * Description: Version of the module (e.g. 1.0.0)
+ * Type: string
+ * Path: DecisionSupportServiceModule.moduleMetadata.version
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam VERSION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_VERSION); + + /** + * Search parameter: status + *

+ * Description: Status of the module
+ * Type: token
+ * Path: DecisionSupportServiceModule.moduleMetadata.status
+ *

+ */ + @SearchParamDefinition(name="status", path="DecisionSupportServiceModule.moduleMetadata.status", description="Status of the module", type="token" ) + public static final String SP_STATUS = "status"; + /** + * Fluent Client search parameter constant for status + *

+ * Description: Status of the module
+ * Type: token
+ * Path: DecisionSupportServiceModule.moduleMetadata.status
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); + } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DetectedIssue.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DetectedIssue.java index be60edaa299..49aea5f79e3 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DetectedIssue.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DetectedIssue.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc. */ @@ -380,8 +379,7 @@ public class DetectedIssue extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (action == null || action.isEmpty()) && (date == null || date.isEmpty()) - && (author == null || author.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( action, date, author); } public String fhirType() { @@ -1039,11 +1037,8 @@ public class DetectedIssue extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (patient == null || patient.isEmpty()) && (category == null || category.isEmpty()) - && (severity == null || severity.isEmpty()) && (implicated == null || implicated.isEmpty()) - && (detail == null || detail.isEmpty()) && (date == null || date.isEmpty()) && (author == null || author.isEmpty()) - && (identifier == null || identifier.isEmpty()) && (reference == null || reference.isEmpty()) - && (mitigation == null || mitigation.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( patient, category, severity, implicated + , detail, date, author, identifier, reference, mitigation); } @Override @@ -1099,7 +1094,7 @@ public class DetectedIssue extends DomainResource { * Path: DetectedIssue.patient
*

*/ - @SearchParamDefinition(name="patient", path="DetectedIssue.patient", description="Associated patient", type="reference" ) + @SearchParamDefinition(name="patient", path="DetectedIssue.patient", description="Associated patient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient @@ -1125,7 +1120,7 @@ public class DetectedIssue extends DomainResource { * Path: DetectedIssue.author
*

*/ - @SearchParamDefinition(name="author", path="DetectedIssue.author", description="The provider or device that identified the issue", type="reference" ) + @SearchParamDefinition(name="author", path="DetectedIssue.author", description="The provider or device that identified the issue", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_AUTHOR = "author"; /** * Fluent Client search parameter constant for author diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Device.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Device.java index 50660ba7d9d..6ccdc86ee9d 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Device.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Device.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,11 +39,10 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** - * This resource identifies an instance of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc. + * This resource identifies an instance or a type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc. */ @ResourceDef(name="Device", profile="http://hl7.org/fhir/Profile/Device") public class Device extends DomainResource { @@ -152,81 +151,86 @@ public class Device extends DomainResource { } /** - * Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used. + * Unique instance identifiers assigned to a device by manufacturers other organizations or owners. */ @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Instance id from manufacturer, owner, and others", formalDefinition="Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used." ) + @Description(shortDefinition="Instance identifier", formalDefinition="Unique instance identifiers assigned to a device by manufacturers other organizations or owners." ) protected List identifier; /** - * Code or identifier to identify a kind of device. + * [Unique device identifier (UDI)](device.html#5.11.3.2.2) barcode or rfid string assigned to device label or package. */ - @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="What kind of device this is", formalDefinition="Code or identifier to identify a kind of device." ) - protected CodeableConcept type; - - /** - * Descriptive information, usage information or implantation information that is not captured in an existing element. - */ - @Child(name = "note", type = {Annotation.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Device notes and comments", formalDefinition="Descriptive information, usage information or implantation information that is not captured in an existing element." ) - protected List note; + @Child(name = "udiCarrier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Unique Device Identifier (UDI) Barcode string", formalDefinition="[Unique device identifier (UDI)](device.html#5.11.3.2.2) barcode or rfid string assigned to device label or package." ) + protected Identifier udiCarrier; /** * Status of the Device availability. */ - @Child(name = "status", type = {CodeType.class}, order=3, min=0, max=1, modifier=true, summary=true) + @Child(name = "status", type = {CodeType.class}, order=2, min=0, max=1, modifier=true, summary=true) @Description(shortDefinition="available | not-available | entered-in-error", formalDefinition="Status of the Device availability." ) protected Enumeration status; + /** + * Code or identifier to identify a kind of device. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="What kind of device this is", formalDefinition="Code or identifier to identify a kind of device." ) + protected CodeableConcept type; + + /** + * Lot number assigned by the manufacturer. + */ + @Child(name = "lotNumber", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Lot number of manufacture", formalDefinition="Lot number assigned by the manufacturer." ) + protected StringType lotNumber; + /** * A name of the manufacturer. */ - @Child(name = "manufacturer", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Child(name = "manufacturer", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Name of device manufacturer", formalDefinition="A name of the manufacturer." ) protected StringType manufacturer; - /** - * The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type. - */ - @Child(name = "model", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Model id assigned by the manufacturer", formalDefinition="The \"model\" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type." ) - protected StringType model; - - /** - * The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware. - */ - @Child(name = "version", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Version number (i.e. software)", formalDefinition="The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware." ) - protected StringType version; - /** * The date and time when the device was manufactured. */ - @Child(name = "manufactureDate", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Child(name = "manufactureDate", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Date when the device was made", formalDefinition="The date and time when the device was manufactured." ) protected DateTimeType manufactureDate; /** * The date and time beyond which this device is no longer valid or should not be used (if applicable). */ - @Child(name = "expiry", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Child(name = "expirationDate", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Date and time of expiry of this device (if applicable)", formalDefinition="The date and time beyond which this device is no longer valid or should not be used (if applicable)." ) - protected DateTimeType expiry; + protected DateTimeType expirationDate; /** - * United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm. + * The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type. */ - @Child(name = "udi", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="FDA mandated Unique Device Identifier", formalDefinition="United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm." ) - protected StringType udi; + @Child(name = "model", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Model id assigned by the manufacturer", formalDefinition="The \"model\" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type." ) + protected StringType model; /** - * Lot number assigned by the manufacturer. + * The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware. */ - @Child(name = "lotNumber", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Lot number of manufacture", formalDefinition="Lot number assigned by the manufacturer." ) - protected StringType lotNumber; + @Child(name = "version", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Version number (i.e. software)", formalDefinition="The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware." ) + protected StringType version; + + /** + * Patient information, If the device is affixed to a person. + */ + @Child(name = "patient", type = {Patient.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Patient to whom Device is affixed", formalDefinition="Patient information, If the device is affixed to a person." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (Patient information, If the device is affixed to a person.) + */ + protected Patient patientTarget; /** * An organization that is responsible for the provision and ongoing maintenance of the device. @@ -240,10 +244,17 @@ public class Device extends DomainResource { */ protected Organization ownerTarget; + /** + * Contact details for an organization or a particular human that is responsible for the device. + */ + @Child(name = "contact", type = {ContactPoint.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Details for human/organization for support", formalDefinition="Contact details for an organization or a particular human that is responsible for the device." ) + protected List contact; + /** * The place where the device can be found. */ - @Child(name = "location", type = {Location.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Child(name = "location", type = {Location.class}, order=13, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Where the resource is found", formalDefinition="The place where the device can be found." ) protected Reference location; @@ -252,33 +263,21 @@ public class Device extends DomainResource { */ protected Location locationTarget; - /** - * Patient information, if the resource is affixed to a person. - */ - @Child(name = "patient", type = {Patient.class}, order=13, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="If the resource is affixed to a person", formalDefinition="Patient information, if the resource is affixed to a person." ) - protected Reference patient; - - /** - * The actual object that is the target of the reference (Patient information, if the resource is affixed to a person.) - */ - protected Patient patientTarget; - - /** - * Contact details for an organization or a particular human that is responsible for the device. - */ - @Child(name = "contact", type = {ContactPoint.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Details for human/organization for support", formalDefinition="Contact details for an organization or a particular human that is responsible for the device." ) - protected List contact; - /** * A network address on which the device may be contacted directly. */ - @Child(name = "url", type = {UriType.class}, order=15, min=0, max=1, modifier=false, summary=false) + @Child(name = "url", type = {UriType.class}, order=14, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Network address to contact device", formalDefinition="A network address on which the device may be contacted directly." ) protected UriType url; - private static final long serialVersionUID = 366690094L; + /** + * Descriptive information, usage information or implantation information that is not captured in an existing element. + */ + @Child(name = "note", type = {Annotation.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Device notes and comments", formalDefinition="Descriptive information, usage information or implantation information that is not captured in an existing element." ) + protected List note; + + private static final long serialVersionUID = -710362206L; /** * Constructor @@ -296,7 +295,7 @@ public class Device extends DomainResource { } /** - * @return {@link #identifier} (Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used.) + * @return {@link #identifier} (Unique instance identifiers assigned to a device by manufacturers other organizations or owners.) */ public List getIdentifier() { if (this.identifier == null) @@ -314,7 +313,7 @@ public class Device extends DomainResource { } /** - * @return {@link #identifier} (Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used.) + * @return {@link #identifier} (Unique instance identifiers assigned to a device by manufacturers other organizations or owners.) */ // syntactic sugar public Identifier addIdentifier() { //3 @@ -336,66 +335,26 @@ public class Device extends DomainResource { } /** - * @return {@link #type} (Code or identifier to identify a kind of device.) + * @return {@link #udiCarrier} ([Unique device identifier (UDI)](device.html#5.11.3.2.2) barcode or rfid string assigned to device label or package.) */ - public CodeableConcept getType() { - if (this.type == null) + public Identifier getUdiCarrier() { + if (this.udiCarrier == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Device.type"); + throw new Error("Attempt to auto-create Device.udiCarrier"); else if (Configuration.doAutoCreate()) - this.type = new CodeableConcept(); // cc - return this.type; + this.udiCarrier = new Identifier(); // cc + return this.udiCarrier; } - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); + public boolean hasUdiCarrier() { + return this.udiCarrier != null && !this.udiCarrier.isEmpty(); } /** - * @param value {@link #type} (Code or identifier to identify a kind of device.) + * @param value {@link #udiCarrier} ([Unique device identifier (UDI)](device.html#5.11.3.2.2) barcode or rfid string assigned to device label or package.) */ - public Device setType(CodeableConcept value) { - this.type = value; - return this; - } - - /** - * @return {@link #note} (Descriptive information, usage information or implantation information that is not captured in an existing element.) - */ - public List getNote() { - if (this.note == null) - this.note = new ArrayList(); - return this.note; - } - - public boolean hasNote() { - if (this.note == null) - return false; - for (Annotation item : this.note) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #note} (Descriptive information, usage information or implantation information that is not captured in an existing element.) - */ - // syntactic sugar - public Annotation addNote() { //3 - Annotation t = new Annotation(); - if (this.note == null) - this.note = new ArrayList(); - this.note.add(t); - return t; - } - - // syntactic sugar - public Device addNote(Annotation t) { //3 - if (t == null) - return this; - if (this.note == null) - this.note = new ArrayList(); - this.note.add(t); + public Device setUdiCarrier(Identifier value) { + this.udiCarrier = value; return this; } @@ -448,6 +407,79 @@ public class Device extends DomainResource { return this; } + /** + * @return {@link #type} (Code or identifier to identify a kind of device.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Code or identifier to identify a kind of device.) + */ + public Device setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #lotNumber} (Lot number assigned by the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value + */ + public StringType getLotNumberElement() { + if (this.lotNumber == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.lotNumber"); + else if (Configuration.doAutoCreate()) + this.lotNumber = new StringType(); // bb + return this.lotNumber; + } + + public boolean hasLotNumberElement() { + return this.lotNumber != null && !this.lotNumber.isEmpty(); + } + + public boolean hasLotNumber() { + return this.lotNumber != null && !this.lotNumber.isEmpty(); + } + + /** + * @param value {@link #lotNumber} (Lot number assigned by the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value + */ + public Device setLotNumberElement(StringType value) { + this.lotNumber = value; + return this; + } + + /** + * @return Lot number assigned by the manufacturer. + */ + public String getLotNumber() { + return this.lotNumber == null ? null : this.lotNumber.getValue(); + } + + /** + * @param value Lot number assigned by the manufacturer. + */ + public Device setLotNumber(String value) { + if (Utilities.noString(value)) + this.lotNumber = null; + else { + if (this.lotNumber == null) + this.lotNumber = new StringType(); + this.lotNumber.setValue(value); + } + return this; + } + /** * @return {@link #manufacturer} (A name of the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getManufacturer" gives direct access to the value */ @@ -497,6 +529,104 @@ public class Device extends DomainResource { return this; } + /** + * @return {@link #manufactureDate} (The date and time when the device was manufactured.). This is the underlying object with id, value and extensions. The accessor "getManufactureDate" gives direct access to the value + */ + public DateTimeType getManufactureDateElement() { + if (this.manufactureDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.manufactureDate"); + else if (Configuration.doAutoCreate()) + this.manufactureDate = new DateTimeType(); // bb + return this.manufactureDate; + } + + public boolean hasManufactureDateElement() { + return this.manufactureDate != null && !this.manufactureDate.isEmpty(); + } + + public boolean hasManufactureDate() { + return this.manufactureDate != null && !this.manufactureDate.isEmpty(); + } + + /** + * @param value {@link #manufactureDate} (The date and time when the device was manufactured.). This is the underlying object with id, value and extensions. The accessor "getManufactureDate" gives direct access to the value + */ + public Device setManufactureDateElement(DateTimeType value) { + this.manufactureDate = value; + return this; + } + + /** + * @return The date and time when the device was manufactured. + */ + public Date getManufactureDate() { + return this.manufactureDate == null ? null : this.manufactureDate.getValue(); + } + + /** + * @param value The date and time when the device was manufactured. + */ + public Device setManufactureDate(Date value) { + if (value == null) + this.manufactureDate = null; + else { + if (this.manufactureDate == null) + this.manufactureDate = new DateTimeType(); + this.manufactureDate.setValue(value); + } + return this; + } + + /** + * @return {@link #expirationDate} (The date and time beyond which this device is no longer valid or should not be used (if applicable).). This is the underlying object with id, value and extensions. The accessor "getExpirationDate" gives direct access to the value + */ + public DateTimeType getExpirationDateElement() { + if (this.expirationDate == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Device.expirationDate"); + else if (Configuration.doAutoCreate()) + this.expirationDate = new DateTimeType(); // bb + return this.expirationDate; + } + + public boolean hasExpirationDateElement() { + return this.expirationDate != null && !this.expirationDate.isEmpty(); + } + + public boolean hasExpirationDate() { + return this.expirationDate != null && !this.expirationDate.isEmpty(); + } + + /** + * @param value {@link #expirationDate} (The date and time beyond which this device is no longer valid or should not be used (if applicable).). This is the underlying object with id, value and extensions. The accessor "getExpirationDate" gives direct access to the value + */ + public Device setExpirationDateElement(DateTimeType value) { + this.expirationDate = value; + return this; + } + + /** + * @return The date and time beyond which this device is no longer valid or should not be used (if applicable). + */ + public Date getExpirationDate() { + return this.expirationDate == null ? null : this.expirationDate.getValue(); + } + + /** + * @param value The date and time beyond which this device is no longer valid or should not be used (if applicable). + */ + public Device setExpirationDate(Date value) { + if (value == null) + this.expirationDate = null; + else { + if (this.expirationDate == null) + this.expirationDate = new DateTimeType(); + this.expirationDate.setValue(value); + } + return this; + } + /** * @return {@link #model} (The "model" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.). This is the underlying object with id, value and extensions. The accessor "getModel" gives direct access to the value */ @@ -596,198 +726,46 @@ public class Device extends DomainResource { } /** - * @return {@link #manufactureDate} (The date and time when the device was manufactured.). This is the underlying object with id, value and extensions. The accessor "getManufactureDate" gives direct access to the value + * @return {@link #patient} (Patient information, If the device is affixed to a person.) */ - public DateTimeType getManufactureDateElement() { - if (this.manufactureDate == null) + public Reference getPatient() { + if (this.patient == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Device.manufactureDate"); + throw new Error("Attempt to auto-create Device.patient"); else if (Configuration.doAutoCreate()) - this.manufactureDate = new DateTimeType(); // bb - return this.manufactureDate; + this.patient = new Reference(); // cc + return this.patient; } - public boolean hasManufactureDateElement() { - return this.manufactureDate != null && !this.manufactureDate.isEmpty(); - } - - public boolean hasManufactureDate() { - return this.manufactureDate != null && !this.manufactureDate.isEmpty(); + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); } /** - * @param value {@link #manufactureDate} (The date and time when the device was manufactured.). This is the underlying object with id, value and extensions. The accessor "getManufactureDate" gives direct access to the value + * @param value {@link #patient} (Patient information, If the device is affixed to a person.) */ - public Device setManufactureDateElement(DateTimeType value) { - this.manufactureDate = value; + public Device setPatient(Reference value) { + this.patient = value; return this; } /** - * @return The date and time when the device was manufactured. + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Patient information, If the device is affixed to a person.) */ - public Date getManufactureDate() { - return this.manufactureDate == null ? null : this.manufactureDate.getValue(); - } - - /** - * @param value The date and time when the device was manufactured. - */ - public Device setManufactureDate(Date value) { - if (value == null) - this.manufactureDate = null; - else { - if (this.manufactureDate == null) - this.manufactureDate = new DateTimeType(); - this.manufactureDate.setValue(value); - } - return this; - } - - /** - * @return {@link #expiry} (The date and time beyond which this device is no longer valid or should not be used (if applicable).). This is the underlying object with id, value and extensions. The accessor "getExpiry" gives direct access to the value - */ - public DateTimeType getExpiryElement() { - if (this.expiry == null) + public Patient getPatientTarget() { + if (this.patientTarget == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Device.expiry"); + throw new Error("Attempt to auto-create Device.patient"); else if (Configuration.doAutoCreate()) - this.expiry = new DateTimeType(); // bb - return this.expiry; - } - - public boolean hasExpiryElement() { - return this.expiry != null && !this.expiry.isEmpty(); - } - - public boolean hasExpiry() { - return this.expiry != null && !this.expiry.isEmpty(); + this.patientTarget = new Patient(); // aa + return this.patientTarget; } /** - * @param value {@link #expiry} (The date and time beyond which this device is no longer valid or should not be used (if applicable).). This is the underlying object with id, value and extensions. The accessor "getExpiry" gives direct access to the value + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Patient information, If the device is affixed to a person.) */ - public Device setExpiryElement(DateTimeType value) { - this.expiry = value; - return this; - } - - /** - * @return The date and time beyond which this device is no longer valid or should not be used (if applicable). - */ - public Date getExpiry() { - return this.expiry == null ? null : this.expiry.getValue(); - } - - /** - * @param value The date and time beyond which this device is no longer valid or should not be used (if applicable). - */ - public Device setExpiry(Date value) { - if (value == null) - this.expiry = null; - else { - if (this.expiry == null) - this.expiry = new DateTimeType(); - this.expiry.setValue(value); - } - return this; - } - - /** - * @return {@link #udi} (United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.). This is the underlying object with id, value and extensions. The accessor "getUdi" gives direct access to the value - */ - public StringType getUdiElement() { - if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Device.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new StringType(); // bb - return this.udi; - } - - public boolean hasUdiElement() { - return this.udi != null && !this.udi.isEmpty(); - } - - public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); - } - - /** - * @param value {@link #udi} (United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.). This is the underlying object with id, value and extensions. The accessor "getUdi" gives direct access to the value - */ - public Device setUdiElement(StringType value) { - this.udi = value; - return this; - } - - /** - * @return United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm. - */ - public String getUdi() { - return this.udi == null ? null : this.udi.getValue(); - } - - /** - * @param value United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm. - */ - public Device setUdi(String value) { - if (Utilities.noString(value)) - this.udi = null; - else { - if (this.udi == null) - this.udi = new StringType(); - this.udi.setValue(value); - } - return this; - } - - /** - * @return {@link #lotNumber} (Lot number assigned by the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value - */ - public StringType getLotNumberElement() { - if (this.lotNumber == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Device.lotNumber"); - else if (Configuration.doAutoCreate()) - this.lotNumber = new StringType(); // bb - return this.lotNumber; - } - - public boolean hasLotNumberElement() { - return this.lotNumber != null && !this.lotNumber.isEmpty(); - } - - public boolean hasLotNumber() { - return this.lotNumber != null && !this.lotNumber.isEmpty(); - } - - /** - * @param value {@link #lotNumber} (Lot number assigned by the manufacturer.). This is the underlying object with id, value and extensions. The accessor "getLotNumber" gives direct access to the value - */ - public Device setLotNumberElement(StringType value) { - this.lotNumber = value; - return this; - } - - /** - * @return Lot number assigned by the manufacturer. - */ - public String getLotNumber() { - return this.lotNumber == null ? null : this.lotNumber.getValue(); - } - - /** - * @param value Lot number assigned by the manufacturer. - */ - public Device setLotNumber(String value) { - if (Utilities.noString(value)) - this.lotNumber = null; - else { - if (this.lotNumber == null) - this.lotNumber = new StringType(); - this.lotNumber.setValue(value); - } + public Device setPatientTarget(Patient value) { + this.patientTarget = value; return this; } @@ -835,6 +813,46 @@ public class Device extends DomainResource { return this; } + /** + * @return {@link #contact} (Contact details for an organization or a particular human that is responsible for the device.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (ContactPoint item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contact details for an organization or a particular human that is responsible for the device.) + */ + // syntactic sugar + public ContactPoint addContact() { //3 + ContactPoint t = new ContactPoint(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public Device addContact(ContactPoint t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + /** * @return {@link #location} (The place where the device can be found.) */ @@ -879,90 +897,6 @@ public class Device extends DomainResource { return this; } - /** - * @return {@link #patient} (Patient information, if the resource is affixed to a person.) - */ - public Reference getPatient() { - if (this.patient == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Device.patient"); - else if (Configuration.doAutoCreate()) - this.patient = new Reference(); // cc - return this.patient; - } - - public boolean hasPatient() { - return this.patient != null && !this.patient.isEmpty(); - } - - /** - * @param value {@link #patient} (Patient information, if the resource is affixed to a person.) - */ - public Device setPatient(Reference value) { - this.patient = value; - return this; - } - - /** - * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Patient information, if the resource is affixed to a person.) - */ - public Patient getPatientTarget() { - if (this.patientTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Device.patient"); - else if (Configuration.doAutoCreate()) - this.patientTarget = new Patient(); // aa - return this.patientTarget; - } - - /** - * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Patient information, if the resource is affixed to a person.) - */ - public Device setPatientTarget(Patient value) { - this.patientTarget = value; - return this; - } - - /** - * @return {@link #contact} (Contact details for an organization or a particular human that is responsible for the device.) - */ - public List getContact() { - if (this.contact == null) - this.contact = new ArrayList(); - return this.contact; - } - - public boolean hasContact() { - if (this.contact == null) - return false; - for (ContactPoint item : this.contact) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #contact} (Contact details for an organization or a particular human that is responsible for the device.) - */ - // syntactic sugar - public ContactPoint addContact() { //3 - ContactPoint t = new ContactPoint(); - if (this.contact == null) - this.contact = new ArrayList(); - this.contact.add(t); - return t; - } - - // syntactic sugar - public Device addContact(ContactPoint t) { //3 - if (t == null) - return this; - if (this.contact == null) - this.contact = new ArrayList(); - this.contact.add(t); - return this; - } - /** * @return {@link #url} (A network address on which the device may be contacted directly.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value */ @@ -1012,60 +946,100 @@ public class Device extends DomainResource { return this; } + /** + * @return {@link #note} (Descriptive information, usage information or implantation information that is not captured in an existing element.) + */ + public List getNote() { + if (this.note == null) + this.note = new ArrayList(); + return this.note; + } + + public boolean hasNote() { + if (this.note == null) + return false; + for (Annotation item : this.note) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #note} (Descriptive information, usage information or implantation information that is not captured in an existing element.) + */ + // syntactic sugar + public Annotation addNote() { //3 + Annotation t = new Annotation(); + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return t; + } + + // syntactic sugar + public Device addNote(Annotation t) { //3 + if (t == null) + return this; + if (this.note == null) + this.note = new ArrayList(); + this.note.add(t); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "Unique instance identifiers assigned to a device by organizations like manufacturers or owners. If the identifier identifies the type of device, Device.type should be used.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("type", "CodeableConcept", "Code or identifier to identify a kind of device.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("note", "Annotation", "Descriptive information, usage information or implantation information that is not captured in an existing element.", 0, java.lang.Integer.MAX_VALUE, note)); + childrenList.add(new Property("identifier", "Identifier", "Unique instance identifiers assigned to a device by manufacturers other organizations or owners.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("udiCarrier", "Identifier", "[Unique device identifier (UDI)](device.html#5.11.3.2.2) barcode or rfid string assigned to device label or package.", 0, java.lang.Integer.MAX_VALUE, udiCarrier)); childrenList.add(new Property("status", "code", "Status of the Device availability.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("type", "CodeableConcept", "Code or identifier to identify a kind of device.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("lotNumber", "string", "Lot number assigned by the manufacturer.", 0, java.lang.Integer.MAX_VALUE, lotNumber)); childrenList.add(new Property("manufacturer", "string", "A name of the manufacturer.", 0, java.lang.Integer.MAX_VALUE, manufacturer)); + childrenList.add(new Property("manufactureDate", "dateTime", "The date and time when the device was manufactured.", 0, java.lang.Integer.MAX_VALUE, manufactureDate)); + childrenList.add(new Property("expirationDate", "dateTime", "The date and time beyond which this device is no longer valid or should not be used (if applicable).", 0, java.lang.Integer.MAX_VALUE, expirationDate)); childrenList.add(new Property("model", "string", "The \"model\" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.", 0, java.lang.Integer.MAX_VALUE, model)); childrenList.add(new Property("version", "string", "The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.", 0, java.lang.Integer.MAX_VALUE, version)); - childrenList.add(new Property("manufactureDate", "dateTime", "The date and time when the device was manufactured.", 0, java.lang.Integer.MAX_VALUE, manufactureDate)); - childrenList.add(new Property("expiry", "dateTime", "The date and time beyond which this device is no longer valid or should not be used (if applicable).", 0, java.lang.Integer.MAX_VALUE, expiry)); - childrenList.add(new Property("udi", "string", "United States Food and Drug Administration mandated Unique Device Identifier (UDI). Use the human readable information (the content that the user sees, which is sometimes different to the exact syntax represented in the barcode) - see http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm.", 0, java.lang.Integer.MAX_VALUE, udi)); - childrenList.add(new Property("lotNumber", "string", "Lot number assigned by the manufacturer.", 0, java.lang.Integer.MAX_VALUE, lotNumber)); + childrenList.add(new Property("patient", "Reference(Patient)", "Patient information, If the device is affixed to a person.", 0, java.lang.Integer.MAX_VALUE, patient)); childrenList.add(new Property("owner", "Reference(Organization)", "An organization that is responsible for the provision and ongoing maintenance of the device.", 0, java.lang.Integer.MAX_VALUE, owner)); - childrenList.add(new Property("location", "Reference(Location)", "The place where the device can be found.", 0, java.lang.Integer.MAX_VALUE, location)); - childrenList.add(new Property("patient", "Reference(Patient)", "Patient information, if the resource is affixed to a person.", 0, java.lang.Integer.MAX_VALUE, patient)); childrenList.add(new Property("contact", "ContactPoint", "Contact details for an organization or a particular human that is responsible for the device.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("location", "Reference(Location)", "The place where the device can be found.", 0, java.lang.Integer.MAX_VALUE, location)); childrenList.add(new Property("url", "uri", "A network address on which the device may be contacted directly.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("note", "Annotation", "Descriptive information, usage information or implantation information that is not captured in an existing element.", 0, java.lang.Integer.MAX_VALUE, note)); } @Override public void setProperty(String name, Base value) throws FHIRException { if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); - else if (name.equals("type")) - this.type = castToCodeableConcept(value); // CodeableConcept - else if (name.equals("note")) - this.getNote().add(castToAnnotation(value)); + else if (name.equals("udiCarrier")) + this.udiCarrier = castToIdentifier(value); // Identifier else if (name.equals("status")) this.status = new DeviceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("lotNumber")) + this.lotNumber = castToString(value); // StringType else if (name.equals("manufacturer")) this.manufacturer = castToString(value); // StringType + else if (name.equals("manufactureDate")) + this.manufactureDate = castToDateTime(value); // DateTimeType + else if (name.equals("expirationDate")) + this.expirationDate = castToDateTime(value); // DateTimeType else if (name.equals("model")) this.model = castToString(value); // StringType else if (name.equals("version")) this.version = castToString(value); // StringType - else if (name.equals("manufactureDate")) - this.manufactureDate = castToDateTime(value); // DateTimeType - else if (name.equals("expiry")) - this.expiry = castToDateTime(value); // DateTimeType - else if (name.equals("udi")) - this.udi = castToString(value); // StringType - else if (name.equals("lotNumber")) - this.lotNumber = castToString(value); // StringType - else if (name.equals("owner")) - this.owner = castToReference(value); // Reference - else if (name.equals("location")) - this.location = castToReference(value); // Reference else if (name.equals("patient")) this.patient = castToReference(value); // Reference + else if (name.equals("owner")) + this.owner = castToReference(value); // Reference else if (name.equals("contact")) this.getContact().add(castToContactPoint(value)); + else if (name.equals("location")) + this.location = castToReference(value); // Reference else if (name.equals("url")) this.url = castToUri(value); // UriType + else if (name.equals("note")) + this.getNote().add(castToAnnotation(value)); else super.setProperty(name, value); } @@ -1075,55 +1049,56 @@ public class Device extends DomainResource { if (name.equals("identifier")) { return addIdentifier(); } - else if (name.equals("type")) { - this.type = new CodeableConcept(); - return this.type; - } - else if (name.equals("note")) { - return addNote(); + else if (name.equals("udiCarrier")) { + this.udiCarrier = new Identifier(); + return this.udiCarrier; } else if (name.equals("status")) { throw new FHIRException("Cannot call addChild on a primitive type Device.status"); } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("lotNumber")) { + throw new FHIRException("Cannot call addChild on a primitive type Device.lotNumber"); + } else if (name.equals("manufacturer")) { throw new FHIRException("Cannot call addChild on a primitive type Device.manufacturer"); } + else if (name.equals("manufactureDate")) { + throw new FHIRException("Cannot call addChild on a primitive type Device.manufactureDate"); + } + else if (name.equals("expirationDate")) { + throw new FHIRException("Cannot call addChild on a primitive type Device.expirationDate"); + } else if (name.equals("model")) { throw new FHIRException("Cannot call addChild on a primitive type Device.model"); } else if (name.equals("version")) { throw new FHIRException("Cannot call addChild on a primitive type Device.version"); } - else if (name.equals("manufactureDate")) { - throw new FHIRException("Cannot call addChild on a primitive type Device.manufactureDate"); - } - else if (name.equals("expiry")) { - throw new FHIRException("Cannot call addChild on a primitive type Device.expiry"); - } - else if (name.equals("udi")) { - throw new FHIRException("Cannot call addChild on a primitive type Device.udi"); - } - else if (name.equals("lotNumber")) { - throw new FHIRException("Cannot call addChild on a primitive type Device.lotNumber"); + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; } else if (name.equals("owner")) { this.owner = new Reference(); return this.owner; } + else if (name.equals("contact")) { + return addContact(); + } else if (name.equals("location")) { this.location = new Reference(); return this.location; } - else if (name.equals("patient")) { - this.patient = new Reference(); - return this.patient; - } - else if (name.equals("contact")) { - return addContact(); - } else if (name.equals("url")) { throw new FHIRException("Cannot call addChild on a primitive type Device.url"); } + else if (name.equals("note")) { + return addNote(); + } else return super.addChild(name); } @@ -1141,29 +1116,29 @@ public class Device extends DomainResource { for (Identifier i : identifier) dst.identifier.add(i.copy()); }; - dst.type = type == null ? null : type.copy(); - if (note != null) { - dst.note = new ArrayList(); - for (Annotation i : note) - dst.note.add(i.copy()); - }; + dst.udiCarrier = udiCarrier == null ? null : udiCarrier.copy(); dst.status = status == null ? null : status.copy(); + dst.type = type == null ? null : type.copy(); + dst.lotNumber = lotNumber == null ? null : lotNumber.copy(); dst.manufacturer = manufacturer == null ? null : manufacturer.copy(); + dst.manufactureDate = manufactureDate == null ? null : manufactureDate.copy(); + dst.expirationDate = expirationDate == null ? null : expirationDate.copy(); dst.model = model == null ? null : model.copy(); dst.version = version == null ? null : version.copy(); - dst.manufactureDate = manufactureDate == null ? null : manufactureDate.copy(); - dst.expiry = expiry == null ? null : expiry.copy(); - dst.udi = udi == null ? null : udi.copy(); - dst.lotNumber = lotNumber == null ? null : lotNumber.copy(); - dst.owner = owner == null ? null : owner.copy(); - dst.location = location == null ? null : location.copy(); dst.patient = patient == null ? null : patient.copy(); + dst.owner = owner == null ? null : owner.copy(); if (contact != null) { dst.contact = new ArrayList(); for (ContactPoint i : contact) dst.contact.add(i.copy()); }; + dst.location = location == null ? null : location.copy(); dst.url = url == null ? null : url.copy(); + if (note != null) { + dst.note = new ArrayList(); + for (Annotation i : note) + dst.note.add(i.copy()); + }; return dst; } @@ -1178,12 +1153,13 @@ public class Device extends DomainResource { if (!(other instanceof Device)) return false; Device o = (Device) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(note, o.note, true) - && compareDeep(status, o.status, true) && compareDeep(manufacturer, o.manufacturer, true) && compareDeep(model, o.model, true) - && compareDeep(version, o.version, true) && compareDeep(manufactureDate, o.manufactureDate, true) - && compareDeep(expiry, o.expiry, true) && compareDeep(udi, o.udi, true) && compareDeep(lotNumber, o.lotNumber, true) - && compareDeep(owner, o.owner, true) && compareDeep(location, o.location, true) && compareDeep(patient, o.patient, true) - && compareDeep(contact, o.contact, true) && compareDeep(url, o.url, true); + return compareDeep(identifier, o.identifier, true) && compareDeep(udiCarrier, o.udiCarrier, true) + && compareDeep(status, o.status, true) && compareDeep(type, o.type, true) && compareDeep(lotNumber, o.lotNumber, true) + && compareDeep(manufacturer, o.manufacturer, true) && compareDeep(manufactureDate, o.manufactureDate, true) + && compareDeep(expirationDate, o.expirationDate, true) && compareDeep(model, o.model, true) && compareDeep(version, o.version, true) + && compareDeep(patient, o.patient, true) && compareDeep(owner, o.owner, true) && compareDeep(contact, o.contact, true) + && compareDeep(location, o.location, true) && compareDeep(url, o.url, true) && compareDeep(note, o.note, true) + ; } @Override @@ -1193,19 +1169,16 @@ public class Device extends DomainResource { if (!(other instanceof Device)) return false; Device o = (Device) other; - return compareValues(status, o.status, true) && compareValues(manufacturer, o.manufacturer, true) && compareValues(model, o.model, true) - && compareValues(version, o.version, true) && compareValues(manufactureDate, o.manufactureDate, true) - && compareValues(expiry, o.expiry, true) && compareValues(udi, o.udi, true) && compareValues(lotNumber, o.lotNumber, true) - && compareValues(url, o.url, true); + return compareValues(status, o.status, true) && compareValues(lotNumber, o.lotNumber, true) && compareValues(manufacturer, o.manufacturer, true) + && compareValues(manufactureDate, o.manufactureDate, true) && compareValues(expirationDate, o.expirationDate, true) + && compareValues(model, o.model, true) && compareValues(version, o.version, true) && compareValues(url, o.url, true) + ; } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (type == null || type.isEmpty()) - && (note == null || note.isEmpty()) && (status == null || status.isEmpty()) && (manufacturer == null || manufacturer.isEmpty()) - && (model == null || model.isEmpty()) && (version == null || version.isEmpty()) && (manufactureDate == null || manufactureDate.isEmpty()) - && (expiry == null || expiry.isEmpty()) && (udi == null || udi.isEmpty()) && (lotNumber == null || lotNumber.isEmpty()) - && (owner == null || owner.isEmpty()) && (location == null || location.isEmpty()) && (patient == null || patient.isEmpty()) - && (contact == null || contact.isEmpty()) && (url == null || url.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, udiCarrier, status + , type, lotNumber, manufacturer, manufactureDate, expirationDate, model, version, patient + , owner, contact, location, url, note); } @Override @@ -1331,26 +1304,6 @@ public class Device extends DomainResource { */ public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("Device:location").toLocked(); - /** - * Search parameter: udi - *

- * Description: FDA mandated Unique Device Identifier
- * Type: string
- * Path: Device.udi
- *

- */ - @SearchParamDefinition(name="udi", path="Device.udi", description="FDA mandated Unique Device Identifier", type="string" ) - public static final String SP_UDI = "udi"; - /** - * Fluent Client search parameter constant for udi - *

- * Description: FDA mandated Unique Device Identifier
- * Type: string
- * Path: Device.udi
- *

- */ - public static final ca.uhn.fhir.rest.gclient.StringClientParam UDI = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_UDI); - /** * Search parameter: type *

@@ -1371,6 +1324,26 @@ public class Device extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); + /** + * Search parameter: udicarrier + *

+ * Description: Barcode string (udi)
+ * Type: token
+ * Path: Device.udiCarrier
+ *

+ */ + @SearchParamDefinition(name="udicarrier", path="Device.udiCarrier", description="Barcode string (udi)", type="token" ) + public static final String SP_UDICARRIER = "udicarrier"; + /** + * Fluent Client search parameter constant for udicarrier + *

+ * Description: Barcode string (udi)
+ * Type: token
+ * Path: Device.udiCarrier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam UDICARRIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_UDICARRIER); + /** * Search parameter: url *

diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DeviceComponent.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DeviceComponent.java index 717ba620888..cba2bbbe891 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DeviceComponent.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DeviceComponent.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Describes the characteristics, operational status and capabilities of a medical-related component of a medical device. */ @@ -477,8 +475,8 @@ public class DeviceComponent extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (specType == null || specType.isEmpty()) && (componentId == null || componentId.isEmpty()) - && (productionSpec == null || productionSpec.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( specType, componentId, productionSpec + ); } public String fhirType() { @@ -1086,12 +1084,9 @@ public class DeviceComponent extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (lastSystemChange == null || lastSystemChange.isEmpty()) && (source == null || source.isEmpty()) - && (parent == null || parent.isEmpty()) && (operationalStatus == null || operationalStatus.isEmpty()) - && (parameterGroup == null || parameterGroup.isEmpty()) && (measurementPrinciple == null || measurementPrinciple.isEmpty()) - && (productionSpecification == null || productionSpecification.isEmpty()) && (languageCode == null || languageCode.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, identifier, lastSystemChange + , source, parent, operationalStatus, parameterGroup, measurementPrinciple, productionSpecification + , languageCode); } @Override @@ -1133,7 +1128,7 @@ public class DeviceComponent extends DomainResource { * Path: DeviceComponent.source
*

*/ - @SearchParamDefinition(name="source", path="DeviceComponent.source", description="The device source", type="reference" ) + @SearchParamDefinition(name="source", path="DeviceComponent.source", description="The device source", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device") } ) public static final String SP_SOURCE = "source"; /** * Fluent Client search parameter constant for source diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DeviceMetric.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DeviceMetric.java index 7e31b8cf4c8..bdac35bdd19 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DeviceMetric.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DeviceMetric.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Describes a measurement, calculation or setting capability of a medical device. */ @@ -936,8 +935,7 @@ public class DeviceMetric extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (state == null || state.isEmpty()) - && (time == null || time.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, state, time); } public String fhirType() { @@ -1549,11 +1547,8 @@ public class DeviceMetric extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (unit == null || unit.isEmpty()) && (source == null || source.isEmpty()) && (parent == null || parent.isEmpty()) - && (operationalStatus == null || operationalStatus.isEmpty()) && (color == null || color.isEmpty()) - && (category == null || category.isEmpty()) && (measurementPeriod == null || measurementPeriod.isEmpty()) - && (calibration == null || calibration.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, identifier, unit, source + , parent, operationalStatus, color, category, measurementPeriod, calibration); } @Override @@ -1615,7 +1610,7 @@ public class DeviceMetric extends DomainResource { * Path: DeviceMetric.source
*

*/ - @SearchParamDefinition(name="source", path="DeviceMetric.source", description="The device resource", type="reference" ) + @SearchParamDefinition(name="source", path="DeviceMetric.source", description="The device resource", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device") } ) public static final String SP_SOURCE = "source"; /** * Fluent Client search parameter constant for source diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DeviceUseRequest.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DeviceUseRequest.java index fc6437389ec..ff8d66290c0 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DeviceUseRequest.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DeviceUseRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker. */ @@ -1292,12 +1291,9 @@ public class DeviceUseRequest extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (bodySite == null || bodySite.isEmpty()) && (status == null || status.isEmpty()) - && (device == null || device.isEmpty()) && (encounter == null || encounter.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (indication == null || indication.isEmpty()) && (notes == null || notes.isEmpty()) && (prnReason == null || prnReason.isEmpty()) - && (orderedOn == null || orderedOn.isEmpty()) && (recordedOn == null || recordedOn.isEmpty()) - && (subject == null || subject.isEmpty()) && (timing == null || timing.isEmpty()) && (priority == null || priority.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( bodySite, status, device, encounter + , identifier, indication, notes, prnReason, orderedOn, recordedOn, subject, timing, priority + ); } @Override @@ -1313,7 +1309,7 @@ public class DeviceUseRequest extends DomainResource { * Path: DeviceUseRequest.subject
*

*/ - @SearchParamDefinition(name="subject", path="DeviceUseRequest.subject", description="Search by subject", type="reference" ) + @SearchParamDefinition(name="subject", path="DeviceUseRequest.subject", description="Search by subject", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject @@ -1365,7 +1361,7 @@ public class DeviceUseRequest extends DomainResource { * Path: DeviceUseRequest.device
*

*/ - @SearchParamDefinition(name="device", path="DeviceUseRequest.device", description="Device requested", type="reference" ) + @SearchParamDefinition(name="device", path="DeviceUseRequest.device", description="Device requested", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device") } ) public static final String SP_DEVICE = "device"; /** * Fluent Client search parameter constant for device diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DeviceUseStatement.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DeviceUseStatement.java index 5f242fd3681..ee39ae253f5 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DeviceUseStatement.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DeviceUseStatement.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A record of a device being used by a patient where the record is the result of a report from the patient or another clinician. */ @@ -684,10 +683,8 @@ public class DeviceUseStatement extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (bodySite == null || bodySite.isEmpty()) && (whenUsed == null || whenUsed.isEmpty()) - && (device == null || device.isEmpty()) && (identifier == null || identifier.isEmpty()) && (indication == null || indication.isEmpty()) - && (notes == null || notes.isEmpty()) && (recordedOn == null || recordedOn.isEmpty()) && (subject == null || subject.isEmpty()) - && (timing == null || timing.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( bodySite, whenUsed, device, identifier + , indication, notes, recordedOn, subject, timing); } @Override @@ -703,7 +700,7 @@ public class DeviceUseStatement extends DomainResource { * Path: DeviceUseStatement.subject
*

*/ - @SearchParamDefinition(name="subject", path="DeviceUseStatement.subject", description="Search by subject", type="reference" ) + @SearchParamDefinition(name="subject", path="DeviceUseStatement.subject", description="Search by subject", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject @@ -755,7 +752,7 @@ public class DeviceUseStatement extends DomainResource { * Path: DeviceUseStatement.device
*

*/ - @SearchParamDefinition(name="device", path="DeviceUseStatement.device", description="Search by device", type="reference" ) + @SearchParamDefinition(name="device", path="DeviceUseStatement.device", description="Search by device", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device") } ) public static final String SP_DEVICE = "device"; /** * Fluent Client search parameter constant for device diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DiagnosticOrder.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DiagnosticOrder.java index 465bdc7bf78..ac7a610c97b 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DiagnosticOrder.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DiagnosticOrder.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A record of a request for a diagnostic investigation service to be performed. */ @@ -726,8 +725,8 @@ public class DiagnosticOrder extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (status == null || status.isEmpty()) && (description == null || description.isEmpty()) - && (dateTime == null || dateTime.isEmpty()) && (actor == null || actor.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( status, description, dateTime + , actor); } public String fhirType() { @@ -1083,9 +1082,8 @@ public class DiagnosticOrder extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (specimen == null || specimen.isEmpty()) - && (bodySite == null || bodySite.isEmpty()) && (status == null || status.isEmpty()) && (event == null || event.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, specimen, bodySite, status + , event); } public String fhirType() { @@ -1095,41 +1093,43 @@ public class DiagnosticOrder extends DomainResource { } - /** - * Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans). - */ - @Child(name = "subject", type = {Patient.class, Group.class, Location.class, Device.class}, order=0, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Who and/or what test is about", formalDefinition="Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans)." ) - protected Reference subject; - - /** - * The actual object that is the target of the reference (Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) - */ - protected Resource subjectTarget; - - /** - * The practitioner that holds legal responsibility for ordering the investigation. - */ - @Child(name = "orderer", type = {Practitioner.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Who ordered the test", formalDefinition="The practitioner that holds legal responsibility for ordering the investigation." ) - protected Reference orderer; - - /** - * The actual object that is the target of the reference (The practitioner that holds legal responsibility for ordering the investigation.) - */ - protected Practitioner ordererTarget; - /** * Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller. */ - @Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Identifiers assigned to this order", formalDefinition="Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller." ) protected List identifier; + /** + * The status of the order. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error", formalDefinition="The status of the order." ) + protected Enumeration status; + + /** + * The clinical priority associated with this order. + */ + @Child(name = "priority", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="routine | urgent | stat | asap", formalDefinition="The clinical priority associated with this order." ) + protected Enumeration priority; + + /** + * On whom or what the investigation is to be performed. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans). + */ + @Child(name = "subject", type = {Patient.class, Group.class, Location.class, Device.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who and/or what test is about", formalDefinition="On whom or what the investigation is to be performed. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans)." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (On whom or what the investigation is to be performed. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) + */ + protected Resource subjectTarget; + /** * An encounter that provides additional information about the healthcare context in which this request is made. */ - @Child(name = "encounter", type = {Encounter.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "encounter", type = {Encounter.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="The encounter that this diagnostic order is associated with", formalDefinition="An encounter that provides additional information about the healthcare context in which this request is made." ) protected Reference encounter; @@ -1138,17 +1138,29 @@ public class DiagnosticOrder extends DomainResource { */ protected Encounter encounterTarget; + /** + * The practitioner that holds legal responsibility for ordering the investigation. + */ + @Child(name = "orderer", type = {Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who ordered the test", formalDefinition="The practitioner that holds legal responsibility for ordering the investigation." ) + protected Reference orderer; + + /** + * The actual object that is the target of the reference (The practitioner that holds legal responsibility for ordering the investigation.) + */ + protected Practitioner ordererTarget; + /** * An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation. */ - @Child(name = "reason", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "reason", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Explanation/Justification for test", formalDefinition="An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation." ) protected List reason; /** * Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order. */ - @Child(name = "supportingInformation", type = {Observation.class, Condition.class, DocumentReference.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "supportingInformation", type = {Observation.class, Condition.class, DocumentReference.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Additional clinical information", formalDefinition="Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order." ) protected List supportingInformation; /** @@ -1160,7 +1172,7 @@ public class DiagnosticOrder extends DomainResource { /** * One or more specimens that the diagnostic investigation is about. */ - @Child(name = "specimen", type = {Specimen.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "specimen", type = {Specimen.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="If the whole order relates to specific specimens", formalDefinition="One or more specimens that the diagnostic investigation is about." ) protected List specimen; /** @@ -1169,20 +1181,6 @@ public class DiagnosticOrder extends DomainResource { protected List specimenTarget; - /** - * The status of the order. - */ - @Child(name = "status", type = {CodeType.class}, order=7, min=0, max=1, modifier=true, summary=true) - @Description(shortDefinition="proposed | draft | planned | requested | received | accepted | in-progress | review | completed | cancelled | suspended | rejected | failed | entered-in-error", formalDefinition="The status of the order." ) - protected Enumeration status; - - /** - * The clinical priority associated with this order. - */ - @Child(name = "priority", type = {CodeType.class}, order=8, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="routine | urgent | stat | asap", formalDefinition="The clinical priority associated with this order." ) - protected Enumeration priority; - /** * A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed. */ @@ -1204,7 +1202,7 @@ public class DiagnosticOrder extends DomainResource { @Description(shortDefinition="Other notes and comments", formalDefinition="Any other notes associated with this patient, specimen or order (e.g. \"patient hates needles\")." ) protected List note; - private static final long serialVersionUID = 700891227L; + private static final long serialVersionUID = 1170289657L; /** * Constructor @@ -1221,89 +1219,6 @@ public class DiagnosticOrder extends DomainResource { this.subject = subject; } - /** - * @return {@link #subject} (Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) - */ - public Reference getSubject() { - if (this.subject == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DiagnosticOrder.subject"); - else if (Configuration.doAutoCreate()) - this.subject = new Reference(); // cc - return this.subject; - } - - public boolean hasSubject() { - return this.subject != null && !this.subject.isEmpty(); - } - - /** - * @param value {@link #subject} (Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) - */ - public DiagnosticOrder setSubject(Reference value) { - this.subject = value; - return this; - } - - /** - * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) - */ - public Resource getSubjectTarget() { - return this.subjectTarget; - } - - /** - * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) - */ - public DiagnosticOrder setSubjectTarget(Resource value) { - this.subjectTarget = value; - return this; - } - - /** - * @return {@link #orderer} (The practitioner that holds legal responsibility for ordering the investigation.) - */ - public Reference getOrderer() { - if (this.orderer == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DiagnosticOrder.orderer"); - else if (Configuration.doAutoCreate()) - this.orderer = new Reference(); // cc - return this.orderer; - } - - public boolean hasOrderer() { - return this.orderer != null && !this.orderer.isEmpty(); - } - - /** - * @param value {@link #orderer} (The practitioner that holds legal responsibility for ordering the investigation.) - */ - public DiagnosticOrder setOrderer(Reference value) { - this.orderer = value; - return this; - } - - /** - * @return {@link #orderer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner that holds legal responsibility for ordering the investigation.) - */ - public Practitioner getOrdererTarget() { - if (this.ordererTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DiagnosticOrder.orderer"); - else if (Configuration.doAutoCreate()) - this.ordererTarget = new Practitioner(); // aa - return this.ordererTarget; - } - - /** - * @param value {@link #orderer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner that holds legal responsibility for ordering the investigation.) - */ - public DiagnosticOrder setOrdererTarget(Practitioner value) { - this.ordererTarget = value; - return this; - } - /** * @return {@link #identifier} (Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.) */ @@ -1344,6 +1259,143 @@ public class DiagnosticOrder extends DomainResource { return this; } + /** + * @return {@link #status} (The status of the order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrder.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new DiagnosticOrderStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public DiagnosticOrder setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the order. + */ + public DiagnosticOrderStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the order. + */ + public DiagnosticOrder setStatus(DiagnosticOrderStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new DiagnosticOrderStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + + /** + * @return {@link #priority} (The clinical priority associated with this order.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value + */ + public Enumeration getPriorityElement() { + if (this.priority == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrder.priority"); + else if (Configuration.doAutoCreate()) + this.priority = new Enumeration(new DiagnosticOrderPriorityEnumFactory()); // bb + return this.priority; + } + + public boolean hasPriorityElement() { + return this.priority != null && !this.priority.isEmpty(); + } + + public boolean hasPriority() { + return this.priority != null && !this.priority.isEmpty(); + } + + /** + * @param value {@link #priority} (The clinical priority associated with this order.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value + */ + public DiagnosticOrder setPriorityElement(Enumeration value) { + this.priority = value; + return this; + } + + /** + * @return The clinical priority associated with this order. + */ + public DiagnosticOrderPriority getPriority() { + return this.priority == null ? null : this.priority.getValue(); + } + + /** + * @param value The clinical priority associated with this order. + */ + public DiagnosticOrder setPriority(DiagnosticOrderPriority value) { + if (value == null) + this.priority = null; + else { + if (this.priority == null) + this.priority = new Enumeration(new DiagnosticOrderPriorityEnumFactory()); + this.priority.setValue(value); + } + return this; + } + + /** + * @return {@link #subject} (On whom or what the investigation is to be performed. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrder.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (On whom or what the investigation is to be performed. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) + */ + public DiagnosticOrder setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (On whom or what the investigation is to be performed. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (On whom or what the investigation is to be performed. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).) + */ + public DiagnosticOrder setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + /** * @return {@link #encounter} (An encounter that provides additional information about the healthcare context in which this request is made.) */ @@ -1388,6 +1440,50 @@ public class DiagnosticOrder extends DomainResource { return this; } + /** + * @return {@link #orderer} (The practitioner that holds legal responsibility for ordering the investigation.) + */ + public Reference getOrderer() { + if (this.orderer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrder.orderer"); + else if (Configuration.doAutoCreate()) + this.orderer = new Reference(); // cc + return this.orderer; + } + + public boolean hasOrderer() { + return this.orderer != null && !this.orderer.isEmpty(); + } + + /** + * @param value {@link #orderer} (The practitioner that holds legal responsibility for ordering the investigation.) + */ + public DiagnosticOrder setOrderer(Reference value) { + this.orderer = value; + return this; + } + + /** + * @return {@link #orderer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner that holds legal responsibility for ordering the investigation.) + */ + public Practitioner getOrdererTarget() { + if (this.ordererTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create DiagnosticOrder.orderer"); + else if (Configuration.doAutoCreate()) + this.ordererTarget = new Practitioner(); // aa + return this.ordererTarget; + } + + /** + * @param value {@link #orderer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner that holds legal responsibility for ordering the investigation.) + */ + public DiagnosticOrder setOrdererTarget(Practitioner value) { + this.ordererTarget = value; + return this; + } + /** * @return {@link #reason} (An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation.) */ @@ -1538,104 +1634,6 @@ public class DiagnosticOrder extends DomainResource { return r; } - /** - * @return {@link #status} (The status of the order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value - */ - public Enumeration getStatusElement() { - if (this.status == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DiagnosticOrder.status"); - else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new DiagnosticOrderStatusEnumFactory()); // bb - return this.status; - } - - public boolean hasStatusElement() { - return this.status != null && !this.status.isEmpty(); - } - - public boolean hasStatus() { - return this.status != null && !this.status.isEmpty(); - } - - /** - * @param value {@link #status} (The status of the order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value - */ - public DiagnosticOrder setStatusElement(Enumeration value) { - this.status = value; - return this; - } - - /** - * @return The status of the order. - */ - public DiagnosticOrderStatus getStatus() { - return this.status == null ? null : this.status.getValue(); - } - - /** - * @param value The status of the order. - */ - public DiagnosticOrder setStatus(DiagnosticOrderStatus value) { - if (value == null) - this.status = null; - else { - if (this.status == null) - this.status = new Enumeration(new DiagnosticOrderStatusEnumFactory()); - this.status.setValue(value); - } - return this; - } - - /** - * @return {@link #priority} (The clinical priority associated with this order.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value - */ - public Enumeration getPriorityElement() { - if (this.priority == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DiagnosticOrder.priority"); - else if (Configuration.doAutoCreate()) - this.priority = new Enumeration(new DiagnosticOrderPriorityEnumFactory()); // bb - return this.priority; - } - - public boolean hasPriorityElement() { - return this.priority != null && !this.priority.isEmpty(); - } - - public boolean hasPriority() { - return this.priority != null && !this.priority.isEmpty(); - } - - /** - * @param value {@link #priority} (The clinical priority associated with this order.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value - */ - public DiagnosticOrder setPriorityElement(Enumeration value) { - this.priority = value; - return this; - } - - /** - * @return The clinical priority associated with this order. - */ - public DiagnosticOrderPriority getPriority() { - return this.priority == null ? null : this.priority.getValue(); - } - - /** - * @param value The clinical priority associated with this order. - */ - public DiagnosticOrder setPriority(DiagnosticOrderPriority value) { - if (value == null) - this.priority = null; - else { - if (this.priority == null) - this.priority = new Enumeration(new DiagnosticOrderPriorityEnumFactory()); - this.priority.setValue(value); - } - return this; - } - /** * @return {@link #event} (A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed.) */ @@ -1758,15 +1756,15 @@ public class DiagnosticOrder extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("subject", "Reference(Patient|Group|Location|Device)", "Who or what the investigation is to be performed on. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).", 0, java.lang.Integer.MAX_VALUE, subject)); - childrenList.add(new Property("orderer", "Reference(Practitioner)", "The practitioner that holds legal responsibility for ordering the investigation.", 0, java.lang.Integer.MAX_VALUE, orderer)); childrenList.add(new Property("identifier", "Identifier", "Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("status", "code", "The status of the order.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("priority", "code", "The clinical priority associated with this order.", 0, java.lang.Integer.MAX_VALUE, priority)); + childrenList.add(new Property("subject", "Reference(Patient|Group|Location|Device)", "On whom or what the investigation is to be performed. This is usually a human patient, but diagnostic tests can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).", 0, java.lang.Integer.MAX_VALUE, subject)); childrenList.add(new Property("encounter", "Reference(Encounter)", "An encounter that provides additional information about the healthcare context in which this request is made.", 0, java.lang.Integer.MAX_VALUE, encounter)); + childrenList.add(new Property("orderer", "Reference(Practitioner)", "The practitioner that holds legal responsibility for ordering the investigation.", 0, java.lang.Integer.MAX_VALUE, orderer)); childrenList.add(new Property("reason", "CodeableConcept", "An explanation or justification for why this diagnostic investigation is being requested. This is often for billing purposes. May relate to the resources referred to in supportingInformation.", 0, java.lang.Integer.MAX_VALUE, reason)); childrenList.add(new Property("supportingInformation", "Reference(Observation|Condition|DocumentReference)", "Additional clinical information about the patient or specimen that may influence test interpretations. This includes observations explicitly requested by the producer(filler) to provide context or supporting information needed to complete the order.", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); childrenList.add(new Property("specimen", "Reference(Specimen)", "One or more specimens that the diagnostic investigation is about.", 0, java.lang.Integer.MAX_VALUE, specimen)); - childrenList.add(new Property("status", "code", "The status of the order.", 0, java.lang.Integer.MAX_VALUE, status)); - childrenList.add(new Property("priority", "code", "The clinical priority associated with this order.", 0, java.lang.Integer.MAX_VALUE, priority)); childrenList.add(new Property("event", "", "A summary of the events of interest that have occurred as the request is processed; e.g. when the order was made, various processing steps (specimens received), when it was completed.", 0, java.lang.Integer.MAX_VALUE, event)); childrenList.add(new Property("item", "", "The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested.", 0, java.lang.Integer.MAX_VALUE, item)); childrenList.add(new Property("note", "Annotation", "Any other notes associated with this patient, specimen or order (e.g. \"patient hates needles\").", 0, java.lang.Integer.MAX_VALUE, note)); @@ -1774,24 +1772,24 @@ public class DiagnosticOrder extends DomainResource { @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("subject")) - this.subject = castToReference(value); // Reference - else if (name.equals("orderer")) - this.orderer = castToReference(value); // Reference - else if (name.equals("identifier")) + if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("status")) + this.status = new DiagnosticOrderStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("priority")) + this.priority = new DiagnosticOrderPriorityEnumFactory().fromType(value); // Enumeration + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference else if (name.equals("encounter")) this.encounter = castToReference(value); // Reference + else if (name.equals("orderer")) + this.orderer = castToReference(value); // Reference else if (name.equals("reason")) this.getReason().add(castToCodeableConcept(value)); else if (name.equals("supportingInformation")) this.getSupportingInformation().add(castToReference(value)); else if (name.equals("specimen")) this.getSpecimen().add(castToReference(value)); - else if (name.equals("status")) - this.status = new DiagnosticOrderStatusEnumFactory().fromType(value); // Enumeration - else if (name.equals("priority")) - this.priority = new DiagnosticOrderPriorityEnumFactory().fromType(value); // Enumeration else if (name.equals("event")) this.getEvent().add((DiagnosticOrderEventComponent) value); else if (name.equals("item")) @@ -1804,21 +1802,27 @@ public class DiagnosticOrder extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("subject")) { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.status"); + } + else if (name.equals("priority")) { + throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.priority"); + } + else if (name.equals("subject")) { this.subject = new Reference(); return this.subject; } - else if (name.equals("orderer")) { - this.orderer = new Reference(); - return this.orderer; - } - else if (name.equals("identifier")) { - return addIdentifier(); - } else if (name.equals("encounter")) { this.encounter = new Reference(); return this.encounter; } + else if (name.equals("orderer")) { + this.orderer = new Reference(); + return this.orderer; + } else if (name.equals("reason")) { return addReason(); } @@ -1828,12 +1832,6 @@ 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"); - } - else if (name.equals("priority")) { - throw new FHIRException("Cannot call addChild on a primitive type DiagnosticOrder.priority"); - } else if (name.equals("event")) { return addEvent(); } @@ -1855,14 +1853,16 @@ public class DiagnosticOrder extends DomainResource { public DiagnosticOrder copy() { DiagnosticOrder dst = new DiagnosticOrder(); copyValues(dst); - dst.subject = subject == null ? null : subject.copy(); - dst.orderer = orderer == null ? null : orderer.copy(); if (identifier != null) { dst.identifier = new ArrayList(); for (Identifier i : identifier) dst.identifier.add(i.copy()); }; + dst.status = status == null ? null : status.copy(); + dst.priority = priority == null ? null : priority.copy(); + dst.subject = subject == null ? null : subject.copy(); dst.encounter = encounter == null ? null : encounter.copy(); + dst.orderer = orderer == null ? null : orderer.copy(); if (reason != null) { dst.reason = new ArrayList(); for (CodeableConcept i : reason) @@ -1878,8 +1878,6 @@ public class DiagnosticOrder extends DomainResource { for (Reference i : specimen) dst.specimen.add(i.copy()); }; - dst.status = status == null ? null : status.copy(); - dst.priority = priority == null ? null : priority.copy(); if (event != null) { dst.event = new ArrayList(); for (DiagnosticOrderEventComponent i : event) @@ -1909,11 +1907,11 @@ public class DiagnosticOrder extends DomainResource { if (!(other instanceof DiagnosticOrder)) return false; DiagnosticOrder o = (DiagnosticOrder) other; - return compareDeep(subject, o.subject, true) && compareDeep(orderer, o.orderer, true) && compareDeep(identifier, o.identifier, true) - && compareDeep(encounter, o.encounter, true) && compareDeep(reason, o.reason, true) && compareDeep(supportingInformation, o.supportingInformation, true) - && compareDeep(specimen, o.specimen, true) && compareDeep(status, o.status, true) && compareDeep(priority, o.priority, true) - && compareDeep(event, o.event, true) && compareDeep(item, o.item, true) && compareDeep(note, o.note, true) - ; + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(priority, o.priority, true) + && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) && compareDeep(orderer, o.orderer, true) + && compareDeep(reason, o.reason, true) && compareDeep(supportingInformation, o.supportingInformation, true) + && compareDeep(specimen, o.specimen, true) && compareDeep(event, o.event, true) && compareDeep(item, o.item, true) + && compareDeep(note, o.note, true); } @Override @@ -1927,12 +1925,9 @@ public class DiagnosticOrder extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (subject == null || subject.isEmpty()) && (orderer == null || orderer.isEmpty()) - && (identifier == null || identifier.isEmpty()) && (encounter == null || encounter.isEmpty()) - && (reason == null || reason.isEmpty()) && (supportingInformation == null || supportingInformation.isEmpty()) - && (specimen == null || specimen.isEmpty()) && (status == null || status.isEmpty()) && (priority == null || priority.isEmpty()) - && (event == null || event.isEmpty()) && (item == null || item.isEmpty()) && (note == null || note.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, priority + , subject, encounter, orderer, reason, supportingInformation, specimen, event, item + , note); } @Override @@ -2068,7 +2063,7 @@ public class DiagnosticOrder extends DomainResource { * Path: DiagnosticOrder.subject
*

*/ - @SearchParamDefinition(name="subject", path="DiagnosticOrder.subject", description="Who and/or what test is about", type="reference" ) + @SearchParamDefinition(name="subject", path="DiagnosticOrder.subject", description="Who and/or what test is about", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject @@ -2094,7 +2089,7 @@ public class DiagnosticOrder extends DomainResource { * Path: DiagnosticOrder.encounter
*

*/ - @SearchParamDefinition(name="encounter", path="DiagnosticOrder.encounter", description="The encounter that this diagnostic order is associated with", type="reference" ) + @SearchParamDefinition(name="encounter", path="DiagnosticOrder.encounter", description="The encounter that this diagnostic order is associated with", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) public static final String SP_ENCOUNTER = "encounter"; /** * Fluent Client search parameter constant for encounter @@ -2120,7 +2115,7 @@ public class DiagnosticOrder extends DomainResource { * Path: DiagnosticOrder.event.actor, DiagnosticOrder.item.event.actor
*

*/ - @SearchParamDefinition(name="actor", path="DiagnosticOrder.event.actor | DiagnosticOrder.item.event.actor", description="Who recorded or did this", type="reference" ) + @SearchParamDefinition(name="actor", path="DiagnosticOrder.event.actor | DiagnosticOrder.item.event.actor", description="Who recorded or did this", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_ACTOR = "actor"; /** * Fluent Client search parameter constant for actor @@ -2252,7 +2247,7 @@ public class DiagnosticOrder extends DomainResource { * Path: DiagnosticOrder.orderer
*

*/ - @SearchParamDefinition(name="orderer", path="DiagnosticOrder.orderer", description="Who ordered the test", type="reference" ) + @SearchParamDefinition(name="orderer", path="DiagnosticOrder.orderer", description="Who ordered the test", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_ORDERER = "orderer"; /** * Fluent Client search parameter constant for orderer diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DiagnosticReport.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DiagnosticReport.java index 291478753f4..f00f68ca092 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DiagnosticReport.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DiagnosticReport.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. */ @@ -62,7 +61,7 @@ public class DiagnosticReport extends DomainResource { */ FINAL, /** - * The report has been modified subsequent to being Final, and is complete and verified by an authorized person. New content has been added, but existing content hasn't changed + * The report has been modified subsequent to being Final, and is complete and verified by an authorized person */ CORRECTED, /** @@ -129,7 +128,7 @@ public class DiagnosticReport extends DomainResource { case REGISTERED: return "The existence of the report is registered, but there is nothing yet available."; case PARTIAL: return "This is a partial (e.g. initial, interim or preliminary) report: data in the report may be incomplete or unverified."; case FINAL: return "The report is complete and verified by an authorized person."; - case CORRECTED: return "The report has been modified subsequent to being Final, and is complete and verified by an authorized person. New content has been added, but existing content hasn't changed"; + case CORRECTED: return "The report has been modified subsequent to being Final, and is complete and verified by an authorized person"; case APPENDED: return "The report has been modified subsequent to being Final, and is complete and verified by an authorized person. New content has been added, but existing content hasn't changed."; case CANCELLED: return "The report is unavailable because the measurement was not started or not completed (also sometimes called \"aborted\")."; case ENTEREDINERROR: return "The report has been withdrawn following a previous final release."; @@ -404,8 +403,7 @@ public class DiagnosticReport extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (comment == null || comment.isEmpty()) && (link == null || link.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( comment, link); } public String fhirType() { @@ -1545,13 +1543,9 @@ public class DiagnosticReport extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) - && (category == null || category.isEmpty()) && (code == null || code.isEmpty()) && (subject == null || subject.isEmpty()) - && (encounter == null || encounter.isEmpty()) && (effective == null || effective.isEmpty()) - && (issued == null || issued.isEmpty()) && (performer == null || performer.isEmpty()) && (request == null || request.isEmpty()) - && (specimen == null || specimen.isEmpty()) && (result == null || result.isEmpty()) && (imagingStudy == null || imagingStudy.isEmpty()) - && (image == null || image.isEmpty()) && (conclusion == null || conclusion.isEmpty()) && (codedDiagnosis == null || codedDiagnosis.isEmpty()) - && (presentedForm == null || presentedForm.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, category + , code, subject, encounter, effective, issued, performer, request, specimen, result + , imagingStudy, image, conclusion, codedDiagnosis, presentedForm); } @Override @@ -1659,7 +1653,7 @@ public class DiagnosticReport extends DomainResource { * Path: DiagnosticReport.performer
*

*/ - @SearchParamDefinition(name="performer", path="DiagnosticReport.performer", description="Who was the source of the report (organization)", type="reference" ) + @SearchParamDefinition(name="performer", path="DiagnosticReport.performer", description="Who was the source of the report (organization)", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_PERFORMER = "performer"; /** * Fluent Client search parameter constant for performer @@ -1705,7 +1699,7 @@ public class DiagnosticReport extends DomainResource { * Path: DiagnosticReport.subject
*

*/ - @SearchParamDefinition(name="subject", path="DiagnosticReport.subject", description="The subject of the report", type="reference" ) + @SearchParamDefinition(name="subject", path="DiagnosticReport.subject", description="The subject of the report", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject @@ -1751,7 +1745,7 @@ public class DiagnosticReport extends DomainResource { * Path: DiagnosticReport.encounter
*

*/ - @SearchParamDefinition(name="encounter", path="DiagnosticReport.encounter", description="The Encounter when the order was made", type="reference" ) + @SearchParamDefinition(name="encounter", path="DiagnosticReport.encounter", description="The Encounter when the order was made", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) public static final String SP_ENCOUNTER = "encounter"; /** * Fluent Client search parameter constant for encounter diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Distance.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Distance.java index ab2a1c8ca5f..b21cc8d39be 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Distance.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Distance.java @@ -29,13 +29,12 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. */ @@ -82,9 +81,8 @@ public class Distance extends Quantity { } public boolean isEmpty() { - return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty()) - && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value, comparator, unit, system + , code); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DocumentManifest.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DocumentManifest.java index b8db7b643e1..f55470345fc 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DocumentManifest.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DocumentManifest.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A manifest that defines a set of documents. */ @@ -55,7 +53,7 @@ public class DocumentManifest extends DomainResource { /** * The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed. */ - @Child(name = "p", type = {Attachment.class, ValueSet.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Child(name = "p", type = {Attachment.class}, order=1, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Contents of this set of documents", formalDefinition="The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed." ) protected Type p; @@ -176,7 +174,7 @@ public class DocumentManifest extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (p == null || p.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( p); } public String fhirType() { @@ -338,8 +336,7 @@ public class DocumentManifest extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ref == null || ref.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, ref); } public String fhirType() { @@ -1126,11 +1123,8 @@ public class DocumentManifest extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (masterIdentifier == null || masterIdentifier.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (subject == null || subject.isEmpty()) && (recipient == null || recipient.isEmpty()) && (type == null || type.isEmpty()) - && (author == null || author.isEmpty()) && (created == null || created.isEmpty()) && (source == null || source.isEmpty()) - && (status == null || status.isEmpty()) && (description == null || description.isEmpty()) - && (content == null || content.isEmpty()) && (related == null || related.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( masterIdentifier, identifier, subject + , recipient, type, author, created, source, status, description, content, related); } @Override @@ -1212,7 +1206,7 @@ public class DocumentManifest extends DomainResource { * Path: DocumentManifest.subject
*

*/ - @SearchParamDefinition(name="subject", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference" ) + @SearchParamDefinition(name="subject", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject @@ -1238,7 +1232,7 @@ public class DocumentManifest extends DomainResource { * Path: DocumentManifest.author
*

*/ - @SearchParamDefinition(name="author", path="DocumentManifest.author", description="Who and/or what authored the manifest", type="reference" ) + @SearchParamDefinition(name="author", path="DocumentManifest.author", description="Who and/or what authored the manifest", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_AUTHOR = "author"; /** * Fluent Client search parameter constant for author @@ -1396,7 +1390,7 @@ public class DocumentManifest extends DomainResource { * Path: DocumentManifest.recipient
*

*/ - @SearchParamDefinition(name="recipient", path="DocumentManifest.recipient", description="Intended to get notified about this set of documents", type="reference" ) + @SearchParamDefinition(name="recipient", path="DocumentManifest.recipient", description="Intended to get notified about this set of documents", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_RECIPIENT = "recipient"; /** * Fluent Client search parameter constant for recipient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DocumentReference.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DocumentReference.java index 0fb70bab49d..d43e10ea949 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DocumentReference.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DocumentReference.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A reference to a document . */ @@ -355,8 +353,7 @@ public class DocumentReference extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (target == null || target.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, target); } public String fhirType() { @@ -525,8 +522,7 @@ public class DocumentReference extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (attachment == null || attachment.isEmpty()) && (format == null || format.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( attachment, format); } public String fhirType() { @@ -954,10 +950,8 @@ public class DocumentReference extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (encounter == null || encounter.isEmpty()) && (event == null || event.isEmpty()) - && (period == null || period.isEmpty()) && (facilityType == null || facilityType.isEmpty()) - && (practiceSetting == null || practiceSetting.isEmpty()) && (sourcePatientInfo == null || sourcePatientInfo.isEmpty()) - && (related == null || related.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( encounter, event, period, facilityType + , practiceSetting, sourcePatientInfo, related); } public String fhirType() { @@ -1119,8 +1113,7 @@ public class DocumentReference extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ref == null || ref.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, ref); } public String fhirType() { @@ -2133,13 +2126,9 @@ public class DocumentReference extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (masterIdentifier == null || masterIdentifier.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (subject == null || subject.isEmpty()) && (type == null || type.isEmpty()) && (class_ == null || class_.isEmpty()) - && (author == null || author.isEmpty()) && (custodian == null || custodian.isEmpty()) && (authenticator == null || authenticator.isEmpty()) - && (created == null || created.isEmpty()) && (indexed == null || indexed.isEmpty()) && (status == null || status.isEmpty()) - && (docStatus == null || docStatus.isEmpty()) && (relatesTo == null || relatesTo.isEmpty()) - && (description == null || description.isEmpty()) && (securityLabel == null || securityLabel.isEmpty()) - && (content == null || content.isEmpty()) && (context == null || context.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( masterIdentifier, identifier, subject + , type, class_, author, custodian, authenticator, created, indexed, status, docStatus + , relatesTo, description, securityLabel, content, context); } @Override @@ -2175,7 +2164,7 @@ public class DocumentReference extends DomainResource { * Path: DocumentReference.subject
*

*/ - @SearchParamDefinition(name="subject", path="DocumentReference.subject", description="Who/what is the subject of the document", type="reference" ) + @SearchParamDefinition(name="subject", path="DocumentReference.subject", description="Who/what is the subject of the document", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject @@ -2387,7 +2376,7 @@ public class DocumentReference extends DomainResource { * Path: DocumentReference.authenticator
*

*/ - @SearchParamDefinition(name="authenticator", path="DocumentReference.authenticator", description="Who/what authenticated the document", type="reference" ) + @SearchParamDefinition(name="authenticator", path="DocumentReference.authenticator", description="Who/what authenticated the document", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_AUTHENTICATOR = "authenticator"; /** * Fluent Client search parameter constant for authenticator @@ -2519,7 +2508,7 @@ public class DocumentReference extends DomainResource { * Path: DocumentReference.author
*

*/ - @SearchParamDefinition(name="author", path="DocumentReference.author", description="Who and/or what authored the document", type="reference" ) + @SearchParamDefinition(name="author", path="DocumentReference.author", description="Who and/or what authored the document", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_AUTHOR = "author"; /** * Fluent Client search parameter constant for author diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DomainResource.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DomainResource.java index 53b1167d731..3362cca2630 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DomainResource.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/DomainResource.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -38,9 +38,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A resource that includes narrative, extensions, and contained resources. */ @@ -128,6 +127,16 @@ public abstract class DomainResource extends Resource implements IBaseHasExtensi /** * @return {@link #contained} (These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.) */ + // syntactic sugar + public DomainResource addContained(Resource t) { //3 + if (t == null) + return this; + if (this.contained == null) + this.contained = new ArrayList(); + this.contained.add(t); + return this; + } + /** * @return {@link #extension} (May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.) */ @@ -326,9 +335,8 @@ public abstract class DomainResource extends Resource implements IBaseHasExtensi } public boolean isEmpty() { - return super.isEmpty() && (text == null || text.isEmpty()) && (contained == null || contained.isEmpty()) - && (extension == null || extension.isEmpty()) && (modifierExtension == null || modifierExtension.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( text, contained, extension, modifierExtension + ); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Duration.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Duration.java index d9f1a0801a6..3f9b9c8fb03 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Duration.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Duration.java @@ -29,13 +29,12 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. */ @@ -82,9 +81,8 @@ public class Duration extends Quantity { } public boolean isEmpty() { - return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty()) - && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value, comparator, unit, system + , code); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Element.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Element.java index 72e6d9cb7e3..c4c782a3e05 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Element.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Element.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -38,9 +38,8 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Base definition for all elements in a resource. */ @@ -255,8 +254,7 @@ public abstract class Element extends Base implements IBaseHasExtensions { } public boolean isEmpty() { - return super.isEmpty() && (id == null || id.isEmpty()) && (extension == null || extension.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( id, extension); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ElementDefinition.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ElementDefinition.java index 08bc1f04e15..43a42719acb 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ElementDefinition.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ElementDefinition.java @@ -29,20 +29,18 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Captures constraints on each element within the resource, profile, or extension. */ @@ -54,6 +52,18 @@ public class ElementDefinition extends Type implements ICompositeType { * In XML, this property is represented as an attribute not an element. */ XMLATTR, + /** + * This element is represented using the XML text attribute (primitives only) + */ + XMLTEXT, + /** + * The type of this element is indicated using xsi:type + */ + TYPEATTR, + /** + * Use CDA narrative instead of XHTML + */ + CDATEXT, /** * added to help the parsers */ @@ -63,29 +73,47 @@ public class ElementDefinition extends Type implements ICompositeType { return null; if ("xmlAttr".equals(codeString)) return XMLATTR; + if ("xmlText".equals(codeString)) + return XMLTEXT; + if ("typeAttr".equals(codeString)) + return TYPEATTR; + if ("cdaText".equals(codeString)) + return CDATEXT; throw new FHIRException("Unknown PropertyRepresentation code '"+codeString+"'"); } public String toCode() { switch (this) { case XMLATTR: return "xmlAttr"; + case XMLTEXT: return "xmlText"; + case TYPEATTR: return "typeAttr"; + case CDATEXT: return "cdaText"; default: return "?"; } } public String getSystem() { switch (this) { case XMLATTR: return "http://hl7.org/fhir/property-representation"; + case XMLTEXT: return "http://hl7.org/fhir/property-representation"; + case TYPEATTR: return "http://hl7.org/fhir/property-representation"; + case CDATEXT: return "http://hl7.org/fhir/property-representation"; default: return "?"; } } public String getDefinition() { switch (this) { case XMLATTR: return "In XML, this property is represented as an attribute not an element."; + case XMLTEXT: return "This element is represented using the XML text attribute (primitives only)"; + case TYPEATTR: return "The type of this element is indicated using xsi:type"; + case CDATEXT: return "Use CDA narrative instead of XHTML"; default: return "?"; } } public String getDisplay() { switch (this) { case XMLATTR: return "XML Attribute"; + case XMLTEXT: return "XML Text"; + case TYPEATTR: return "Type Attribute"; + case CDATEXT: return "CDA Text Format"; default: return "?"; } } @@ -98,6 +126,12 @@ public class ElementDefinition extends Type implements ICompositeType { return null; if ("xmlAttr".equals(codeString)) return PropertyRepresentation.XMLATTR; + if ("xmlText".equals(codeString)) + return PropertyRepresentation.XMLTEXT; + if ("typeAttr".equals(codeString)) + return PropertyRepresentation.TYPEATTR; + if ("cdaText".equals(codeString)) + return PropertyRepresentation.CDATEXT; throw new IllegalArgumentException("Unknown PropertyRepresentation code '"+codeString+"'"); } public Enumeration fromType(Base code) throws FHIRException { @@ -108,11 +142,23 @@ public class ElementDefinition extends Type implements ICompositeType { return null; if ("xmlAttr".equals(codeString)) return new Enumeration(this, PropertyRepresentation.XMLATTR); + if ("xmlText".equals(codeString)) + return new Enumeration(this, PropertyRepresentation.XMLTEXT); + if ("typeAttr".equals(codeString)) + return new Enumeration(this, PropertyRepresentation.TYPEATTR); + if ("cdaText".equals(codeString)) + return new Enumeration(this, PropertyRepresentation.CDATEXT); throw new FHIRException("Unknown PropertyRepresentation code '"+codeString+"'"); } public String toCode(PropertyRepresentation code) { if (code == PropertyRepresentation.XMLATTR) return "xmlAttr"; + if (code == PropertyRepresentation.XMLTEXT) + return "xmlText"; + if (code == PropertyRepresentation.TYPEATTR) + return "typeAttr"; + if (code == PropertyRepresentation.CDATEXT) + return "cdaText"; return "?"; } public String toSystem(PropertyRepresentation code) { @@ -326,6 +372,109 @@ public class ElementDefinition extends Type implements ICompositeType { } } + public enum ReferenceVersionRules { + /** + * The reference may be either version independent or version specific + */ + EITHER, + /** + * The reference must be version independent + */ + INDEPENDENT, + /** + * The reference must be version specific + */ + SPECIFIC, + /** + * added to help the parsers + */ + NULL; + public static ReferenceVersionRules fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("either".equals(codeString)) + return EITHER; + if ("independent".equals(codeString)) + return INDEPENDENT; + if ("specific".equals(codeString)) + return SPECIFIC; + throw new FHIRException("Unknown ReferenceVersionRules code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case EITHER: return "either"; + case INDEPENDENT: return "independent"; + case SPECIFIC: return "specific"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case EITHER: return "http://hl7.org/fhir/reference-version-rules"; + case INDEPENDENT: return "http://hl7.org/fhir/reference-version-rules"; + case SPECIFIC: return "http://hl7.org/fhir/reference-version-rules"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case EITHER: return "The reference may be either version independent or version specific"; + case INDEPENDENT: return "The reference must be version independent"; + case SPECIFIC: return "The reference must be version specific"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case EITHER: return "Either Specific or independent"; + case INDEPENDENT: return "Version independent"; + case SPECIFIC: return "Version Specific"; + default: return "?"; + } + } + } + + public static class ReferenceVersionRulesEnumFactory implements EnumFactory { + public ReferenceVersionRules fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("either".equals(codeString)) + return ReferenceVersionRules.EITHER; + if ("independent".equals(codeString)) + return ReferenceVersionRules.INDEPENDENT; + if ("specific".equals(codeString)) + return ReferenceVersionRules.SPECIFIC; + throw new IllegalArgumentException("Unknown ReferenceVersionRules code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("either".equals(codeString)) + return new Enumeration(this, ReferenceVersionRules.EITHER); + if ("independent".equals(codeString)) + return new Enumeration(this, ReferenceVersionRules.INDEPENDENT); + if ("specific".equals(codeString)) + return new Enumeration(this, ReferenceVersionRules.SPECIFIC); + throw new FHIRException("Unknown ReferenceVersionRules code '"+codeString+"'"); + } + public String toCode(ReferenceVersionRules code) { + if (code == ReferenceVersionRules.EITHER) + return "either"; + if (code == ReferenceVersionRules.INDEPENDENT) + return "independent"; + if (code == ReferenceVersionRules.SPECIFIC) + return "specific"; + return "?"; + } + public String toSystem(ReferenceVersionRules code) { + return code.getSystem(); + } + } + public enum ConstraintSeverity { /** * If the constraint is violated, the resource is not conformant. @@ -419,7 +568,7 @@ public class ElementDefinition extends Type implements ICompositeType { * Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices. */ @Child(name = "discriminator", type = {StringType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Element values that used to distinguish the slices", formalDefinition="Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices." ) + @Description(shortDefinition="Element values that are used to distinguish the slices", formalDefinition="Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices." ) protected List discriminator; /** @@ -730,8 +879,8 @@ public class ElementDefinition extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (discriminator == null || discriminator.isEmpty()) && (description == null || description.isEmpty()) - && (ordered == null || ordered.isEmpty()) && (rules == null || rules.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( discriminator, description, ordered + , rules); } public String fhirType() { @@ -984,8 +1133,7 @@ public class ElementDefinition extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (path == null || path.isEmpty()) && (min == null || min.isEmpty()) - && (max == null || max.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( path, min, max); } public String fhirType() { @@ -1018,7 +1166,14 @@ public class ElementDefinition extends Type implements ICompositeType { @Description(shortDefinition="contained | referenced | bundled - how aggregated", formalDefinition="If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle." ) protected List> aggregation; - private static final long serialVersionUID = -988693373L; + /** + * Whether this reference needs to be version specific or version independent, or whetehr either can be used. + */ + @Child(name = "versioning", type = {CodeType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="either | independent | specific", formalDefinition="Whether this reference needs to be version specific or version independent, or whetehr either can be used." ) + protected Enumeration versioning; + + private static final long serialVersionUID = -829583924L; /** * Constructor @@ -1188,11 +1343,61 @@ public class ElementDefinition extends Type implements ICompositeType { return false; } + /** + * @return {@link #versioning} (Whether this reference needs to be version specific or version independent, or whetehr either can be used.). This is the underlying object with id, value and extensions. The accessor "getVersioning" gives direct access to the value + */ + public Enumeration getVersioningElement() { + if (this.versioning == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TypeRefComponent.versioning"); + else if (Configuration.doAutoCreate()) + this.versioning = new Enumeration(new ReferenceVersionRulesEnumFactory()); // bb + return this.versioning; + } + + public boolean hasVersioningElement() { + return this.versioning != null && !this.versioning.isEmpty(); + } + + public boolean hasVersioning() { + return this.versioning != null && !this.versioning.isEmpty(); + } + + /** + * @param value {@link #versioning} (Whether this reference needs to be version specific or version independent, or whetehr either can be used.). This is the underlying object with id, value and extensions. The accessor "getVersioning" gives direct access to the value + */ + public TypeRefComponent setVersioningElement(Enumeration value) { + this.versioning = value; + return this; + } + + /** + * @return Whether this reference needs to be version specific or version independent, or whetehr either can be used. + */ + public ReferenceVersionRules getVersioning() { + return this.versioning == null ? null : this.versioning.getValue(); + } + + /** + * @param value Whether this reference needs to be version specific or version independent, or whetehr either can be used. + */ + public TypeRefComponent setVersioning(ReferenceVersionRules value) { + if (value == null) + this.versioning = null; + else { + if (this.versioning == null) + this.versioning = new Enumeration(new ReferenceVersionRulesEnumFactory()); + this.versioning.setValue(value); + } + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("code", "code", "Name of Data type or Resource that is a(or the) type used for this element.", 0, java.lang.Integer.MAX_VALUE, code)); childrenList.add(new Property("profile", "uri", "Identifies a profile structure or implementation Guide that SHALL hold for resources or datatypes referenced as the type of this element. Can be a local reference - to another structure in this profile, or a reference to a structure in another profile. When more than one profile is specified, the content must conform to all of them. When an implementation guide is specified, the resource SHALL conform to at least one profile defined in the implementation guide.", 0, java.lang.Integer.MAX_VALUE, profile)); childrenList.add(new Property("aggregation", "code", "If the type is a reference to another resource, how the resource is or can be aggregated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle.", 0, java.lang.Integer.MAX_VALUE, aggregation)); + childrenList.add(new Property("versioning", "code", "Whether this reference needs to be version specific or version independent, or whetehr either can be used.", 0, java.lang.Integer.MAX_VALUE, versioning)); } @Override @@ -1203,6 +1408,8 @@ public class ElementDefinition extends Type implements ICompositeType { this.getProfile().add(castToUri(value)); else if (name.equals("aggregation")) this.getAggregation().add(new AggregationModeEnumFactory().fromType(value)); + else if (name.equals("versioning")) + this.versioning = new ReferenceVersionRulesEnumFactory().fromType(value); // Enumeration else super.setProperty(name, value); } @@ -1218,6 +1425,9 @@ public class ElementDefinition extends Type implements ICompositeType { else if (name.equals("aggregation")) { throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.aggregation"); } + else if (name.equals("versioning")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.versioning"); + } else return super.addChild(name); } @@ -1236,6 +1446,7 @@ public class ElementDefinition extends Type implements ICompositeType { for (Enumeration i : aggregation) dst.aggregation.add(i.copy()); }; + dst.versioning = versioning == null ? null : versioning.copy(); return dst; } @@ -1247,7 +1458,7 @@ public class ElementDefinition extends Type implements ICompositeType { return false; TypeRefComponent o = (TypeRefComponent) other; return compareDeep(code, o.code, true) && compareDeep(profile, o.profile, true) && compareDeep(aggregation, o.aggregation, true) - ; + && compareDeep(versioning, o.versioning, true); } @Override @@ -1258,12 +1469,12 @@ public class ElementDefinition extends Type implements ICompositeType { return false; TypeRefComponent o = (TypeRefComponent) other; return compareValues(code, o.code, true) && compareValues(profile, o.profile, true) && compareValues(aggregation, o.aggregation, true) - ; + && compareValues(versioning, o.versioning, true); } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (profile == null || profile.isEmpty()) - && (aggregation == null || aggregation.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, profile, aggregation, versioning + ); } public String fhirType() { @@ -1286,7 +1497,7 @@ public class ElementDefinition extends Type implements ICompositeType { * Description of why this constraint is necessary or appropriate. */ @Child(name = "requirements", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Why this constraint necessary or appropriate", formalDefinition="Description of why this constraint is necessary or appropriate." ) + @Description(shortDefinition="Why this constraint is necessary or appropriate", formalDefinition="Description of why this constraint is necessary or appropriate." ) protected StringType requirements; /** @@ -1303,14 +1514,21 @@ public class ElementDefinition extends Type implements ICompositeType { @Description(shortDefinition="Human description of constraint", formalDefinition="Text that can be used to describe the constraint in messages identifying that the constraint has been violated." ) protected StringType human; + /** + * A [FluentPath](fluentpath.html) expression of constraint that can be executed to see if this constraint is met. + */ + @Child(name = "expression", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="FluentPath expression of constraint", formalDefinition="A [FluentPath](fluentpath.html) expression of constraint that can be executed to see if this constraint is met." ) + protected StringType expression; + /** * An XPath expression of constraint that can be executed to see if this constraint is met. */ - @Child(name = "xpath", type = {StringType.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Child(name = "xpath", type = {StringType.class}, order=6, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="XPath expression of constraint", formalDefinition="An XPath expression of constraint that can be executed to see if this constraint is met." ) protected StringType xpath; - private static final long serialVersionUID = 854521265L; + private static final long serialVersionUID = -1412249932L; /** * Constructor @@ -1514,6 +1732,55 @@ public class ElementDefinition extends Type implements ICompositeType { return this; } + /** + * @return {@link #expression} (A [FluentPath](fluentpath.html) expression of constraint that can be executed to see if this constraint is met.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value + */ + public StringType getExpressionElement() { + if (this.expression == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinitionConstraintComponent.expression"); + else if (Configuration.doAutoCreate()) + this.expression = new StringType(); // bb + return this.expression; + } + + public boolean hasExpressionElement() { + return this.expression != null && !this.expression.isEmpty(); + } + + public boolean hasExpression() { + return this.expression != null && !this.expression.isEmpty(); + } + + /** + * @param value {@link #expression} (A [FluentPath](fluentpath.html) expression of constraint that can be executed to see if this constraint is met.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value + */ + public ElementDefinitionConstraintComponent setExpressionElement(StringType value) { + this.expression = value; + return this; + } + + /** + * @return A [FluentPath](fluentpath.html) expression of constraint that can be executed to see if this constraint is met. + */ + public String getExpression() { + return this.expression == null ? null : this.expression.getValue(); + } + + /** + * @param value A [FluentPath](fluentpath.html) expression of constraint that can be executed to see if this constraint is met. + */ + public ElementDefinitionConstraintComponent setExpression(String value) { + if (Utilities.noString(value)) + this.expression = null; + else { + if (this.expression == null) + this.expression = new StringType(); + this.expression.setValue(value); + } + return this; + } + /** * @return {@link #xpath} (An XPath expression of constraint that can be executed to see if this constraint is met.). This is the underlying object with id, value and extensions. The accessor "getXpath" gives direct access to the value */ @@ -1565,6 +1832,7 @@ public class ElementDefinition extends Type implements ICompositeType { childrenList.add(new Property("requirements", "string", "Description of why this constraint is necessary or appropriate.", 0, java.lang.Integer.MAX_VALUE, requirements)); childrenList.add(new Property("severity", "code", "Identifies the impact constraint violation has on the conformance of the instance.", 0, java.lang.Integer.MAX_VALUE, severity)); childrenList.add(new Property("human", "string", "Text that can be used to describe the constraint in messages identifying that the constraint has been violated.", 0, java.lang.Integer.MAX_VALUE, human)); + childrenList.add(new Property("expression", "string", "A [FluentPath](fluentpath.html) expression of constraint that can be executed to see if this constraint is met.", 0, java.lang.Integer.MAX_VALUE, expression)); childrenList.add(new Property("xpath", "string", "An XPath expression of constraint that can be executed to see if this constraint is met.", 0, java.lang.Integer.MAX_VALUE, xpath)); } @@ -1578,6 +1846,8 @@ public class ElementDefinition extends Type implements ICompositeType { this.severity = new ConstraintSeverityEnumFactory().fromType(value); // Enumeration else if (name.equals("human")) this.human = castToString(value); // StringType + else if (name.equals("expression")) + this.expression = castToString(value); // StringType else if (name.equals("xpath")) this.xpath = castToString(value); // StringType else @@ -1598,6 +1868,9 @@ public class ElementDefinition extends Type implements ICompositeType { else if (name.equals("human")) { throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.human"); } + else if (name.equals("expression")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.expression"); + } else if (name.equals("xpath")) { throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.xpath"); } @@ -1612,6 +1885,7 @@ public class ElementDefinition extends Type implements ICompositeType { dst.requirements = requirements == null ? null : requirements.copy(); dst.severity = severity == null ? null : severity.copy(); dst.human = human == null ? null : human.copy(); + dst.expression = expression == null ? null : expression.copy(); dst.xpath = xpath == null ? null : xpath.copy(); return dst; } @@ -1624,7 +1898,8 @@ public class ElementDefinition extends Type implements ICompositeType { return false; ElementDefinitionConstraintComponent o = (ElementDefinitionConstraintComponent) other; return compareDeep(key, o.key, true) && compareDeep(requirements, o.requirements, true) && compareDeep(severity, o.severity, true) - && compareDeep(human, o.human, true) && compareDeep(xpath, o.xpath, true); + && compareDeep(human, o.human, true) && compareDeep(expression, o.expression, true) && compareDeep(xpath, o.xpath, true) + ; } @Override @@ -1635,13 +1910,13 @@ public class ElementDefinition extends Type implements ICompositeType { return false; ElementDefinitionConstraintComponent o = (ElementDefinitionConstraintComponent) other; return compareValues(key, o.key, true) && compareValues(requirements, o.requirements, true) && compareValues(severity, o.severity, true) - && compareValues(human, o.human, true) && compareValues(xpath, o.xpath, true); + && compareValues(human, o.human, true) && compareValues(expression, o.expression, true) && compareValues(xpath, o.xpath, true) + ; } public boolean isEmpty() { - return super.isEmpty() && (key == null || key.isEmpty()) && (requirements == null || requirements.isEmpty()) - && (severity == null || severity.isEmpty()) && (human == null || human.isEmpty()) && (xpath == null || xpath.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( key, requirements, severity, human + , expression, xpath); } public String fhirType() { @@ -1901,8 +2176,8 @@ public class ElementDefinition extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (strength == null || strength.isEmpty()) && (description == null || description.isEmpty()) - && (valueSet == null || valueSet.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( strength, description, valueSet + ); } public String fhirType() { @@ -2158,8 +2433,7 @@ public class ElementDefinition extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (identity == null || identity.isEmpty()) && (language == null || language.isEmpty()) - && (map == null || map.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identity, language, map); } public String fhirType() { @@ -2180,14 +2454,14 @@ public class ElementDefinition extends Type implements ICompositeType { * Codes that define how this element is represented in instances, when the deviation varies from the normal case. */ @Child(name = "representation", type = {CodeType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="How this element is represented in instances", formalDefinition="Codes that define how this element is represented in instances, when the deviation varies from the normal case." ) + @Description(shortDefinition="xmlAttr | xmlText | typeAttr | cdaText", formalDefinition="Codes that define how this element is represented in instances, when the deviation varies from the normal case." ) protected List> representation; /** - * The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element. + * The name of this element definition. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element. */ @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Name for this particular element definition (reference target)", formalDefinition="The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element." ) + @Description(shortDefinition="Name for this particular element definition (reference target)", formalDefinition="The name of this element definition. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element." ) protected StringType name; /** @@ -2236,7 +2510,7 @@ public class ElementDefinition extends Type implements ICompositeType { * This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element. */ @Child(name = "requirements", type = {MarkdownType.class}, order=9, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Why is this needed?", formalDefinition="This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element." ) + @Description(shortDefinition="Why this resource has been created", formalDefinition="This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element." ) protected MarkdownType requirements; /** @@ -2261,31 +2535,31 @@ public class ElementDefinition extends Type implements ICompositeType { protected StringType max; /** - * Information about the base definition of the element, provided to make it unncessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition. + * Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition. */ @Child(name = "base", type = {}, order=13, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Base definition information for tools", formalDefinition="Information about the base definition of the element, provided to make it unncessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition." ) + @Description(shortDefinition="Base definition information for tools", formalDefinition="Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition." ) protected ElementDefinitionBaseComponent base; + /** + * Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element. + */ + @Child(name = "contentReference", type = {UriType.class}, order=14, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reference to definition of content for the element", formalDefinition="Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element." ) + protected UriType contentReference; + /** * The data type or resource that the value of this element is permitted to be. */ - @Child(name = "type", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "type", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Data type and Profile for this element", formalDefinition="The data type or resource that the value of this element is permitted to be." ) protected List type; - /** - * Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element. - */ - @Child(name = "nameReference", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="To another element constraint (by element.name)", formalDefinition="Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element." ) - protected StringType nameReference; - /** * The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false'). */ @Child(name = "defaultValue", type = {}, order=16, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Specified value it missing from instance", formalDefinition="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')." ) + @Description(shortDefinition="Specified value if missing from instance", formalDefinition="The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false')." ) protected org.hl7.fhir.dstu3.model.Type defaultValue; /** @@ -2313,7 +2587,7 @@ public class ElementDefinition extends Type implements ICompositeType { * A sample value for this element demonstrating the type of information that would typically be captured. */ @Child(name = "example", type = {}, order=20, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Example value: [as defined for type]", formalDefinition="A sample value for this element demonstrating the type of information that would typically be captured." ) + @Description(shortDefinition="Example value (as defined for type)", formalDefinition="A sample value for this element demonstrating the type of information that would typically be captured." ) protected org.hl7.fhir.dstu3.model.Type example; /** @@ -2386,7 +2660,7 @@ public class ElementDefinition extends Type implements ICompositeType { @Description(shortDefinition="Map element to another set of definitions", formalDefinition="Identifies a concept from an external specification that roughly corresponds to this element." ) protected List mapping; - private static final long serialVersionUID = 529293980L; + private static final long serialVersionUID = -904637873L; /** * Constructor @@ -2503,7 +2777,7 @@ public class ElementDefinition extends Type implements ICompositeType { } /** - * @return {@link #name} (The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + * @return {@link #name} (The name of this element definition. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ public StringType getNameElement() { if (this.name == null) @@ -2523,7 +2797,7 @@ public class ElementDefinition extends Type implements ICompositeType { } /** - * @param value {@link #name} (The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + * @param value {@link #name} (The name of this element definition. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ public ElementDefinition setNameElement(StringType value) { this.name = value; @@ -2531,14 +2805,14 @@ public class ElementDefinition extends Type implements ICompositeType { } /** - * @return The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element. + * @return The name of this element definition. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element. */ public String getName() { return this.name == null ? null : this.name.getValue(); } /** - * @param value The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element. + * @param value The name of this element definition. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element. */ public ElementDefinition setName(String value) { if (Utilities.noString(value)) @@ -3009,7 +3283,7 @@ public class ElementDefinition extends Type implements ICompositeType { } /** - * @return {@link #base} (Information about the base definition of the element, provided to make it unncessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition.) + * @return {@link #base} (Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition.) */ public ElementDefinitionBaseComponent getBase() { if (this.base == null) @@ -3025,13 +3299,62 @@ public class ElementDefinition extends Type implements ICompositeType { } /** - * @param value {@link #base} (Information about the base definition of the element, provided to make it unncessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition.) + * @param value {@link #base} (Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition.) */ public ElementDefinition setBase(ElementDefinitionBaseComponent value) { this.base = value; return this; } + /** + * @return {@link #contentReference} (Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element.). This is the underlying object with id, value and extensions. The accessor "getContentReference" gives direct access to the value + */ + public UriType getContentReferenceElement() { + if (this.contentReference == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ElementDefinition.contentReference"); + else if (Configuration.doAutoCreate()) + this.contentReference = new UriType(); // bb + return this.contentReference; + } + + public boolean hasContentReferenceElement() { + return this.contentReference != null && !this.contentReference.isEmpty(); + } + + public boolean hasContentReference() { + return this.contentReference != null && !this.contentReference.isEmpty(); + } + + /** + * @param value {@link #contentReference} (Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element.). This is the underlying object with id, value and extensions. The accessor "getContentReference" gives direct access to the value + */ + public ElementDefinition setContentReferenceElement(UriType value) { + this.contentReference = value; + return this; + } + + /** + * @return Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element. + */ + public String getContentReference() { + return this.contentReference == null ? null : this.contentReference.getValue(); + } + + /** + * @param value Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element. + */ + public ElementDefinition setContentReference(String value) { + if (Utilities.noString(value)) + this.contentReference = null; + else { + if (this.contentReference == null) + this.contentReference = new UriType(); + this.contentReference.setValue(value); + } + return this; + } + /** * @return {@link #type} (The data type or resource that the value of this element is permitted to be.) */ @@ -3072,55 +3395,6 @@ public class ElementDefinition extends Type implements ICompositeType { return this; } - /** - * @return {@link #nameReference} (Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element.). This is the underlying object with id, value and extensions. The accessor "getNameReference" gives direct access to the value - */ - public StringType getNameReferenceElement() { - if (this.nameReference == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ElementDefinition.nameReference"); - else if (Configuration.doAutoCreate()) - this.nameReference = new StringType(); // bb - return this.nameReference; - } - - public boolean hasNameReferenceElement() { - return this.nameReference != null && !this.nameReference.isEmpty(); - } - - public boolean hasNameReference() { - return this.nameReference != null && !this.nameReference.isEmpty(); - } - - /** - * @param value {@link #nameReference} (Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element.). This is the underlying object with id, value and extensions. The accessor "getNameReference" gives direct access to the value - */ - public ElementDefinition setNameReferenceElement(StringType value) { - this.nameReference = value; - return this; - } - - /** - * @return Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element. - */ - public String getNameReference() { - return this.nameReference == null ? null : this.nameReference.getValue(); - } - - /** - * @param value Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element. - */ - public ElementDefinition setNameReference(String value) { - if (Utilities.noString(value)) - this.nameReference = null; - else { - if (this.nameReference == null) - this.nameReference = new StringType(); - this.nameReference.setValue(value); - } - return this; - } - /** * @return {@link #defaultValue} (The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').) */ @@ -3626,7 +3900,7 @@ public class ElementDefinition extends Type implements ICompositeType { super.listChildren(childrenList); childrenList.add(new Property("path", "string", "The path identifies the element and is expressed as a \".\"-separated list of ancestor elements, beginning with the name of the resource or extension.", 0, java.lang.Integer.MAX_VALUE, path)); childrenList.add(new Property("representation", "code", "Codes that define how this element is represented in instances, when the deviation varies from the normal case.", 0, java.lang.Integer.MAX_VALUE, representation)); - childrenList.add(new Property("name", "string", "The name of this element definition (to refer to it from other element definitions using ElementDefinition.nameReference). This is a unique name referring to a specific set of constraints applied to this element. One use of this is to provide a name to different slices of the same element.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("name", "string", "The name of this element definition. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.", 0, java.lang.Integer.MAX_VALUE, name)); childrenList.add(new Property("label", "string", "The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.", 0, java.lang.Integer.MAX_VALUE, label)); childrenList.add(new Property("code", "Coding", "A code that provides the meaning for the element according to a particular terminology.", 0, java.lang.Integer.MAX_VALUE, code)); childrenList.add(new Property("slicing", "", "Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).", 0, java.lang.Integer.MAX_VALUE, slicing)); @@ -3637,9 +3911,9 @@ public class ElementDefinition extends Type implements ICompositeType { childrenList.add(new Property("alias", "string", "Identifies additional names by which this element might also be known.", 0, java.lang.Integer.MAX_VALUE, alias)); childrenList.add(new Property("min", "integer", "The minimum number of times this element SHALL appear in the instance.", 0, java.lang.Integer.MAX_VALUE, min)); childrenList.add(new Property("max", "string", "The maximum number of times this element is permitted to appear in the instance.", 0, java.lang.Integer.MAX_VALUE, max)); - childrenList.add(new Property("base", "", "Information about the base definition of the element, provided to make it unncessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition.", 0, java.lang.Integer.MAX_VALUE, base)); + childrenList.add(new Property("base", "", "Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. This information is only provided where the element definition represents a constraint on another element definition, and must be present if there is a base element definition.", 0, java.lang.Integer.MAX_VALUE, base)); + childrenList.add(new Property("contentReference", "uri", "Identifies the identity of an element defined elsewhere in the profile whose content rules should be applied to the current element.", 0, java.lang.Integer.MAX_VALUE, contentReference)); childrenList.add(new Property("type", "", "The data type or resource that the value of this element is permitted to be.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("nameReference", "string", "Identifies the name of a slice defined elsewhere in the profile whose constraints should be applied to the current element.", 0, java.lang.Integer.MAX_VALUE, nameReference)); childrenList.add(new Property("defaultValue[x]", "*", "The value that should be used if there is no value stated in the instance (e.g. 'if not otherwise specified, the abstract is false').", 0, java.lang.Integer.MAX_VALUE, defaultValue)); childrenList.add(new Property("meaningWhenMissing", "markdown", "The Implicit meaning that is to be understood when this element is missing (e.g. 'when this element is missing, the period is ongoing'.", 0, java.lang.Integer.MAX_VALUE, meaningWhenMissing)); childrenList.add(new Property("fixed[x]", "*", "Specifies a value that SHALL be exactly the value for this element in the instance. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.", 0, java.lang.Integer.MAX_VALUE, fixed)); @@ -3687,10 +3961,10 @@ public class ElementDefinition extends Type implements ICompositeType { this.max = castToString(value); // StringType else if (name.equals("base")) this.base = (ElementDefinitionBaseComponent) value; // ElementDefinitionBaseComponent + else if (name.equals("contentReference")) + this.contentReference = castToUri(value); // UriType else if (name.equals("type")) this.getType().add((TypeRefComponent) value); - else if (name.equals("nameReference")) - this.nameReference = castToString(value); // StringType else if (name.equals("defaultValue[x]")) this.defaultValue = (org.hl7.fhir.dstu3.model.Type) value; // org.hl7.fhir.dstu3.model.Type else if (name.equals("meaningWhenMissing")) @@ -3771,12 +4045,12 @@ public class ElementDefinition extends Type implements ICompositeType { this.base = new ElementDefinitionBaseComponent(); return this.base; } + else if (name.equals("contentReference")) { + throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.contentReference"); + } else if (name.equals("type")) { return addType(); } - else if (name.equals("nameReference")) { - throw new FHIRException("Cannot call addChild on a primitive type ElementDefinition.nameReference"); - } else if (name.equals("defaultValueBoolean")) { this.defaultValue = new BooleanType(); return this.defaultValue; @@ -4635,12 +4909,12 @@ public class ElementDefinition extends Type implements ICompositeType { dst.min = min == null ? null : min.copy(); dst.max = max == null ? null : max.copy(); dst.base = base == null ? null : base.copy(); + dst.contentReference = contentReference == null ? null : contentReference.copy(); if (type != null) { dst.type = new ArrayList(); for (TypeRefComponent i : type) dst.type.add(i.copy()); }; - dst.nameReference = nameReference == null ? null : nameReference.copy(); dst.defaultValue = defaultValue == null ? null : defaultValue.copy(); dst.meaningWhenMissing = meaningWhenMissing == null ? null : meaningWhenMissing.copy(); dst.fixed = fixed == null ? null : fixed.copy(); @@ -4686,12 +4960,11 @@ public class ElementDefinition extends Type implements ICompositeType { && compareDeep(label, o.label, true) && compareDeep(code, o.code, true) && compareDeep(slicing, o.slicing, true) && compareDeep(short_, o.short_, true) && compareDeep(definition, o.definition, true) && compareDeep(comments, o.comments, true) && compareDeep(requirements, o.requirements, true) && compareDeep(alias, o.alias, true) && compareDeep(min, o.min, true) - && compareDeep(max, o.max, true) && compareDeep(base, o.base, true) && compareDeep(type, o.type, true) - && compareDeep(nameReference, o.nameReference, true) && compareDeep(defaultValue, o.defaultValue, true) - && compareDeep(meaningWhenMissing, o.meaningWhenMissing, true) && compareDeep(fixed, o.fixed, true) - && compareDeep(pattern, o.pattern, true) && compareDeep(example, o.example, true) && compareDeep(minValue, o.minValue, true) - && compareDeep(maxValue, o.maxValue, true) && compareDeep(maxLength, o.maxLength, true) && compareDeep(condition, o.condition, true) - && compareDeep(constraint, o.constraint, true) && compareDeep(mustSupport, o.mustSupport, true) + && compareDeep(max, o.max, true) && compareDeep(base, o.base, true) && compareDeep(contentReference, o.contentReference, true) + && compareDeep(type, o.type, true) && compareDeep(defaultValue, o.defaultValue, true) && compareDeep(meaningWhenMissing, o.meaningWhenMissing, true) + && compareDeep(fixed, o.fixed, true) && compareDeep(pattern, o.pattern, true) && compareDeep(example, o.example, true) + && compareDeep(minValue, o.minValue, true) && compareDeep(maxValue, o.maxValue, true) && compareDeep(maxLength, o.maxLength, true) + && compareDeep(condition, o.condition, true) && compareDeep(constraint, o.constraint, true) && compareDeep(mustSupport, o.mustSupport, true) && compareDeep(isModifier, o.isModifier, true) && compareDeep(isSummary, o.isSummary, true) && compareDeep(binding, o.binding, true) && compareDeep(mapping, o.mapping, true); } @@ -4706,26 +4979,18 @@ public class ElementDefinition extends Type implements ICompositeType { return compareValues(path, o.path, true) && compareValues(representation, o.representation, true) && compareValues(name, o.name, true) && compareValues(label, o.label, true) && compareValues(short_, o.short_, true) && compareValues(definition, o.definition, true) && compareValues(comments, o.comments, true) && compareValues(requirements, o.requirements, true) && compareValues(alias, o.alias, true) - && compareValues(min, o.min, true) && compareValues(max, o.max, true) && compareValues(nameReference, o.nameReference, true) + && compareValues(min, o.min, true) && compareValues(max, o.max, true) && compareValues(contentReference, o.contentReference, true) && compareValues(meaningWhenMissing, o.meaningWhenMissing, true) && compareValues(maxLength, o.maxLength, true) && compareValues(condition, o.condition, true) && compareValues(mustSupport, o.mustSupport, true) && compareValues(isModifier, o.isModifier, true) && compareValues(isSummary, o.isSummary, true); } public boolean isEmpty() { - return super.isEmpty() && (path == null || path.isEmpty()) && (representation == null || representation.isEmpty()) - && (name == null || name.isEmpty()) && (label == null || label.isEmpty()) && (code == null || code.isEmpty()) - && (slicing == null || slicing.isEmpty()) && (short_ == null || short_.isEmpty()) && (definition == null || definition.isEmpty()) - && (comments == null || comments.isEmpty()) && (requirements == null || requirements.isEmpty()) - && (alias == null || alias.isEmpty()) && (min == null || min.isEmpty()) && (max == null || max.isEmpty()) - && (base == null || base.isEmpty()) && (type == null || type.isEmpty()) && (nameReference == null || nameReference.isEmpty()) - && (defaultValue == null || defaultValue.isEmpty()) && (meaningWhenMissing == null || meaningWhenMissing.isEmpty()) - && (fixed == null || fixed.isEmpty()) && (pattern == null || pattern.isEmpty()) && (example == null || example.isEmpty()) - && (minValue == null || minValue.isEmpty()) && (maxValue == null || maxValue.isEmpty()) && (maxLength == null || maxLength.isEmpty()) - && (condition == null || condition.isEmpty()) && (constraint == null || constraint.isEmpty()) - && (mustSupport == null || mustSupport.isEmpty()) && (isModifier == null || isModifier.isEmpty()) - && (isSummary == null || isSummary.isEmpty()) && (binding == null || binding.isEmpty()) && (mapping == null || mapping.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( path, representation, name, label + , code, slicing, short_, definition, comments, requirements, alias, min, max, base + , contentReference, type, defaultValue, meaningWhenMissing, fixed, pattern, example, minValue + , maxValue, maxLength, condition, constraint, mustSupport, isModifier, isSummary, binding + , mapping); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EligibilityRequest.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EligibilityRequest.java index a852c8e2def..f6889ef1b8f 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EligibilityRequest.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EligibilityRequest.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * This resource provides the insurance eligibility details from the insurer regarding a specified coverage and optionally some class of service. */ @@ -81,38 +79,23 @@ public class EligibilityRequest extends DomainResource { /** * The Insurer who is target of the request. */ - @Child(name = "target", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "target", type = {Identifier.class, Organization.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who is target of the request." ) - protected Reference target; - - /** - * The actual object that is the target of the reference (The Insurer who is target of the request.) - */ - protected Organization targetTarget; + protected Type target; /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name = "provider", type = {Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "provider", type = {Identifier.class, Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) - */ - protected Practitioner providerTarget; + protected Type provider; /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name = "organization", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "organization", type = {Identifier.class, Organization.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) - */ - protected Organization organizationTarget; + protected Type organization; /** * Immediate (STAT), best effort (NORMAL), deferred (DEFER). @@ -124,50 +107,30 @@ public class EligibilityRequest extends DomainResource { /** * Person who created the invoice/claim/pre-determination or pre-authorization. */ - @Child(name = "enterer", type = {Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "enterer", type = {Identifier.class, Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) - protected Reference enterer; - - /** - * The actual object that is the target of the reference (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - protected Practitioner entererTarget; + protected Type enterer; /** * Facility where the services were provided. */ - @Child(name = "facility", type = {Location.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Child(name = "facility", type = {Identifier.class, Location.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) - protected Reference facility; - - /** - * The actual object that is the target of the reference (Facility where the services were provided.) - */ - protected Location facilityTarget; + protected Type facility; /** * Patient Resource. */ - @Child(name = "patient", type = {Patient.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Child(name = "patient", type = {Identifier.class, Patient.class}, order=10, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) - protected Reference patient; - - /** - * The actual object that is the target of the reference (Patient Resource.) - */ - protected Patient patientTarget; + protected Type patient; /** * Financial instrument by which payment information for health care. */ - @Child(name = "coverage", type = {Coverage.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Child(name = "coverage", type = {Identifier.class, Coverage.class}, order=11, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) - protected Reference coverage; - - /** - * The actual object that is the target of the reference (Financial instrument by which payment information for health care.) - */ - protected Coverage coverageTarget; + protected Type coverage; /** * The contract number of a business agreement which describes the terms and conditions. @@ -176,35 +139,28 @@ public class EligibilityRequest extends DomainResource { @Description(shortDefinition="Business agreement", formalDefinition="The contract number of a business agreement which describes the terms and conditions." ) protected StringType businessArrangement; - /** - * The relationship of the patient to the subscriber. - */ - @Child(name = "relationship", type = {Coding.class}, order=13, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Patient relationship to subscriber", formalDefinition="The relationship of the patient to the subscriber." ) - protected Coding relationship; - /** * The date or dates when the enclosed suite of services were performed or completed. */ - @Child(name = "serviced", type = {DateType.class, Period.class}, order=14, min=0, max=1, modifier=false, summary=true) + @Child(name = "serviced", type = {DateType.class, Period.class}, order=13, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Estimated date or dates of Service", formalDefinition="The date or dates when the enclosed suite of services were performed or completed." ) protected Type serviced; /** * Dental, Vision, Medical, Pharmacy, Rehab etc. */ - @Child(name = "benefitCategory", type = {Coding.class}, order=15, min=0, max=1, modifier=false, summary=true) + @Child(name = "benefitCategory", type = {Coding.class}, order=14, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Benefit Category", formalDefinition="Dental, Vision, Medical, Pharmacy, Rehab etc." ) protected Coding benefitCategory; /** * Dental: basic, major, ortho; Vision exam, glasses, contacts; etc. */ - @Child(name = "benefitSubCategory", type = {Coding.class}, order=16, min=0, max=1, modifier=false, summary=true) + @Child(name = "benefitSubCategory", type = {Coding.class}, order=15, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Benefit SubCategory", formalDefinition="Dental: basic, major, ortho; Vision exam, glasses, contacts; etc." ) protected Coding benefitSubCategory; - private static final long serialVersionUID = 1808061326L; + private static final long serialVersionUID = 313969968L; /** * Constructor @@ -353,15 +309,36 @@ public class EligibilityRequest extends DomainResource { /** * @return {@link #target} (The Insurer who is target of the request.) */ - public Reference getTarget() { - if (this.target == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityRequest.target"); - else if (Configuration.doAutoCreate()) - this.target = new Reference(); // cc + public Type getTarget() { return this.target; } + /** + * @return {@link #target} (The Insurer who is target of the request.) + */ + public Identifier getTargetIdentifier() throws FHIRException { + if (!(this.target instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.target.getClass().getName()+" was encountered"); + return (Identifier) this.target; + } + + public boolean hasTargetIdentifier() { + return this.target instanceof Identifier; + } + + /** + * @return {@link #target} (The Insurer who is target of the request.) + */ + public Reference getTargetReference() throws FHIRException { + if (!(this.target instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.target.getClass().getName()+" was encountered"); + return (Reference) this.target; + } + + public boolean hasTargetReference() { + return this.target instanceof Reference; + } + public boolean hasTarget() { return this.target != null && !this.target.isEmpty(); } @@ -369,43 +346,44 @@ public class EligibilityRequest extends DomainResource { /** * @param value {@link #target} (The Insurer who is target of the request.) */ - public EligibilityRequest setTarget(Reference value) { + public EligibilityRequest setTarget(Type value) { this.target = value; return this; } - /** - * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) - */ - public Organization getTargetTarget() { - if (this.targetTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityRequest.target"); - else if (Configuration.doAutoCreate()) - this.targetTarget = new Organization(); // aa - return this.targetTarget; - } - - /** - * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) - */ - public EligibilityRequest setTargetTarget(Organization value) { - this.targetTarget = value; - return this; - } - /** * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityRequest.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc + public Type getProvider() { return this.provider; } + /** + * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Identifier getProviderIdentifier() throws FHIRException { + if (!(this.provider instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.provider.getClass().getName()+" was encountered"); + return (Identifier) this.provider; + } + + public boolean hasProviderIdentifier() { + return this.provider instanceof Identifier; + } + + /** + * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getProviderReference() throws FHIRException { + if (!(this.provider instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.provider.getClass().getName()+" was encountered"); + return (Reference) this.provider; + } + + public boolean hasProviderReference() { + return this.provider instanceof Reference; + } + public boolean hasProvider() { return this.provider != null && !this.provider.isEmpty(); } @@ -413,43 +391,44 @@ public class EligibilityRequest extends DomainResource { /** * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) */ - public EligibilityRequest setProvider(Reference value) { + public EligibilityRequest setProvider(Type value) { this.provider = value; return this; } - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityRequest.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public EligibilityRequest setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - /** * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityRequest.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc + public Type getOrganization() { return this.organization; } + /** + * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) + */ + public Identifier getOrganizationIdentifier() throws FHIRException { + if (!(this.organization instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Identifier) this.organization; + } + + public boolean hasOrganizationIdentifier() { + return this.organization instanceof Identifier; + } + + /** + * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) + */ + public Reference getOrganizationReference() throws FHIRException { + if (!(this.organization instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Reference) this.organization; + } + + public boolean hasOrganizationReference() { + return this.organization instanceof Reference; + } + public boolean hasOrganization() { return this.organization != null && !this.organization.isEmpty(); } @@ -457,31 +436,11 @@ public class EligibilityRequest extends DomainResource { /** * @param value {@link #organization} (The organization which is responsible for the services rendered to the patient.) */ - public EligibilityRequest setOrganization(Reference value) { + public EligibilityRequest setOrganization(Type value) { this.organization = value; return this; } - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityRequest.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public EligibilityRequest setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - /** * @return {@link #priority} (Immediate (STAT), best effort (NORMAL), deferred (DEFER).) */ @@ -509,15 +468,36 @@ public class EligibilityRequest extends DomainResource { /** * @return {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) */ - public Reference getEnterer() { - if (this.enterer == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityRequest.enterer"); - else if (Configuration.doAutoCreate()) - this.enterer = new Reference(); // cc + public Type getEnterer() { return this.enterer; } + /** + * @return {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) + */ + public Identifier getEntererIdentifier() throws FHIRException { + if (!(this.enterer instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.enterer.getClass().getName()+" was encountered"); + return (Identifier) this.enterer; + } + + public boolean hasEntererIdentifier() { + return this.enterer instanceof Identifier; + } + + /** + * @return {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) + */ + public Reference getEntererReference() throws FHIRException { + if (!(this.enterer instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.enterer.getClass().getName()+" was encountered"); + return (Reference) this.enterer; + } + + public boolean hasEntererReference() { + return this.enterer instanceof Reference; + } + public boolean hasEnterer() { return this.enterer != null && !this.enterer.isEmpty(); } @@ -525,43 +505,44 @@ public class EligibilityRequest extends DomainResource { /** * @param value {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) */ - public EligibilityRequest setEnterer(Reference value) { + public EligibilityRequest setEnterer(Type value) { this.enterer = value; return this; } - /** - * @return {@link #enterer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public Practitioner getEntererTarget() { - if (this.entererTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityRequest.enterer"); - else if (Configuration.doAutoCreate()) - this.entererTarget = new Practitioner(); // aa - return this.entererTarget; - } - - /** - * @param value {@link #enterer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Person who created the invoice/claim/pre-determination or pre-authorization.) - */ - public EligibilityRequest setEntererTarget(Practitioner value) { - this.entererTarget = value; - return this; - } - /** * @return {@link #facility} (Facility where the services were provided.) */ - public Reference getFacility() { - if (this.facility == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityRequest.facility"); - else if (Configuration.doAutoCreate()) - this.facility = new Reference(); // cc + public Type getFacility() { return this.facility; } + /** + * @return {@link #facility} (Facility where the services were provided.) + */ + public Identifier getFacilityIdentifier() throws FHIRException { + if (!(this.facility instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.facility.getClass().getName()+" was encountered"); + return (Identifier) this.facility; + } + + public boolean hasFacilityIdentifier() { + return this.facility instanceof Identifier; + } + + /** + * @return {@link #facility} (Facility where the services were provided.) + */ + public Reference getFacilityReference() throws FHIRException { + if (!(this.facility instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.facility.getClass().getName()+" was encountered"); + return (Reference) this.facility; + } + + public boolean hasFacilityReference() { + return this.facility instanceof Reference; + } + public boolean hasFacility() { return this.facility != null && !this.facility.isEmpty(); } @@ -569,43 +550,44 @@ public class EligibilityRequest extends DomainResource { /** * @param value {@link #facility} (Facility where the services were provided.) */ - public EligibilityRequest setFacility(Reference value) { + public EligibilityRequest setFacility(Type value) { this.facility = value; return this; } - /** - * @return {@link #facility} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Facility where the services were provided.) - */ - public Location getFacilityTarget() { - if (this.facilityTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityRequest.facility"); - else if (Configuration.doAutoCreate()) - this.facilityTarget = new Location(); // aa - return this.facilityTarget; - } - - /** - * @param value {@link #facility} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Facility where the services were provided.) - */ - public EligibilityRequest setFacilityTarget(Location value) { - this.facilityTarget = value; - return this; - } - /** * @return {@link #patient} (Patient Resource.) */ - public Reference getPatient() { - if (this.patient == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityRequest.patient"); - else if (Configuration.doAutoCreate()) - this.patient = new Reference(); // cc + public Type getPatient() { return this.patient; } + /** + * @return {@link #patient} (Patient Resource.) + */ + public Identifier getPatientIdentifier() throws FHIRException { + if (!(this.patient instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.patient.getClass().getName()+" was encountered"); + return (Identifier) this.patient; + } + + public boolean hasPatientIdentifier() { + return this.patient instanceof Identifier; + } + + /** + * @return {@link #patient} (Patient Resource.) + */ + public Reference getPatientReference() throws FHIRException { + if (!(this.patient instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.patient.getClass().getName()+" was encountered"); + return (Reference) this.patient; + } + + public boolean hasPatientReference() { + return this.patient instanceof Reference; + } + public boolean hasPatient() { return this.patient != null && !this.patient.isEmpty(); } @@ -613,43 +595,44 @@ public class EligibilityRequest extends DomainResource { /** * @param value {@link #patient} (Patient Resource.) */ - public EligibilityRequest setPatient(Reference value) { + public EligibilityRequest setPatient(Type value) { this.patient = value; return this; } - /** - * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Patient Resource.) - */ - public Patient getPatientTarget() { - if (this.patientTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityRequest.patient"); - else if (Configuration.doAutoCreate()) - this.patientTarget = new Patient(); // aa - return this.patientTarget; - } - - /** - * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Patient Resource.) - */ - public EligibilityRequest setPatientTarget(Patient value) { - this.patientTarget = value; - return this; - } - /** * @return {@link #coverage} (Financial instrument by which payment information for health care.) */ - public Reference getCoverage() { - if (this.coverage == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityRequest.coverage"); - else if (Configuration.doAutoCreate()) - this.coverage = new Reference(); // cc + public Type getCoverage() { return this.coverage; } + /** + * @return {@link #coverage} (Financial instrument by which payment information for health care.) + */ + public Identifier getCoverageIdentifier() throws FHIRException { + if (!(this.coverage instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.coverage.getClass().getName()+" was encountered"); + return (Identifier) this.coverage; + } + + public boolean hasCoverageIdentifier() { + return this.coverage instanceof Identifier; + } + + /** + * @return {@link #coverage} (Financial instrument by which payment information for health care.) + */ + public Reference getCoverageReference() throws FHIRException { + if (!(this.coverage instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.coverage.getClass().getName()+" was encountered"); + return (Reference) this.coverage; + } + + public boolean hasCoverageReference() { + return this.coverage instanceof Reference; + } + public boolean hasCoverage() { return this.coverage != null && !this.coverage.isEmpty(); } @@ -657,31 +640,11 @@ public class EligibilityRequest extends DomainResource { /** * @param value {@link #coverage} (Financial instrument by which payment information for health care.) */ - public EligibilityRequest setCoverage(Reference value) { + public EligibilityRequest setCoverage(Type value) { this.coverage = value; return this; } - /** - * @return {@link #coverage} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Financial instrument by which payment information for health care.) - */ - public Coverage getCoverageTarget() { - if (this.coverageTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityRequest.coverage"); - else if (Configuration.doAutoCreate()) - this.coverageTarget = new Coverage(); // aa - return this.coverageTarget; - } - - /** - * @param value {@link #coverage} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Financial instrument by which payment information for health care.) - */ - public EligibilityRequest setCoverageTarget(Coverage value) { - this.coverageTarget = value; - return this; - } - /** * @return {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value */ @@ -731,30 +694,6 @@ public class EligibilityRequest extends DomainResource { return this; } - /** - * @return {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public Coding getRelationship() { - if (this.relationship == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityRequest.relationship"); - else if (Configuration.doAutoCreate()) - this.relationship = new Coding(); // cc - return this.relationship; - } - - public boolean hasRelationship() { - return this.relationship != null && !this.relationship.isEmpty(); - } - - /** - * @param value {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public EligibilityRequest setRelationship(Coding value) { - this.relationship = value; - return this; - } - /** * @return {@link #serviced} (The date or dates when the enclosed suite of services were performed or completed.) */ @@ -854,16 +793,15 @@ public class EligibilityRequest extends DomainResource { childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created)); - childrenList.add(new Property("target", "Reference(Organization)", "The Insurer who is target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("target[x]", "Identifier|Reference(Organization)", "The Insurer who is target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("provider[x]", "Identifier|Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); + childrenList.add(new Property("organization[x]", "Identifier|Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, organization)); childrenList.add(new Property("priority", "Coding", "Immediate (STAT), best effort (NORMAL), deferred (DEFER).", 0, java.lang.Integer.MAX_VALUE, priority)); - childrenList.add(new Property("enterer", "Reference(Practitioner)", "Person who created the invoice/claim/pre-determination or pre-authorization.", 0, java.lang.Integer.MAX_VALUE, enterer)); - childrenList.add(new Property("facility", "Reference(Location)", "Facility where the services were provided.", 0, java.lang.Integer.MAX_VALUE, facility)); - childrenList.add(new Property("patient", "Reference(Patient)", "Patient Resource.", 0, java.lang.Integer.MAX_VALUE, patient)); - childrenList.add(new Property("coverage", "Reference(Coverage)", "Financial instrument by which payment information for health care.", 0, java.lang.Integer.MAX_VALUE, coverage)); + childrenList.add(new Property("enterer[x]", "Identifier|Reference(Practitioner)", "Person who created the invoice/claim/pre-determination or pre-authorization.", 0, java.lang.Integer.MAX_VALUE, enterer)); + childrenList.add(new Property("facility[x]", "Identifier|Reference(Location)", "Facility where the services were provided.", 0, java.lang.Integer.MAX_VALUE, facility)); + childrenList.add(new Property("patient[x]", "Identifier|Reference(Patient)", "Patient Resource.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("coverage[x]", "Identifier|Reference(Coverage)", "Financial instrument by which payment information for health care.", 0, java.lang.Integer.MAX_VALUE, coverage)); childrenList.add(new Property("businessArrangement", "string", "The contract number of a business agreement which describes the terms and conditions.", 0, java.lang.Integer.MAX_VALUE, businessArrangement)); - childrenList.add(new Property("relationship", "Coding", "The relationship of the patient to the subscriber.", 0, java.lang.Integer.MAX_VALUE, relationship)); childrenList.add(new Property("serviced[x]", "date|Period", "The date or dates when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, serviced)); childrenList.add(new Property("benefitCategory", "Coding", "Dental, Vision, Medical, Pharmacy, Rehab etc.", 0, java.lang.Integer.MAX_VALUE, benefitCategory)); childrenList.add(new Property("benefitSubCategory", "Coding", "Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.", 0, java.lang.Integer.MAX_VALUE, benefitSubCategory)); @@ -879,26 +817,24 @@ public class EligibilityRequest extends DomainResource { this.originalRuleset = castToCoding(value); // Coding else if (name.equals("created")) this.created = castToDateTime(value); // DateTimeType - else if (name.equals("target")) - this.target = castToReference(value); // Reference - else if (name.equals("provider")) - this.provider = castToReference(value); // Reference - else if (name.equals("organization")) - this.organization = castToReference(value); // Reference + else if (name.equals("target[x]")) + this.target = (Type) value; // Type + else if (name.equals("provider[x]")) + this.provider = (Type) value; // Type + else if (name.equals("organization[x]")) + this.organization = (Type) value; // Type else if (name.equals("priority")) this.priority = castToCoding(value); // Coding - else if (name.equals("enterer")) - this.enterer = castToReference(value); // Reference - else if (name.equals("facility")) - this.facility = castToReference(value); // Reference - else if (name.equals("patient")) - this.patient = castToReference(value); // Reference - else if (name.equals("coverage")) - this.coverage = castToReference(value); // Reference + else if (name.equals("enterer[x]")) + this.enterer = (Type) value; // Type + else if (name.equals("facility[x]")) + this.facility = (Type) value; // Type + else if (name.equals("patient[x]")) + this.patient = (Type) value; // Type + else if (name.equals("coverage[x]")) + this.coverage = (Type) value; // Type else if (name.equals("businessArrangement")) this.businessArrangement = castToString(value); // StringType - else if (name.equals("relationship")) - this.relationship = castToCoding(value); // Coding else if (name.equals("serviced[x]")) this.serviced = (Type) value; // Type else if (name.equals("benefitCategory")) @@ -925,15 +861,27 @@ public class EligibilityRequest extends DomainResource { else if (name.equals("created")) { throw new FHIRException("Cannot call addChild on a primitive type EligibilityRequest.created"); } - else if (name.equals("target")) { + else if (name.equals("targetIdentifier")) { + this.target = new Identifier(); + return this.target; + } + else if (name.equals("targetReference")) { this.target = new Reference(); return this.target; } - else if (name.equals("provider")) { + else if (name.equals("providerIdentifier")) { + this.provider = new Identifier(); + return this.provider; + } + else if (name.equals("providerReference")) { this.provider = new Reference(); return this.provider; } - else if (name.equals("organization")) { + else if (name.equals("organizationIdentifier")) { + this.organization = new Identifier(); + return this.organization; + } + else if (name.equals("organizationReference")) { this.organization = new Reference(); return this.organization; } @@ -941,29 +889,41 @@ public class EligibilityRequest extends DomainResource { this.priority = new Coding(); return this.priority; } - else if (name.equals("enterer")) { + else if (name.equals("entererIdentifier")) { + this.enterer = new Identifier(); + return this.enterer; + } + else if (name.equals("entererReference")) { this.enterer = new Reference(); return this.enterer; } - else if (name.equals("facility")) { + else if (name.equals("facilityIdentifier")) { + this.facility = new Identifier(); + return this.facility; + } + else if (name.equals("facilityReference")) { this.facility = new Reference(); return this.facility; } - else if (name.equals("patient")) { + else if (name.equals("patientIdentifier")) { + this.patient = new Identifier(); + return this.patient; + } + else if (name.equals("patientReference")) { this.patient = new Reference(); return this.patient; } - else if (name.equals("coverage")) { + else if (name.equals("coverageIdentifier")) { + this.coverage = new Identifier(); + return this.coverage; + } + else if (name.equals("coverageReference")) { this.coverage = new Reference(); return this.coverage; } else if (name.equals("businessArrangement")) { throw new FHIRException("Cannot call addChild on a primitive type EligibilityRequest.businessArrangement"); } - else if (name.equals("relationship")) { - this.relationship = new Coding(); - return this.relationship; - } else if (name.equals("servicedDate")) { this.serviced = new DateType(); return this.serviced; @@ -1009,7 +969,6 @@ public class EligibilityRequest extends DomainResource { dst.patient = patient == null ? null : patient.copy(); dst.coverage = coverage == null ? null : coverage.copy(); dst.businessArrangement = businessArrangement == null ? null : businessArrangement.copy(); - dst.relationship = relationship == null ? null : relationship.copy(); dst.serviced = serviced == null ? null : serviced.copy(); dst.benefitCategory = benefitCategory == null ? null : benefitCategory.copy(); dst.benefitSubCategory = benefitSubCategory == null ? null : benefitSubCategory.copy(); @@ -1031,9 +990,9 @@ public class EligibilityRequest extends DomainResource { && compareDeep(created, o.created, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) && compareDeep(organization, o.organization, true) && compareDeep(priority, o.priority, true) && compareDeep(enterer, o.enterer, true) && compareDeep(facility, o.facility, true) && compareDeep(patient, o.patient, true) && compareDeep(coverage, o.coverage, true) - && compareDeep(businessArrangement, o.businessArrangement, true) && compareDeep(relationship, o.relationship, true) - && compareDeep(serviced, o.serviced, true) && compareDeep(benefitCategory, o.benefitCategory, true) - && compareDeep(benefitSubCategory, o.benefitSubCategory, true); + && compareDeep(businessArrangement, o.businessArrangement, true) && compareDeep(serviced, o.serviced, true) + && compareDeep(benefitCategory, o.benefitCategory, true) && compareDeep(benefitSubCategory, o.benefitSubCategory, true) + ; } @Override @@ -1048,14 +1007,9 @@ public class EligibilityRequest extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) - && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) - && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) - && (priority == null || priority.isEmpty()) && (enterer == null || enterer.isEmpty()) && (facility == null || facility.isEmpty()) - && (patient == null || patient.isEmpty()) && (coverage == null || coverage.isEmpty()) && (businessArrangement == null || businessArrangement.isEmpty()) - && (relationship == null || relationship.isEmpty()) && (serviced == null || serviced.isEmpty()) - && (benefitCategory == null || benefitCategory.isEmpty()) && (benefitSubCategory == null || benefitSubCategory.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, ruleset, originalRuleset + , created, target, provider, organization, priority, enterer, facility, patient, coverage + , businessArrangement, serviced, benefitCategory, benefitSubCategory); } @Override @@ -1084,56 +1038,70 @@ public class EligibilityRequest extends DomainResource { public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); /** - * Search parameter: provider + * Search parameter: facilityreference *

- * Description: The reference to the provider
+ * Description: Facility responsible for the goods and services
* Type: reference
- * Path: EligibilityRequest.provider
+ * Path: EligibilityRequest.facilityReference
*

*/ - @SearchParamDefinition(name="provider", path="EligibilityRequest.provider", description="The reference to the provider", type="reference" ) - public static final String SP_PROVIDER = "provider"; + @SearchParamDefinition(name="facilityreference", path="EligibilityRequest.facilityReference", description="Facility responsible for the goods and services", type="reference" ) + public static final String SP_FACILITYREFERENCE = "facilityreference"; /** - * Fluent Client search parameter constant for provider + * Fluent Client search parameter constant for facilityreference *

- * Description: The reference to the provider
+ * Description: Facility responsible for the goods and services
* Type: reference
- * Path: EligibilityRequest.provider
+ * Path: EligibilityRequest.facilityReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDER); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FACILITYREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FACILITYREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "EligibilityRequest:provider". + * the path value of "EligibilityRequest:facilityreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDER = new ca.uhn.fhir.model.api.Include("EligibilityRequest:provider").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_FACILITYREFERENCE = new ca.uhn.fhir.model.api.Include("EligibilityRequest:facilityreference").toLocked(); /** - * Search parameter: patient + * Search parameter: patientidentifier *

* Description: The reference to the patient
- * Type: reference
- * Path: EligibilityRequest.patient
+ * Type: token
+ * Path: EligibilityRequest.patientIdentifier
*

*/ - @SearchParamDefinition(name="patient", path="EligibilityRequest.patient", description="The reference to the patient", type="reference" ) - public static final String SP_PATIENT = "patient"; + @SearchParamDefinition(name="patientidentifier", path="EligibilityRequest.patientIdentifier", description="The reference to the patient", type="token" ) + public static final String SP_PATIENTIDENTIFIER = "patientidentifier"; /** - * Fluent Client search parameter constant for patient + * Fluent Client search parameter constant for patientidentifier *

* Description: The reference to the patient
- * Type: reference
- * Path: EligibilityRequest.patient
+ * Type: token
+ * Path: EligibilityRequest.patientIdentifier
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); + public static final ca.uhn.fhir.rest.gclient.TokenClientParam PATIENTIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PATIENTIDENTIFIER); -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "EligibilityRequest:patient". + /** + * Search parameter: organizationidentifier + *

+ * Description: The reference to the providing organization
+ * Type: token
+ * Path: EligibilityRequest.organizationidentifier
+ *

*/ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("EligibilityRequest:patient").toLocked(); + @SearchParamDefinition(name="organizationidentifier", path="EligibilityRequest.organizationidentifier", description="The reference to the providing organization", type="token" ) + public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier"; + /** + * Fluent Client search parameter constant for organizationidentifier + *

+ * Description: The reference to the providing organization
+ * Type: token
+ * Path: EligibilityRequest.organizationidentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam ORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ORGANIZATIONIDENTIFIER); /** * Search parameter: created @@ -1156,56 +1124,122 @@ public class EligibilityRequest extends DomainResource { public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED); /** - * Search parameter: organization + * Search parameter: patientreference *

- * Description: The reference to the providing organization
+ * Description: The reference to the patient
* Type: reference
- * Path: EligibilityRequest.organization
+ * Path: EligibilityRequest.patientReference
*

*/ - @SearchParamDefinition(name="organization", path="EligibilityRequest.organization", description="The reference to the providing organization", type="reference" ) - public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="patientreference", path="EligibilityRequest.patientReference", description="The reference to the patient", type="reference" ) + public static final String SP_PATIENTREFERENCE = "patientreference"; /** - * Fluent Client search parameter constant for organization + * Fluent Client search parameter constant for patientreference *

- * Description: The reference to the providing organization
+ * Description: The reference to the patient
* Type: reference
- * Path: EligibilityRequest.organization
+ * Path: EligibilityRequest.patientReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENTREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENTREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "EligibilityRequest:organization". + * the path value of "EligibilityRequest:patientreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("EligibilityRequest:organization").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENTREFERENCE = new ca.uhn.fhir.model.api.Include("EligibilityRequest:patientreference").toLocked(); /** - * Search parameter: facility + * Search parameter: providerreference *

- * Description: Facility responsible for the goods and services
+ * Description: The reference to the provider
* Type: reference
- * Path: EligibilityRequest.facility
+ * Path: EligibilityRequest.providerReference
*

*/ - @SearchParamDefinition(name="facility", path="EligibilityRequest.facility", description="Facility responsible for the goods and services", type="reference" ) - public static final String SP_FACILITY = "facility"; + @SearchParamDefinition(name="providerreference", path="EligibilityRequest.providerReference", description="The reference to the provider", type="reference" ) + public static final String SP_PROVIDERREFERENCE = "providerreference"; /** - * Fluent Client search parameter constant for facility + * Fluent Client search parameter constant for providerreference *

- * Description: Facility responsible for the goods and services
+ * Description: The reference to the provider
* Type: reference
- * Path: EligibilityRequest.facility
+ * Path: EligibilityRequest.providerReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FACILITY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FACILITY); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDERREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDERREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "EligibilityRequest:facility". + * the path value of "EligibilityRequest:providerreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_FACILITY = new ca.uhn.fhir.model.api.Include("EligibilityRequest:facility").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDERREFERENCE = new ca.uhn.fhir.model.api.Include("EligibilityRequest:providerreference").toLocked(); + + /** + * Search parameter: organizationreference + *

+ * Description: The reference to the providing organization
+ * Type: reference
+ * Path: EligibilityRequest.organizationReference
+ *

+ */ + @SearchParamDefinition(name="organizationreference", path="EligibilityRequest.organizationReference", description="The reference to the providing organization", type="reference" ) + public static final String SP_ORGANIZATIONREFERENCE = "organizationreference"; + /** + * Fluent Client search parameter constant for organizationreference + *

+ * Description: The reference to the providing organization
+ * Type: reference
+ * Path: EligibilityRequest.organizationReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATIONREFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "EligibilityRequest:organizationreference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("EligibilityRequest:organizationreference").toLocked(); + + /** + * Search parameter: provideridentifier + *

+ * Description: The reference to the provider
+ * Type: token
+ * Path: EligibilityRequest.provideridentifier
+ *

+ */ + @SearchParamDefinition(name="provideridentifier", path="EligibilityRequest.provideridentifier", description="The reference to the provider", type="token" ) + public static final String SP_PROVIDERIDENTIFIER = "provideridentifier"; + /** + * Fluent Client search parameter constant for provideridentifier + *

+ * Description: The reference to the provider
+ * Type: token
+ * Path: EligibilityRequest.provideridentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam PROVIDERIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PROVIDERIDENTIFIER); + + /** + * Search parameter: facilityidentifier + *

+ * Description: Facility responsible for the goods and services
+ * Type: token
+ * Path: EligibilityRequest.facilityidentifier
+ *

+ */ + @SearchParamDefinition(name="facilityidentifier", path="EligibilityRequest.facilityidentifier", description="Facility responsible for the goods and services", type="token" ) + public static final String SP_FACILITYIDENTIFIER = "facilityidentifier"; + /** + * Fluent Client search parameter constant for facilityidentifier + *

+ * Description: Facility responsible for the goods and services
+ * Type: token
+ * Path: EligibilityRequest.facilityidentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam FACILITYIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FACILITYIDENTIFIER); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EligibilityResponse.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EligibilityResponse.java index 130efdbcd11..ff5636d4c6e 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EligibilityResponse.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EligibilityResponse.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * This resource provides eligibility and plan details from the processing of an Eligibility resource. */ @@ -367,9 +365,8 @@ public class EligibilityResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (category == null || category.isEmpty()) && (subCategory == null || subCategory.isEmpty()) - && (network == null || network.isEmpty()) && (unit == null || unit.isEmpty()) && (term == null || term.isEmpty()) - && (financial == null || financial.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( category, subCategory, network + , unit, term, financial); } public String fhirType() { @@ -609,8 +606,7 @@ public class EligibilityResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (benefit == null || benefit.isEmpty()) - && (benefitUsed == null || benefitUsed.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, benefit, benefitUsed); } public String fhirType() { @@ -721,7 +717,7 @@ public class EligibilityResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code); } public String fhirType() { @@ -741,14 +737,9 @@ public class EligibilityResponse extends DomainResource { /** * Original request resource reference. */ - @Child(name = "request", type = {EligibilityRequest.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Child(name = "request", type = {Identifier.class, EligibilityRequest.class}, order=1, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) - protected Reference request; - - /** - * The actual object that is the target of the reference (Original request resource reference.) - */ - protected EligibilityRequest requestTarget; + protected Type request; /** * Transaction status: error, complete. @@ -788,38 +779,23 @@ public class EligibilityResponse extends DomainResource { /** * The Insurer who produced this adjudicated response. */ - @Child(name = "organization", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "organization", type = {Identifier.class, Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The Insurer who produced this adjudicated response.) - */ - protected Organization organizationTarget; + protected Type organization; /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name = "requestProvider", type = {Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "requestProvider", type = {Identifier.class, Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference requestProvider; - - /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) - */ - protected Practitioner requestProviderTarget; + protected Type requestProvider; /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name = "requestOrganization", type = {Organization.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Child(name = "requestOrganization", type = {Identifier.class, Organization.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) - protected Reference requestOrganization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) - */ - protected Organization requestOrganizationTarget; + protected Type requestOrganization; /** * Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates. @@ -861,7 +837,7 @@ public class EligibilityResponse extends DomainResource { @Description(shortDefinition="Processing errors", formalDefinition="Mutually exclusive with Services Provided (Item)." ) protected List error; - private static final long serialVersionUID = 1247668191L; + private static final long serialVersionUID = -674605791L; /** * Constructor @@ -913,15 +889,36 @@ public class EligibilityResponse extends DomainResource { /** * @return {@link #request} (Original request resource reference.) */ - public Reference getRequest() { - if (this.request == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityResponse.request"); - else if (Configuration.doAutoCreate()) - this.request = new Reference(); // cc + public Type getRequest() { return this.request; } + /** + * @return {@link #request} (Original request resource reference.) + */ + public Identifier getRequestIdentifier() throws FHIRException { + if (!(this.request instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.request.getClass().getName()+" was encountered"); + return (Identifier) this.request; + } + + public boolean hasRequestIdentifier() { + return this.request instanceof Identifier; + } + + /** + * @return {@link #request} (Original request resource reference.) + */ + public Reference getRequestReference() throws FHIRException { + if (!(this.request instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.request.getClass().getName()+" was encountered"); + return (Reference) this.request; + } + + public boolean hasRequestReference() { + return this.request instanceof Reference; + } + public boolean hasRequest() { return this.request != null && !this.request.isEmpty(); } @@ -929,31 +926,11 @@ public class EligibilityResponse extends DomainResource { /** * @param value {@link #request} (Original request resource reference.) */ - public EligibilityResponse setRequest(Reference value) { + public EligibilityResponse setRequest(Type value) { this.request = value; return this; } - /** - * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original request resource reference.) - */ - public EligibilityRequest getRequestTarget() { - if (this.requestTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityResponse.request"); - else if (Configuration.doAutoCreate()) - this.requestTarget = new EligibilityRequest(); // aa - return this.requestTarget; - } - - /** - * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original request resource reference.) - */ - public EligibilityResponse setRequestTarget(EligibilityRequest value) { - this.requestTarget = value; - return this; - } - /** * @return {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value */ @@ -1152,15 +1129,36 @@ public class EligibilityResponse extends DomainResource { /** * @return {@link #organization} (The Insurer who produced this adjudicated response.) */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityResponse.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc + public Type getOrganization() { return this.organization; } + /** + * @return {@link #organization} (The Insurer who produced this adjudicated response.) + */ + public Identifier getOrganizationIdentifier() throws FHIRException { + if (!(this.organization instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Identifier) this.organization; + } + + public boolean hasOrganizationIdentifier() { + return this.organization instanceof Identifier; + } + + /** + * @return {@link #organization} (The Insurer who produced this adjudicated response.) + */ + public Reference getOrganizationReference() throws FHIRException { + if (!(this.organization instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Reference) this.organization; + } + + public boolean hasOrganizationReference() { + return this.organization instanceof Reference; + } + public boolean hasOrganization() { return this.organization != null && !this.organization.isEmpty(); } @@ -1168,43 +1166,44 @@ public class EligibilityResponse extends DomainResource { /** * @param value {@link #organization} (The Insurer who produced this adjudicated response.) */ - public EligibilityResponse setOrganization(Reference value) { + public EligibilityResponse setOrganization(Type value) { this.organization = value; return this; } - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityResponse.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) - */ - public EligibilityResponse setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - /** * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) */ - public Reference getRequestProvider() { - if (this.requestProvider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityResponse.requestProvider"); - else if (Configuration.doAutoCreate()) - this.requestProvider = new Reference(); // cc + public Type getRequestProvider() { return this.requestProvider; } + /** + * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Identifier getRequestProviderIdentifier() throws FHIRException { + if (!(this.requestProvider instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.requestProvider.getClass().getName()+" was encountered"); + return (Identifier) this.requestProvider; + } + + public boolean hasRequestProviderIdentifier() { + return this.requestProvider instanceof Identifier; + } + + /** + * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getRequestProviderReference() throws FHIRException { + if (!(this.requestProvider instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.requestProvider.getClass().getName()+" was encountered"); + return (Reference) this.requestProvider; + } + + public boolean hasRequestProviderReference() { + return this.requestProvider instanceof Reference; + } + public boolean hasRequestProvider() { return this.requestProvider != null && !this.requestProvider.isEmpty(); } @@ -1212,43 +1211,44 @@ public class EligibilityResponse extends DomainResource { /** * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) */ - public EligibilityResponse setRequestProvider(Reference value) { + public EligibilityResponse setRequestProvider(Type value) { this.requestProvider = value; return this; } - /** - * @return {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Practitioner getRequestProviderTarget() { - if (this.requestProviderTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityResponse.requestProvider"); - else if (Configuration.doAutoCreate()) - this.requestProviderTarget = new Practitioner(); // aa - return this.requestProviderTarget; - } - - /** - * @param value {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public EligibilityResponse setRequestProviderTarget(Practitioner value) { - this.requestProviderTarget = value; - return this; - } - /** * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) */ - public Reference getRequestOrganization() { - if (this.requestOrganization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityResponse.requestOrganization"); - else if (Configuration.doAutoCreate()) - this.requestOrganization = new Reference(); // cc + public Type getRequestOrganization() { return this.requestOrganization; } + /** + * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public Identifier getRequestOrganizationIdentifier() throws FHIRException { + if (!(this.requestOrganization instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.requestOrganization.getClass().getName()+" was encountered"); + return (Identifier) this.requestOrganization; + } + + public boolean hasRequestOrganizationIdentifier() { + return this.requestOrganization instanceof Identifier; + } + + /** + * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public Reference getRequestOrganizationReference() throws FHIRException { + if (!(this.requestOrganization instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.requestOrganization.getClass().getName()+" was encountered"); + return (Reference) this.requestOrganization; + } + + public boolean hasRequestOrganizationReference() { + return this.requestOrganization instanceof Reference; + } + public boolean hasRequestOrganization() { return this.requestOrganization != null && !this.requestOrganization.isEmpty(); } @@ -1256,31 +1256,11 @@ public class EligibilityResponse extends DomainResource { /** * @param value {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) */ - public EligibilityResponse setRequestOrganization(Reference value) { + public EligibilityResponse setRequestOrganization(Type value) { this.requestOrganization = value; return this; } - /** - * @return {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public Organization getRequestOrganizationTarget() { - if (this.requestOrganizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EligibilityResponse.requestOrganization"); - else if (Configuration.doAutoCreate()) - this.requestOrganizationTarget = new Organization(); // aa - return this.requestOrganizationTarget; - } - - /** - * @param value {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public EligibilityResponse setRequestOrganizationTarget(Organization value) { - this.requestOrganizationTarget = value; - return this; - } - /** * @return {@link #inforce} (Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.). This is the underlying object with id, value and extensions. The accessor "getInforce" gives direct access to the value */ @@ -1477,15 +1457,15 @@ public class EligibilityResponse extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("request", "Reference(EligibilityRequest)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("request[x]", "Identifier|Reference(EligibilityRequest)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); childrenList.add(new Property("outcome", "code", "Transaction status: error, complete.", 0, java.lang.Integer.MAX_VALUE, outcome)); childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, java.lang.Integer.MAX_VALUE, disposition)); childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); - childrenList.add(new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider)); - childrenList.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); + childrenList.add(new Property("organization[x]", "Identifier|Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("requestProvider[x]", "Identifier|Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider)); + childrenList.add(new Property("requestOrganization[x]", "Identifier|Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); childrenList.add(new Property("inforce", "boolean", "Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.", 0, java.lang.Integer.MAX_VALUE, inforce)); childrenList.add(new Property("contract", "Reference(Contract)", "The contract resource which may provide more detailed information.", 0, java.lang.Integer.MAX_VALUE, contract)); childrenList.add(new Property("form", "Coding", "The form to be used for printing the content.", 0, java.lang.Integer.MAX_VALUE, form)); @@ -1497,8 +1477,8 @@ public class EligibilityResponse extends DomainResource { public void setProperty(String name, Base value) throws FHIRException { if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); - else if (name.equals("request")) - this.request = castToReference(value); // Reference + else if (name.equals("request[x]")) + this.request = (Type) value; // Type else if (name.equals("outcome")) this.outcome = new RemittanceOutcomeEnumFactory().fromType(value); // Enumeration else if (name.equals("disposition")) @@ -1509,12 +1489,12 @@ public class EligibilityResponse extends DomainResource { this.originalRuleset = castToCoding(value); // Coding else if (name.equals("created")) this.created = castToDateTime(value); // DateTimeType - else if (name.equals("organization")) - this.organization = castToReference(value); // Reference - else if (name.equals("requestProvider")) - this.requestProvider = castToReference(value); // Reference - else if (name.equals("requestOrganization")) - this.requestOrganization = castToReference(value); // Reference + else if (name.equals("organization[x]")) + this.organization = (Type) value; // Type + else if (name.equals("requestProvider[x]")) + this.requestProvider = (Type) value; // Type + else if (name.equals("requestOrganization[x]")) + this.requestOrganization = (Type) value; // Type else if (name.equals("inforce")) this.inforce = castToBoolean(value); // BooleanType else if (name.equals("contract")) @@ -1534,7 +1514,11 @@ public class EligibilityResponse extends DomainResource { if (name.equals("identifier")) { return addIdentifier(); } - else if (name.equals("request")) { + else if (name.equals("requestIdentifier")) { + this.request = new Identifier(); + return this.request; + } + else if (name.equals("requestReference")) { this.request = new Reference(); return this.request; } @@ -1555,15 +1539,27 @@ public class EligibilityResponse extends DomainResource { else if (name.equals("created")) { throw new FHIRException("Cannot call addChild on a primitive type EligibilityResponse.created"); } - else if (name.equals("organization")) { + else if (name.equals("organizationIdentifier")) { + this.organization = new Identifier(); + return this.organization; + } + else if (name.equals("organizationReference")) { this.organization = new Reference(); return this.organization; } - else if (name.equals("requestProvider")) { + else if (name.equals("requestProviderIdentifier")) { + this.requestProvider = new Identifier(); + return this.requestProvider; + } + else if (name.equals("requestProviderReference")) { this.requestProvider = new Reference(); return this.requestProvider; } - else if (name.equals("requestOrganization")) { + else if (name.equals("requestOrganizationIdentifier")) { + this.requestOrganization = new Identifier(); + return this.requestOrganization; + } + else if (name.equals("requestOrganizationReference")) { this.requestOrganization = new Reference(); return this.requestOrganization; } @@ -1657,14 +1653,9 @@ public class EligibilityResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty()) - && (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty()) - && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) - && (created == null || created.isEmpty()) && (organization == null || organization.isEmpty()) - && (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty()) - && (inforce == null || inforce.isEmpty()) && (contract == null || contract.isEmpty()) && (form == null || form.isEmpty()) - && (benefitBalance == null || benefitBalance.isEmpty()) && (error == null || error.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, request, outcome + , disposition, ruleset, originalRuleset, created, organization, requestProvider, requestOrganization + , inforce, contract, form, benefitBalance, error); } @Override @@ -1672,6 +1663,46 @@ public class EligibilityResponse extends DomainResource { return ResourceType.EligibilityResponse; } + /** + * Search parameter: requestprovideridentifier + *

+ * Description: The EligibilityRequest provider
+ * Type: token
+ * Path: EligibilityResponse.requestProviderIdentifier
+ *

+ */ + @SearchParamDefinition(name="requestprovideridentifier", path="EligibilityResponse.requestProviderIdentifier", description="The EligibilityRequest provider", type="token" ) + public static final String SP_REQUESTPROVIDERIDENTIFIER = "requestprovideridentifier"; + /** + * Fluent Client search parameter constant for requestprovideridentifier + *

+ * Description: The EligibilityRequest provider
+ * Type: token
+ * Path: EligibilityResponse.requestProviderIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTPROVIDERIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTPROVIDERIDENTIFIER); + + /** + * Search parameter: requestorganizationidentifier + *

+ * Description: The EligibilityRequest organization
+ * Type: token
+ * Path: EligibilityResponse.requestOrganizationIdentifier
+ *

+ */ + @SearchParamDefinition(name="requestorganizationidentifier", path="EligibilityResponse.requestOrganizationIdentifier", description="The EligibilityRequest organization", type="token" ) + public static final String SP_REQUESTORGANIZATIONIDENTIFIER = "requestorganizationidentifier"; + /** + * Fluent Client search parameter constant for requestorganizationidentifier + *

+ * Description: The EligibilityRequest organization
+ * Type: token
+ * Path: EligibilityResponse.requestOrganizationIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTORGANIZATIONIDENTIFIER); + /** * Search parameter: identifier *

@@ -1692,32 +1723,6 @@ public class EligibilityResponse extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); - /** - * Search parameter: request - *

- * Description: The EligibilityRequest reference
- * Type: reference
- * Path: EligibilityResponse.request
- *

- */ - @SearchParamDefinition(name="request", path="EligibilityResponse.request", description="The EligibilityRequest reference", type="reference" ) - public static final String SP_REQUEST = "request"; - /** - * Fluent Client search parameter constant for request - *

- * Description: The EligibilityRequest reference
- * Type: reference
- * Path: EligibilityResponse.request
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUEST = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUEST); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "EligibilityResponse:request". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST = new ca.uhn.fhir.model.api.Include("EligibilityResponse:request").toLocked(); - /** * Search parameter: disposition *

@@ -1738,6 +1743,26 @@ public class EligibilityResponse extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.StringClientParam DISPOSITION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DISPOSITION); + /** + * Search parameter: organizationidentifier + *

+ * Description: The organization which generated this resource
+ * Type: token
+ * Path: EligibilityResponse.organizationIdentifier
+ *

+ */ + @SearchParamDefinition(name="organizationidentifier", path="EligibilityResponse.organizationIdentifier", description="The organization which generated this resource", type="token" ) + public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier"; + /** + * Fluent Client search parameter constant for organizationidentifier + *

+ * Description: The organization which generated this resource
+ * Type: token
+ * Path: EligibilityResponse.organizationIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam ORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ORGANIZATIONIDENTIFIER); + /** * Search parameter: created *

@@ -1759,82 +1784,128 @@ public class EligibilityResponse extends DomainResource { public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED); /** - * Search parameter: organization + * Search parameter: requestidentifier + *

+ * Description: The EligibilityRequest reference
+ * Type: token
+ * Path: EligibilityResponse.requestIdentifier
+ *

+ */ + @SearchParamDefinition(name="requestidentifier", path="EligibilityResponse.requestIdentifier", description="The EligibilityRequest reference", type="token" ) + public static final String SP_REQUESTIDENTIFIER = "requestidentifier"; + /** + * Fluent Client search parameter constant for requestidentifier + *

+ * Description: The EligibilityRequest reference
+ * Type: token
+ * Path: EligibilityResponse.requestIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTIDENTIFIER); + + /** + * Search parameter: organizationreference *

* Description: The organization which generated this resource
* Type: reference
- * Path: EligibilityResponse.organization
+ * Path: EligibilityResponse.organizationReference
*

*/ - @SearchParamDefinition(name="organization", path="EligibilityResponse.organization", description="The organization which generated this resource", type="reference" ) - public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="organizationreference", path="EligibilityResponse.organizationReference", description="The organization which generated this resource", type="reference" ) + public static final String SP_ORGANIZATIONREFERENCE = "organizationreference"; /** - * Fluent Client search parameter constant for organization + * Fluent Client search parameter constant for organizationreference *

* Description: The organization which generated this resource
* Type: reference
- * Path: EligibilityResponse.organization
+ * Path: EligibilityResponse.organizationReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATIONREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "EligibilityResponse:organization". + * the path value of "EligibilityResponse:organizationreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("EligibilityResponse:organization").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("EligibilityResponse:organizationreference").toLocked(); /** - * Search parameter: requestprovider + * Search parameter: requestproviderreference *

- * Description: Reference to the EligibilityRequest provider
+ * Description: The EligibilityRequest provider
* Type: reference
- * Path: EligibilityResponse.requestProvider
+ * Path: EligibilityResponse.requestProviderReference
*

*/ - @SearchParamDefinition(name="requestprovider", path="EligibilityResponse.requestProvider", description="Reference to the EligibilityRequest provider", type="reference" ) - public static final String SP_REQUESTPROVIDER = "requestprovider"; + @SearchParamDefinition(name="requestproviderreference", path="EligibilityResponse.requestProviderReference", description="The EligibilityRequest provider", type="reference" ) + public static final String SP_REQUESTPROVIDERREFERENCE = "requestproviderreference"; /** - * Fluent Client search parameter constant for requestprovider + * Fluent Client search parameter constant for requestproviderreference *

- * Description: Reference to the EligibilityRequest provider
+ * Description: The EligibilityRequest provider
* Type: reference
- * Path: EligibilityResponse.requestProvider
+ * Path: EligibilityResponse.requestProviderReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTPROVIDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTPROVIDER); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTPROVIDERREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTPROVIDERREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "EligibilityResponse:requestprovider". + * the path value of "EligibilityResponse:requestproviderreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTPROVIDER = new ca.uhn.fhir.model.api.Include("EligibilityResponse:requestprovider").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTPROVIDERREFERENCE = new ca.uhn.fhir.model.api.Include("EligibilityResponse:requestproviderreference").toLocked(); /** - * Search parameter: requestorganization + * Search parameter: requestorganizationreference *

- * Description: Reference to the EligibilityRequest organization
+ * Description: The EligibilityRequest organization
* Type: reference
- * Path: EligibilityResponse.requestOrganization
+ * Path: EligibilityResponse.requestOrganizationReference
*

*/ - @SearchParamDefinition(name="requestorganization", path="EligibilityResponse.requestOrganization", description="Reference to the EligibilityRequest organization", type="reference" ) - public static final String SP_REQUESTORGANIZATION = "requestorganization"; + @SearchParamDefinition(name="requestorganizationreference", path="EligibilityResponse.requestOrganizationReference", description="The EligibilityRequest organization", type="reference" ) + public static final String SP_REQUESTORGANIZATIONREFERENCE = "requestorganizationreference"; /** - * Fluent Client search parameter constant for requestorganization + * Fluent Client search parameter constant for requestorganizationreference *

- * Description: Reference to the EligibilityRequest organization
+ * Description: The EligibilityRequest organization
* Type: reference
- * Path: EligibilityResponse.requestOrganization
+ * Path: EligibilityResponse.requestOrganizationReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTORGANIZATION); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTORGANIZATIONREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "EligibilityResponse:requestorganization". + * the path value of "EligibilityResponse:requestorganizationreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTORGANIZATION = new ca.uhn.fhir.model.api.Include("EligibilityResponse:requestorganization").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("EligibilityResponse:requestorganizationreference").toLocked(); + + /** + * Search parameter: requestreference + *

+ * Description: The EligibilityRequest reference
+ * Type: reference
+ * Path: EligibilityResponse.requestReference
+ *

+ */ + @SearchParamDefinition(name="requestreference", path="EligibilityResponse.requestReference", description="The EligibilityRequest reference", type="reference" ) + public static final String SP_REQUESTREFERENCE = "requestreference"; + /** + * Fluent Client search parameter constant for requestreference + *

+ * Description: The EligibilityRequest reference
+ * Type: reference
+ * Path: EligibilityResponse.requestReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTREFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "EligibilityResponse:requestreference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTREFERENCE = new ca.uhn.fhir.model.api.Include("EligibilityResponse:requestreference").toLocked(); /** * Search parameter: outcome diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Encounter.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Encounter.java index ea4293f2eff..db28266d622 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Encounter.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Encounter.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient. */ @@ -682,8 +681,7 @@ Not to be used when the patient is currently at the location } public boolean isEmpty() { - return super.isEmpty() && (status == null || status.isEmpty()) && (period == null || period.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( status, period); } public String fhirType() { @@ -904,8 +902,7 @@ Not to be used when the patient is currently at the location } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (period == null || period.isEmpty()) - && (individual == null || individual.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, period, individual); } public String fhirType() { @@ -1600,13 +1597,9 @@ Not to be used when the patient is currently at the location } public boolean isEmpty() { - return super.isEmpty() && (preAdmissionIdentifier == null || preAdmissionIdentifier.isEmpty()) - && (origin == null || origin.isEmpty()) && (admitSource == null || admitSource.isEmpty()) - && (admittingDiagnosis == null || admittingDiagnosis.isEmpty()) && (reAdmission == null || reAdmission.isEmpty()) - && (dietPreference == null || dietPreference.isEmpty()) && (specialCourtesy == null || specialCourtesy.isEmpty()) - && (specialArrangement == null || specialArrangement.isEmpty()) && (destination == null || destination.isEmpty()) - && (dischargeDisposition == null || dischargeDisposition.isEmpty()) && (dischargeDiagnosis == null || dischargeDiagnosis.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( preAdmissionIdentifier, origin + , admitSource, admittingDiagnosis, reAdmission, dietPreference, specialCourtesy, specialArrangement + , destination, dischargeDisposition, dischargeDiagnosis); } public String fhirType() { @@ -1845,8 +1838,7 @@ Not to be used when the patient is currently at the location } public boolean isEmpty() { - return super.isEmpty() && (location == null || location.isEmpty()) && (status == null || status.isEmpty()) - && (period == null || period.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( location, status, period); } public String fhirType() { @@ -3054,15 +3046,10 @@ Not to be used when the patient is currently at the location } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) - && (statusHistory == null || statusHistory.isEmpty()) && (class_ == null || class_.isEmpty()) - && (type == null || type.isEmpty()) && (priority == null || priority.isEmpty()) && (patient == null || patient.isEmpty()) - && (episodeOfCare == null || episodeOfCare.isEmpty()) && (incomingReferral == null || incomingReferral.isEmpty()) - && (participant == null || participant.isEmpty()) && (appointment == null || appointment.isEmpty()) - && (period == null || period.isEmpty()) && (length == null || length.isEmpty()) && (reason == null || reason.isEmpty()) - && (indication == null || indication.isEmpty()) && (hospitalization == null || hospitalization.isEmpty()) - && (location == null || location.isEmpty()) && (serviceProvider == null || serviceProvider.isEmpty()) - && (partOf == null || partOf.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, statusHistory + , class_, type, priority, patient, episodeOfCare, incomingReferral, participant, appointment + , period, length, reason, indication, hospitalization, location, serviceProvider, partOf + ); } @Override @@ -3210,7 +3197,7 @@ Not to be used when the patient is currently at the location * Path: Encounter.participant.individual
*

*/ - @SearchParamDefinition(name="practitioner", path="Encounter.participant.individual", description="Persons involved in the encounter other than the patient", type="reference" ) + @SearchParamDefinition(name="practitioner", path="Encounter.participant.individual", description="Persons involved in the encounter other than the patient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_PRACTITIONER = "practitioner"; /** * Fluent Client search parameter constant for practitioner @@ -3354,7 +3341,7 @@ Not to be used when the patient is currently at the location * Path: Encounter.participant.individual
*

*/ - @SearchParamDefinition(name="participant", path="Encounter.participant.individual", description="Persons involved in the encounter other than the patient", type="reference" ) + @SearchParamDefinition(name="participant", path="Encounter.participant.individual", description="Persons involved in the encounter other than the patient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_PARTICIPANT = "participant"; /** * Fluent Client search parameter constant for participant @@ -3406,7 +3393,7 @@ Not to be used when the patient is currently at the location * Path: Encounter.patient
*

*/ - @SearchParamDefinition(name="patient", path="Encounter.patient", description="The patient present at the encounter", type="reference" ) + @SearchParamDefinition(name="patient", path="Encounter.patient", description="The patient present at the encounter", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EnrollmentRequest.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EnrollmentRequest.java index 32e85ab75cc..fb6d64e1c20 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EnrollmentRequest.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EnrollmentRequest.java @@ -29,19 +29,18 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * This resource provides the insurance enrollment details to the insurer regarding a specified coverage. */ @@ -680,11 +679,8 @@ public class EnrollmentRequest extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) - && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) - && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) - && (subject == null || subject.isEmpty()) && (coverage == null || coverage.isEmpty()) && (relationship == null || relationship.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, ruleset, originalRuleset + , created, target, provider, organization, subject, coverage, relationship); } @Override @@ -720,7 +716,7 @@ public class EnrollmentRequest extends DomainResource { * Path: EnrollmentRequest.subject
*

*/ - @SearchParamDefinition(name="subject", path="EnrollmentRequest.subject", description="The party to be enrolled", type="reference" ) + @SearchParamDefinition(name="subject", path="EnrollmentRequest.subject", description="The party to be enrolled", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EnrollmentResponse.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EnrollmentResponse.java index f9509e1d6d9..5e73038fea8 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EnrollmentResponse.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EnrollmentResponse.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * This resource provides enrollment and plan details from the processing of an Enrollment resource. */ @@ -696,12 +694,9 @@ public class EnrollmentResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty()) - && (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty()) - && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) - && (created == null || created.isEmpty()) && (organization == null || organization.isEmpty()) - && (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, request, outcome + , disposition, ruleset, originalRuleset, created, organization, requestProvider, requestOrganization + ); } @Override diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Enumeration.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Enumeration.java index 58778347953..0b0331d0477 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Enumeration.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Enumeration.java @@ -1,6 +1,5 @@ package org.hl7.fhir.dstu3.model; -import java.io.Externalizable; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; @@ -43,7 +42,7 @@ POSSIBILITY OF SUCH DAMAGE. * */ @DatatypeDef(name = "code", isSpecialization = true) -public class Enumeration> extends PrimitiveType implements IBaseEnumeration, Externalizable { +public class Enumeration> extends PrimitiveType implements IBaseEnumeration { private static final long serialVersionUID = 1L; private EnumFactory myEnumFactory; diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Enumerations.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Enumerations.java index 9faf19eb4b0..5a2d64a7b9f 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Enumerations.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Enumerations.java @@ -1,7 +1,5 @@ package org.hl7.fhir.dstu3.model; -import org.hl7.fhir.dstu3.exceptions.FHIRException; - /* Copyright (c) 2011+, HL7, Inc. All rights reserved. @@ -31,14 +29,16 @@ import org.hl7.fhir.dstu3.exceptions.FHIRException; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; public class Enumerations { // In here: +// AbstractType: A type defined by FHIR that is an abstract type // AdministrativeGender: The gender of a person used for administrative purposes. // AgeUnits: A valueSet of UCUM codes for representing age value units. // BindingStrength: Indication of the degree of conformance expectations associated with a binding. @@ -47,6 +47,7 @@ public class Enumerations { // DataAbsentReason: Used to specify why the normally expected content of the data element is missing. // DataType: The type of an element - one of the FHIR data types. // DocumentReferenceStatus: The status of the document reference. +// FHIRAllTypes: Either an abstract type, a resource or a data type. // FHIRDefinedType: Either a resource or a data type. // MessageEvent: One of the message events defined as part of FHIR. // NoteType: The presentation types of notes. @@ -56,6 +57,93 @@ public class Enumerations { // SpecialValues: A set of generally useful codes defined so they can be included in value sets. + public enum AbstractType { + /** + * A place holder that means any kind of data type + */ + TYPE, + /** + * A place holder that means any kind of resource + */ + ANY, + /** + * added to help the parsers + */ + NULL; + public static AbstractType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("Type".equals(codeString)) + return TYPE; + if ("Any".equals(codeString)) + return ANY; + throw new FHIRException("Unknown AbstractType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case TYPE: return "Type"; + case ANY: return "Any"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case TYPE: return "http://hl7.org/fhir/abstract-types"; + case ANY: return "http://hl7.org/fhir/abstract-types"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case TYPE: return "A place holder that means any kind of data type"; + case ANY: return "A place holder that means any kind of resource"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case TYPE: return "Type"; + case ANY: return "Any"; + default: return "?"; + } + } + } + + public static class AbstractTypeEnumFactory implements EnumFactory { + public AbstractType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("Type".equals(codeString)) + return AbstractType.TYPE; + if ("Any".equals(codeString)) + return AbstractType.ANY; + throw new IllegalArgumentException("Unknown AbstractType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("Type".equals(codeString)) + return new Enumeration(this, AbstractType.TYPE); + if ("Any".equals(codeString)) + return new Enumeration(this, AbstractType.ANY); + throw new FHIRException("Unknown AbstractType code '"+codeString+"'"); + } + public String toCode(AbstractType code) { + if (code == AbstractType.TYPE) + return "Type"; + if (code == AbstractType.ANY) + return "Any"; + return "?"; + } + public String toSystem(AbstractType code) { + return code.getSystem(); + } + } + public enum AdministrativeGender { /** * Male @@ -332,7 +420,7 @@ public class Enumerations { */ REQUIRED, /** - * To be conformant, instances of this element SHALL include a code from the specified value set if any of the codes within the value set can apply to the concept being communicated. If the valueset does not cover the concept (based on human review), alternate codings (or, data type allowing, text) may be included instead. + * To be conformant, instances of this element SHALL include a code from the specified value set if any of the codes within the value set can apply to the concept being communicated. If the value set does not cover the concept (based on human review), alternate codings (or, data type allowing, text) may be included instead. */ EXTENSIBLE, /** @@ -381,7 +469,7 @@ public class Enumerations { public String getDefinition() { switch (this) { case REQUIRED: return "To be conformant, instances of this element SHALL include a code from the specified value set."; - case EXTENSIBLE: return "To be conformant, instances of this element SHALL include a code from the specified value set if any of the codes within the value set can apply to the concept being communicated. If the valueset does not cover the concept (based on human review), alternate codings (or, data type allowing, text) may be included instead."; + case EXTENSIBLE: return "To be conformant, instances of this element SHALL include a code from the specified value set if any of the codes within the value set can apply to the concept being communicated. If the value set does not cover the concept (based on human review), alternate codings (or, data type allowing, text) may be included instead."; case PREFERRED: return "Instances are encouraged to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant."; case EXAMPLE: return "Instances are not expected or even encouraged to draw from the specified value set. The value set merely provides examples of the types of concepts intended to be included."; default: return "?"; @@ -948,7 +1036,11 @@ public class Enumerations { public enum DataType { /** - * There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world. + * The definition of an action to be performed. Some aspects of the definition are specified statically, and some aspects can be specified dynamically by referencing logic defined in a library. + */ + ACTIONDEFINITION, + /** + * An address expressed using postal conventions (as opposed to GPS or other location definition formats). This data type may be used to convey addresses for use in delivering mail as well as for visiting locations and which might not be valid for mail delivery. There are a variety of postal address formats defined around the world. */ ADDRESS, /** @@ -983,6 +1075,10 @@ public class Enumerations { * null */ COUNT, + /** + * Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data. + */ + DATAREQUIREMENT, /** * null */ @@ -1015,6 +1111,10 @@ public class Enumerations { * The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource. */ META, + /** + * The ModuleMetadata structure defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information. + */ + MODULEMETADATA, /** * null */ @@ -1023,6 +1123,10 @@ public class Enumerations { * A human-readable formatted text, including images. */ NARRATIVE, + /** + * The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse. + */ + PARAMETERDEFINITION, /** * A time period defined by a start and end date and optionally time. */ @@ -1059,6 +1163,10 @@ public class Enumerations { * Specifies an event that may occur multiple times. Timing schedules are used to record when things are expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds. */ TIMING, + /** + * A description of a triggering event. + */ + TRIGGERDEFINITION, /** * A stream of bytes */ @@ -1138,6 +1246,8 @@ public class Enumerations { public static DataType fromCode(String codeString) throws FHIRException { if (codeString == null || "".equals(codeString)) return null; + if ("ActionDefinition".equals(codeString)) + return ACTIONDEFINITION; if ("Address".equals(codeString)) return ADDRESS; if ("Age".equals(codeString)) @@ -1156,6 +1266,8 @@ public class Enumerations { return CONTACTPOINT; if ("Count".equals(codeString)) return COUNT; + if ("DataRequirement".equals(codeString)) + return DATAREQUIREMENT; if ("Distance".equals(codeString)) return DISTANCE; if ("Duration".equals(codeString)) @@ -1172,10 +1284,14 @@ public class Enumerations { return IDENTIFIER; if ("Meta".equals(codeString)) return META; + if ("ModuleMetadata".equals(codeString)) + return MODULEMETADATA; if ("Money".equals(codeString)) return MONEY; if ("Narrative".equals(codeString)) return NARRATIVE; + if ("ParameterDefinition".equals(codeString)) + return PARAMETERDEFINITION; if ("Period".equals(codeString)) return PERIOD; if ("Quantity".equals(codeString)) @@ -1194,6 +1310,8 @@ public class Enumerations { return SIMPLEQUANTITY; if ("Timing".equals(codeString)) return TIMING; + if ("TriggerDefinition".equals(codeString)) + return TRIGGERDEFINITION; if ("base64Binary".equals(codeString)) return BASE64BINARY; if ("boolean".equals(codeString)) @@ -1234,6 +1352,7 @@ public class Enumerations { } public String toCode() { switch (this) { + case ACTIONDEFINITION: return "ActionDefinition"; case ADDRESS: return "Address"; case AGE: return "Age"; case ANNOTATION: return "Annotation"; @@ -1243,6 +1362,7 @@ public class Enumerations { case CODING: return "Coding"; case CONTACTPOINT: return "ContactPoint"; case COUNT: return "Count"; + case DATAREQUIREMENT: return "DataRequirement"; case DISTANCE: return "Distance"; case DURATION: return "Duration"; case ELEMENT: return "Element"; @@ -1251,8 +1371,10 @@ public class Enumerations { case HUMANNAME: return "HumanName"; case IDENTIFIER: return "Identifier"; case META: return "Meta"; + case MODULEMETADATA: return "ModuleMetadata"; case MONEY: return "Money"; case NARRATIVE: return "Narrative"; + case PARAMETERDEFINITION: return "ParameterDefinition"; case PERIOD: return "Period"; case QUANTITY: return "Quantity"; case RANGE: return "Range"; @@ -1262,6 +1384,7 @@ public class Enumerations { case SIGNATURE: return "Signature"; case SIMPLEQUANTITY: return "SimpleQuantity"; case TIMING: return "Timing"; + case TRIGGERDEFINITION: return "TriggerDefinition"; case BASE64BINARY: return "base64Binary"; case BOOLEAN: return "boolean"; case CODE: return "code"; @@ -1285,6 +1408,7 @@ public class Enumerations { } public String getSystem() { switch (this) { + case ACTIONDEFINITION: return "http://hl7.org/fhir/data-types"; case ADDRESS: return "http://hl7.org/fhir/data-types"; case AGE: return "http://hl7.org/fhir/data-types"; case ANNOTATION: return "http://hl7.org/fhir/data-types"; @@ -1294,6 +1418,7 @@ public class Enumerations { case CODING: return "http://hl7.org/fhir/data-types"; case CONTACTPOINT: return "http://hl7.org/fhir/data-types"; case COUNT: return "http://hl7.org/fhir/data-types"; + case DATAREQUIREMENT: return "http://hl7.org/fhir/data-types"; case DISTANCE: return "http://hl7.org/fhir/data-types"; case DURATION: return "http://hl7.org/fhir/data-types"; case ELEMENT: return "http://hl7.org/fhir/data-types"; @@ -1302,8 +1427,10 @@ public class Enumerations { case HUMANNAME: return "http://hl7.org/fhir/data-types"; case IDENTIFIER: return "http://hl7.org/fhir/data-types"; case META: return "http://hl7.org/fhir/data-types"; + case MODULEMETADATA: return "http://hl7.org/fhir/data-types"; case MONEY: return "http://hl7.org/fhir/data-types"; case NARRATIVE: return "http://hl7.org/fhir/data-types"; + case PARAMETERDEFINITION: return "http://hl7.org/fhir/data-types"; case PERIOD: return "http://hl7.org/fhir/data-types"; case QUANTITY: return "http://hl7.org/fhir/data-types"; case RANGE: return "http://hl7.org/fhir/data-types"; @@ -1313,6 +1440,7 @@ public class Enumerations { case SIGNATURE: return "http://hl7.org/fhir/data-types"; case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types"; case TIMING: return "http://hl7.org/fhir/data-types"; + case TRIGGERDEFINITION: return "http://hl7.org/fhir/data-types"; case BASE64BINARY: return "http://hl7.org/fhir/data-types"; case BOOLEAN: return "http://hl7.org/fhir/data-types"; case CODE: return "http://hl7.org/fhir/data-types"; @@ -1336,7 +1464,8 @@ public class Enumerations { } public String getDefinition() { switch (this) { - case ADDRESS: return "There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world."; + case ACTIONDEFINITION: return "The definition of an action to be performed. Some aspects of the definition are specified statically, and some aspects can be specified dynamically by referencing logic defined in a library."; + case ADDRESS: return "An address expressed using postal conventions (as opposed to GPS or other location definition formats). This data type may be used to convey addresses for use in delivering mail as well as for visiting locations and which might not be valid for mail delivery. There are a variety of postal address formats defined around the world."; case AGE: return ""; case ANNOTATION: return "A text note which also contains information about who made the statement and when."; case ATTACHMENT: return "For referring to data content defined in other formats."; @@ -1345,6 +1474,7 @@ public class Enumerations { case CODING: return "A reference to a code defined by a terminology system."; case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc."; case COUNT: return ""; + case DATAREQUIREMENT: return "Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data."; case DISTANCE: return ""; case DURATION: return ""; case ELEMENT: return "Base definition for all elements in a resource."; @@ -1353,8 +1483,10 @@ public class Enumerations { case HUMANNAME: return "A human's name with the ability to identify parts and usage."; case IDENTIFIER: return "A technical identifier - identifies some entity uniquely and unambiguously."; case META: return "The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource."; + case MODULEMETADATA: return "The ModuleMetadata structure defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information."; case MONEY: return ""; case NARRATIVE: return "A human-readable formatted text, including images."; + case PARAMETERDEFINITION: return "The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse."; case PERIOD: return "A time period defined by a start and end date and optionally time."; case QUANTITY: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies."; case RANGE: return "A set of ordered Quantities defined by a low and high limit."; @@ -1364,6 +1496,7 @@ public class Enumerations { case SIGNATURE: return "A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities."; case SIMPLEQUANTITY: return ""; case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds."; + case TRIGGERDEFINITION: return "A description of a triggering event."; case BASE64BINARY: return "A stream of bytes"; case BOOLEAN: return "Value of \"true\" or \"false\""; case CODE: return "A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents"; @@ -1387,6 +1520,7 @@ public class Enumerations { } public String getDisplay() { switch (this) { + case ACTIONDEFINITION: return "ActionDefinition"; case ADDRESS: return "Address"; case AGE: return "Age"; case ANNOTATION: return "Annotation"; @@ -1396,6 +1530,7 @@ public class Enumerations { case CODING: return "Coding"; case CONTACTPOINT: return "ContactPoint"; case COUNT: return "Count"; + case DATAREQUIREMENT: return "DataRequirement"; case DISTANCE: return "Distance"; case DURATION: return "Duration"; case ELEMENT: return "Element"; @@ -1404,8 +1539,10 @@ public class Enumerations { case HUMANNAME: return "HumanName"; case IDENTIFIER: return "Identifier"; case META: return "Meta"; + case MODULEMETADATA: return "ModuleMetadata"; case MONEY: return "Money"; case NARRATIVE: return "Narrative"; + case PARAMETERDEFINITION: return "ParameterDefinition"; case PERIOD: return "Period"; case QUANTITY: return "Quantity"; case RANGE: return "Range"; @@ -1415,6 +1552,7 @@ public class Enumerations { case SIGNATURE: return "Signature"; case SIMPLEQUANTITY: return "SimpleQuantity"; case TIMING: return "Timing"; + case TRIGGERDEFINITION: return "TriggerDefinition"; case BASE64BINARY: return "base64Binary"; case BOOLEAN: return "boolean"; case CODE: return "code"; @@ -1443,6 +1581,8 @@ public class Enumerations { if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString)) return null; + if ("ActionDefinition".equals(codeString)) + return DataType.ACTIONDEFINITION; if ("Address".equals(codeString)) return DataType.ADDRESS; if ("Age".equals(codeString)) @@ -1461,6 +1601,8 @@ public class Enumerations { return DataType.CONTACTPOINT; if ("Count".equals(codeString)) return DataType.COUNT; + if ("DataRequirement".equals(codeString)) + return DataType.DATAREQUIREMENT; if ("Distance".equals(codeString)) return DataType.DISTANCE; if ("Duration".equals(codeString)) @@ -1477,10 +1619,14 @@ public class Enumerations { return DataType.IDENTIFIER; if ("Meta".equals(codeString)) return DataType.META; + if ("ModuleMetadata".equals(codeString)) + return DataType.MODULEMETADATA; if ("Money".equals(codeString)) return DataType.MONEY; if ("Narrative".equals(codeString)) return DataType.NARRATIVE; + if ("ParameterDefinition".equals(codeString)) + return DataType.PARAMETERDEFINITION; if ("Period".equals(codeString)) return DataType.PERIOD; if ("Quantity".equals(codeString)) @@ -1499,6 +1645,8 @@ public class Enumerations { return DataType.SIMPLEQUANTITY; if ("Timing".equals(codeString)) return DataType.TIMING; + if ("TriggerDefinition".equals(codeString)) + return DataType.TRIGGERDEFINITION; if ("base64Binary".equals(codeString)) return DataType.BASE64BINARY; if ("boolean".equals(codeString)) @@ -1543,6 +1691,8 @@ public class Enumerations { String codeString = ((PrimitiveType) code).asStringValue(); if (codeString == null || "".equals(codeString)) return null; + if ("ActionDefinition".equals(codeString)) + return new Enumeration(this, DataType.ACTIONDEFINITION); if ("Address".equals(codeString)) return new Enumeration(this, DataType.ADDRESS); if ("Age".equals(codeString)) @@ -1561,6 +1711,8 @@ public class Enumerations { return new Enumeration(this, DataType.CONTACTPOINT); if ("Count".equals(codeString)) return new Enumeration(this, DataType.COUNT); + if ("DataRequirement".equals(codeString)) + return new Enumeration(this, DataType.DATAREQUIREMENT); if ("Distance".equals(codeString)) return new Enumeration(this, DataType.DISTANCE); if ("Duration".equals(codeString)) @@ -1577,10 +1729,14 @@ public class Enumerations { return new Enumeration(this, DataType.IDENTIFIER); if ("Meta".equals(codeString)) return new Enumeration(this, DataType.META); + if ("ModuleMetadata".equals(codeString)) + return new Enumeration(this, DataType.MODULEMETADATA); if ("Money".equals(codeString)) return new Enumeration(this, DataType.MONEY); if ("Narrative".equals(codeString)) return new Enumeration(this, DataType.NARRATIVE); + if ("ParameterDefinition".equals(codeString)) + return new Enumeration(this, DataType.PARAMETERDEFINITION); if ("Period".equals(codeString)) return new Enumeration(this, DataType.PERIOD); if ("Quantity".equals(codeString)) @@ -1599,6 +1755,8 @@ public class Enumerations { return new Enumeration(this, DataType.SIMPLEQUANTITY); if ("Timing".equals(codeString)) return new Enumeration(this, DataType.TIMING); + if ("TriggerDefinition".equals(codeString)) + return new Enumeration(this, DataType.TRIGGERDEFINITION); if ("base64Binary".equals(codeString)) return new Enumeration(this, DataType.BASE64BINARY); if ("boolean".equals(codeString)) @@ -1638,6 +1796,8 @@ public class Enumerations { throw new FHIRException("Unknown DataType code '"+codeString+"'"); } public String toCode(DataType code) { + if (code == DataType.ACTIONDEFINITION) + return "ActionDefinition"; if (code == DataType.ADDRESS) return "Address"; if (code == DataType.AGE) @@ -1656,6 +1816,8 @@ public class Enumerations { return "ContactPoint"; if (code == DataType.COUNT) return "Count"; + if (code == DataType.DATAREQUIREMENT) + return "DataRequirement"; if (code == DataType.DISTANCE) return "Distance"; if (code == DataType.DURATION) @@ -1672,10 +1834,14 @@ public class Enumerations { return "Identifier"; if (code == DataType.META) return "Meta"; + if (code == DataType.MODULEMETADATA) + return "ModuleMetadata"; if (code == DataType.MONEY) return "Money"; if (code == DataType.NARRATIVE) return "Narrative"; + if (code == DataType.PARAMETERDEFINITION) + return "ParameterDefinition"; if (code == DataType.PERIOD) return "Period"; if (code == DataType.QUANTITY) @@ -1694,6 +1860,8 @@ public class Enumerations { return "SimpleQuantity"; if (code == DataType.TIMING) return "Timing"; + if (code == DataType.TRIGGERDEFINITION) + return "TriggerDefinition"; if (code == DataType.BASE64BINARY) return "base64Binary"; if (code == DataType.BOOLEAN) @@ -1840,9 +2008,13 @@ public class Enumerations { } } - public enum FHIRDefinedType { + public enum FHIRAllTypes { /** - * There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world. + * The definition of an action to be performed. Some aspects of the definition are specified statically, and some aspects can be specified dynamically by referencing logic defined in a library. + */ + ACTIONDEFINITION, + /** + * An address expressed using postal conventions (as opposed to GPS or other location definition formats). This data type may be used to convey addresses for use in delivering mail as well as for visiting locations and which might not be valid for mail delivery. There are a variety of postal address formats defined around the world. */ ADDRESS, /** @@ -1877,6 +2049,10 @@ public class Enumerations { * null */ COUNT, + /** + * Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data. + */ + DATAREQUIREMENT, /** * null */ @@ -1909,6 +2085,10 @@ public class Enumerations { * The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource. */ META, + /** + * The ModuleMetadata structure defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information. + */ + MODULEMETADATA, /** * null */ @@ -1917,6 +2097,10 @@ public class Enumerations { * A human-readable formatted text, including images. */ NARRATIVE, + /** + * The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse. + */ + PARAMETERDEFINITION, /** * A time period defined by a start and end date and optionally time. */ @@ -1953,6 +2137,10 @@ public class Enumerations { * Specifies an event that may occur multiple times. Timing schedules are used to record when things are expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds. */ TIMING, + /** + * A description of a triggering event. + */ + TRIGGERDEFINITION, /** * A stream of bytes */ @@ -2065,6 +2253,10 @@ public class Enumerations { * Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions. */ CAREPLAN, + /** + * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient. + */ + CARETEAM, /** * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery. */ @@ -2078,7 +2270,7 @@ public class Enumerations { */ CLINICALIMPRESSION, /** - * A code system specifies a set of codes drawn from one or more code systems. + * A code system resource specifies a set of codes drawn from one or more code systems. */ CODESYSTEM, /** @@ -2089,6 +2281,10 @@ public class Enumerations { * A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition. */ COMMUNICATIONREQUEST, + /** + * A compartment definition that defines how resources are accessed on a server. + */ + COMPARTMENTDEFINITION, /** * A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained. */ @@ -2118,11 +2314,11 @@ public class Enumerations { */ DATAELEMENT, /** - * This resource defines a decision support rule of the form [on Event] if Condition then Action. + * This resource defines a decision support rule of the form [on Event] if Condition then Action. It is intended to be a shareable, computable definition of a actions that should be taken whenever some condition is met in response to a particular event or events. */ DECISIONSUPPORTRULE, /** - * The DecisionSupportServiceModule resource describes decision support functionality that is available as a service. + * The DecisionSupportServiceModule describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking. */ DECISIONSUPPORTSERVICEMODULE, /** @@ -2130,7 +2326,7 @@ public class Enumerations { */ DETECTEDISSUE, /** - * This resource identifies an instance of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc. + * This resource identifies an instance or a type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc. */ DEVICE, /** @@ -2218,13 +2414,17 @@ public class Enumerations { */ GROUP, /** - * A guidance response is the formal response to a previous guidance request. It is a derivative of the knowledge response that provides additional information relevant specifically to clinical decision support such as a description of any proposed actions to be taken. + * A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken. */ GUIDANCERESPONSE, /** * The details of a healthcare service available at a location. */ HEALTHCARESERVICE, + /** + * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingExcerpt resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on. + */ + IMAGINGEXCERPT, /** * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on. */ @@ -2265,6 +2465,10 @@ public class Enumerations { * The Measure resource provides the definition of a quality measure. */ MEASURE, + /** + * The MeasureReport resource contains the results of evaluating a measure. + */ + MEASUREREPORT, /** * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference. */ @@ -2297,10 +2501,6 @@ public class Enumerations { * The ModuleDefinition resource defines the data requirements for a quality artifact. */ MODULEDEFINITION, - /** - * The ModuleMetadata resource defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information. - */ - MODULEMETADATA, /** * A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a "System" used within the Identifier and Coding data types. */ @@ -2361,6 +2561,10 @@ public class Enumerations { * A person who is directly or indirectly involved in the provisioning of healthcare. */ PRACTITIONER, + /** + * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time. + */ + PRACTITIONERROLE, /** * An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy. */ @@ -2433,6 +2637,10 @@ public class Enumerations { * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions, and constraints on resources and data types. */ STRUCTUREDEFINITION, + /** + * A Map of relationships between 2 structures that can be used to transform data. + */ + STRUCTUREMAP, /** * The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system is able to take an appropriate action. */ @@ -2449,6 +2657,10 @@ public class Enumerations { * A record of a request for a medication, substance or device used in the healthcare setting. */ SUPPLYREQUEST, + /** + * A task to be performed. + */ + TASK, /** * TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification. */ @@ -2461,13 +2673,23 @@ public class Enumerations { * An authorization for the supply of glasses and/or contact lenses to a patient. */ VISIONPRESCRIPTION, + /** + * A place holder that means any kind of data type + */ + TYPE, + /** + * A place holder that means any kind of resource + */ + ANY, /** * added to help the parsers */ NULL; - public static FHIRDefinedType fromCode(String codeString) throws FHIRException { + public static FHIRAllTypes fromCode(String codeString) throws FHIRException { if (codeString == null || "".equals(codeString)) return null; + if ("ActionDefinition".equals(codeString)) + return ACTIONDEFINITION; if ("Address".equals(codeString)) return ADDRESS; if ("Age".equals(codeString)) @@ -2486,6 +2708,8 @@ public class Enumerations { return CONTACTPOINT; if ("Count".equals(codeString)) return COUNT; + if ("DataRequirement".equals(codeString)) + return DATAREQUIREMENT; if ("Distance".equals(codeString)) return DISTANCE; if ("Duration".equals(codeString)) @@ -2502,10 +2726,14 @@ public class Enumerations { return IDENTIFIER; if ("Meta".equals(codeString)) return META; + if ("ModuleMetadata".equals(codeString)) + return MODULEMETADATA; if ("Money".equals(codeString)) return MONEY; if ("Narrative".equals(codeString)) return NARRATIVE; + if ("ParameterDefinition".equals(codeString)) + return PARAMETERDEFINITION; if ("Period".equals(codeString)) return PERIOD; if ("Quantity".equals(codeString)) @@ -2524,6 +2752,8 @@ public class Enumerations { return SIMPLEQUANTITY; if ("Timing".equals(codeString)) return TIMING; + if ("TriggerDefinition".equals(codeString)) + return TRIGGERDEFINITION; if ("base64Binary".equals(codeString)) return BASE64BINARY; if ("boolean".equals(codeString)) @@ -2580,6 +2810,8 @@ public class Enumerations { return BUNDLE; if ("CarePlan".equals(codeString)) return CAREPLAN; + if ("CareTeam".equals(codeString)) + return CARETEAM; if ("Claim".equals(codeString)) return CLAIM; if ("ClaimResponse".equals(codeString)) @@ -2592,6 +2824,8 @@ public class Enumerations { return COMMUNICATION; if ("CommunicationRequest".equals(codeString)) return COMMUNICATIONREQUEST; + if ("CompartmentDefinition".equals(codeString)) + return COMPARTMENTDEFINITION; if ("Composition".equals(codeString)) return COMPOSITION; if ("ConceptMap".equals(codeString)) @@ -2660,6 +2894,8 @@ public class Enumerations { return GUIDANCERESPONSE; if ("HealthcareService".equals(codeString)) return HEALTHCARESERVICE; + if ("ImagingExcerpt".equals(codeString)) + return IMAGINGEXCERPT; if ("ImagingObjectSelection".equals(codeString)) return IMAGINGOBJECTSELECTION; if ("ImagingStudy".equals(codeString)) @@ -2680,6 +2916,8 @@ public class Enumerations { return LOCATION; if ("Measure".equals(codeString)) return MEASURE; + if ("MeasureReport".equals(codeString)) + return MEASUREREPORT; if ("Media".equals(codeString)) return MEDIA; if ("Medication".equals(codeString)) @@ -2696,8 +2934,6 @@ public class Enumerations { return MESSAGEHEADER; if ("ModuleDefinition".equals(codeString)) return MODULEDEFINITION; - if ("ModuleMetadata".equals(codeString)) - return MODULEMETADATA; if ("NamingSystem".equals(codeString)) return NAMINGSYSTEM; if ("NutritionOrder".equals(codeString)) @@ -2728,6 +2964,8 @@ public class Enumerations { return PERSON; if ("Practitioner".equals(codeString)) return PRACTITIONER; + if ("PractitionerRole".equals(codeString)) + return PRACTITIONERROLE; if ("Procedure".equals(codeString)) return PROCEDURE; if ("ProcedureRequest".equals(codeString)) @@ -2764,6 +3002,8 @@ public class Enumerations { return SPECIMEN; if ("StructureDefinition".equals(codeString)) return STRUCTUREDEFINITION; + if ("StructureMap".equals(codeString)) + return STRUCTUREMAP; if ("Subscription".equals(codeString)) return SUBSCRIPTION; if ("Substance".equals(codeString)) @@ -2772,16 +3012,23 @@ public class Enumerations { return SUPPLYDELIVERY; if ("SupplyRequest".equals(codeString)) return SUPPLYREQUEST; + if ("Task".equals(codeString)) + return TASK; if ("TestScript".equals(codeString)) return TESTSCRIPT; if ("ValueSet".equals(codeString)) return VALUESET; if ("VisionPrescription".equals(codeString)) return VISIONPRESCRIPTION; - throw new FHIRException("Unknown FHIRDefinedType code '"+codeString+"'"); + if ("Type".equals(codeString)) + return TYPE; + if ("Any".equals(codeString)) + return ANY; + throw new FHIRException("Unknown FHIRAllTypes code '"+codeString+"'"); } public String toCode() { switch (this) { + case ACTIONDEFINITION: return "ActionDefinition"; case ADDRESS: return "Address"; case AGE: return "Age"; case ANNOTATION: return "Annotation"; @@ -2791,6 +3038,7 @@ public class Enumerations { case CODING: return "Coding"; case CONTACTPOINT: return "ContactPoint"; case COUNT: return "Count"; + case DATAREQUIREMENT: return "DataRequirement"; case DISTANCE: return "Distance"; case DURATION: return "Duration"; case ELEMENT: return "Element"; @@ -2799,8 +3047,10 @@ public class Enumerations { case HUMANNAME: return "HumanName"; case IDENTIFIER: return "Identifier"; case META: return "Meta"; + case MODULEMETADATA: return "ModuleMetadata"; case MONEY: return "Money"; case NARRATIVE: return "Narrative"; + case PARAMETERDEFINITION: return "ParameterDefinition"; case PERIOD: return "Period"; case QUANTITY: return "Quantity"; case RANGE: return "Range"; @@ -2810,6 +3060,7 @@ public class Enumerations { case SIGNATURE: return "Signature"; case SIMPLEQUANTITY: return "SimpleQuantity"; case TIMING: return "Timing"; + case TRIGGERDEFINITION: return "TriggerDefinition"; case BASE64BINARY: return "base64Binary"; case BOOLEAN: return "boolean"; case CODE: return "code"; @@ -2838,12 +3089,14 @@ public class Enumerations { case BODYSITE: return "BodySite"; case BUNDLE: return "Bundle"; case CAREPLAN: return "CarePlan"; + case CARETEAM: return "CareTeam"; case CLAIM: return "Claim"; case CLAIMRESPONSE: return "ClaimResponse"; case CLINICALIMPRESSION: return "ClinicalImpression"; case CODESYSTEM: return "CodeSystem"; case COMMUNICATION: return "Communication"; case COMMUNICATIONREQUEST: return "CommunicationRequest"; + case COMPARTMENTDEFINITION: return "CompartmentDefinition"; case COMPOSITION: return "Composition"; case CONCEPTMAP: return "ConceptMap"; case CONDITION: return "Condition"; @@ -2878,6 +3131,7 @@ public class Enumerations { case GROUP: return "Group"; case GUIDANCERESPONSE: return "GuidanceResponse"; case HEALTHCARESERVICE: return "HealthcareService"; + case IMAGINGEXCERPT: return "ImagingExcerpt"; case IMAGINGOBJECTSELECTION: return "ImagingObjectSelection"; case IMAGINGSTUDY: return "ImagingStudy"; case IMMUNIZATION: return "Immunization"; @@ -2888,6 +3142,7 @@ public class Enumerations { case LIST: return "List"; case LOCATION: return "Location"; case MEASURE: return "Measure"; + case MEASUREREPORT: return "MeasureReport"; case MEDIA: return "Media"; case MEDICATION: return "Medication"; case MEDICATIONADMINISTRATION: return "MedicationAdministration"; @@ -2896,7 +3151,6 @@ public class Enumerations { case MEDICATIONSTATEMENT: return "MedicationStatement"; case MESSAGEHEADER: return "MessageHeader"; case MODULEDEFINITION: return "ModuleDefinition"; - case MODULEMETADATA: return "ModuleMetadata"; case NAMINGSYSTEM: return "NamingSystem"; case NUTRITIONORDER: return "NutritionOrder"; case OBSERVATION: return "Observation"; @@ -2912,6 +3166,7 @@ public class Enumerations { case PAYMENTRECONCILIATION: return "PaymentReconciliation"; case PERSON: return "Person"; case PRACTITIONER: return "Practitioner"; + case PRACTITIONERROLE: return "PractitionerRole"; case PROCEDURE: return "Procedure"; case PROCEDUREREQUEST: return "ProcedureRequest"; case PROCESSREQUEST: return "ProcessRequest"; @@ -2930,18 +3185,23 @@ public class Enumerations { case SLOT: return "Slot"; case SPECIMEN: return "Specimen"; case STRUCTUREDEFINITION: return "StructureDefinition"; + case STRUCTUREMAP: return "StructureMap"; case SUBSCRIPTION: return "Subscription"; case SUBSTANCE: return "Substance"; case SUPPLYDELIVERY: return "SupplyDelivery"; case SUPPLYREQUEST: return "SupplyRequest"; + case TASK: return "Task"; case TESTSCRIPT: return "TestScript"; case VALUESET: return "ValueSet"; case VISIONPRESCRIPTION: return "VisionPrescription"; + case TYPE: return "Type"; + case ANY: return "Any"; default: return "?"; } } public String getSystem() { switch (this) { + case ACTIONDEFINITION: return "http://hl7.org/fhir/data-types"; case ADDRESS: return "http://hl7.org/fhir/data-types"; case AGE: return "http://hl7.org/fhir/data-types"; case ANNOTATION: return "http://hl7.org/fhir/data-types"; @@ -2951,6 +3211,7 @@ public class Enumerations { case CODING: return "http://hl7.org/fhir/data-types"; case CONTACTPOINT: return "http://hl7.org/fhir/data-types"; case COUNT: return "http://hl7.org/fhir/data-types"; + case DATAREQUIREMENT: return "http://hl7.org/fhir/data-types"; case DISTANCE: return "http://hl7.org/fhir/data-types"; case DURATION: return "http://hl7.org/fhir/data-types"; case ELEMENT: return "http://hl7.org/fhir/data-types"; @@ -2959,8 +3220,10 @@ public class Enumerations { case HUMANNAME: return "http://hl7.org/fhir/data-types"; case IDENTIFIER: return "http://hl7.org/fhir/data-types"; case META: return "http://hl7.org/fhir/data-types"; + case MODULEMETADATA: return "http://hl7.org/fhir/data-types"; case MONEY: return "http://hl7.org/fhir/data-types"; case NARRATIVE: return "http://hl7.org/fhir/data-types"; + case PARAMETERDEFINITION: return "http://hl7.org/fhir/data-types"; case PERIOD: return "http://hl7.org/fhir/data-types"; case QUANTITY: return "http://hl7.org/fhir/data-types"; case RANGE: return "http://hl7.org/fhir/data-types"; @@ -2970,6 +3233,7 @@ public class Enumerations { case SIGNATURE: return "http://hl7.org/fhir/data-types"; case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types"; case TIMING: return "http://hl7.org/fhir/data-types"; + case TRIGGERDEFINITION: return "http://hl7.org/fhir/data-types"; case BASE64BINARY: return "http://hl7.org/fhir/data-types"; case BOOLEAN: return "http://hl7.org/fhir/data-types"; case CODE: return "http://hl7.org/fhir/data-types"; @@ -2998,12 +3262,14 @@ public class Enumerations { case BODYSITE: return "http://hl7.org/fhir/resource-types"; case BUNDLE: return "http://hl7.org/fhir/resource-types"; case CAREPLAN: return "http://hl7.org/fhir/resource-types"; + case CARETEAM: return "http://hl7.org/fhir/resource-types"; case CLAIM: return "http://hl7.org/fhir/resource-types"; case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types"; case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types"; case CODESYSTEM: return "http://hl7.org/fhir/resource-types"; case COMMUNICATION: return "http://hl7.org/fhir/resource-types"; case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types"; + case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types"; case COMPOSITION: return "http://hl7.org/fhir/resource-types"; case CONCEPTMAP: return "http://hl7.org/fhir/resource-types"; case CONDITION: return "http://hl7.org/fhir/resource-types"; @@ -3038,6 +3304,7 @@ public class Enumerations { case GROUP: return "http://hl7.org/fhir/resource-types"; case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types"; case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types"; + case IMAGINGEXCERPT: return "http://hl7.org/fhir/resource-types"; case IMAGINGOBJECTSELECTION: return "http://hl7.org/fhir/resource-types"; case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types"; case IMMUNIZATION: return "http://hl7.org/fhir/resource-types"; @@ -3048,6 +3315,7 @@ public class Enumerations { case LIST: return "http://hl7.org/fhir/resource-types"; case LOCATION: return "http://hl7.org/fhir/resource-types"; case MEASURE: return "http://hl7.org/fhir/resource-types"; + case MEASUREREPORT: return "http://hl7.org/fhir/resource-types"; case MEDIA: return "http://hl7.org/fhir/resource-types"; case MEDICATION: return "http://hl7.org/fhir/resource-types"; case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types"; @@ -3056,7 +3324,6 @@ public class Enumerations { case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types"; case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types"; case MODULEDEFINITION: return "http://hl7.org/fhir/resource-types"; - case MODULEMETADATA: return "http://hl7.org/fhir/resource-types"; case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types"; case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types"; case OBSERVATION: return "http://hl7.org/fhir/resource-types"; @@ -3072,6 +3339,7 @@ public class Enumerations { case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types"; case PERSON: return "http://hl7.org/fhir/resource-types"; case PRACTITIONER: return "http://hl7.org/fhir/resource-types"; + case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types"; case PROCEDURE: return "http://hl7.org/fhir/resource-types"; case PROCEDUREREQUEST: return "http://hl7.org/fhir/resource-types"; case PROCESSREQUEST: return "http://hl7.org/fhir/resource-types"; @@ -3090,19 +3358,24 @@ public class Enumerations { case SLOT: return "http://hl7.org/fhir/resource-types"; case SPECIMEN: return "http://hl7.org/fhir/resource-types"; case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types"; + case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types"; case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types"; case SUBSTANCE: return "http://hl7.org/fhir/resource-types"; case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types"; case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types"; + case TASK: return "http://hl7.org/fhir/resource-types"; case TESTSCRIPT: return "http://hl7.org/fhir/resource-types"; case VALUESET: return "http://hl7.org/fhir/resource-types"; case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types"; + case TYPE: return "http://hl7.org/fhir/abstract-types"; + case ANY: return "http://hl7.org/fhir/abstract-types"; default: return "?"; } } public String getDefinition() { switch (this) { - case ADDRESS: return "There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world."; + case ACTIONDEFINITION: return "The definition of an action to be performed. Some aspects of the definition are specified statically, and some aspects can be specified dynamically by referencing logic defined in a library."; + case ADDRESS: return "An address expressed using postal conventions (as opposed to GPS or other location definition formats). This data type may be used to convey addresses for use in delivering mail as well as for visiting locations and which might not be valid for mail delivery. There are a variety of postal address formats defined around the world."; case AGE: return ""; case ANNOTATION: return "A text note which also contains information about who made the statement and when."; case ATTACHMENT: return "For referring to data content defined in other formats."; @@ -3111,6 +3384,7 @@ public class Enumerations { case CODING: return "A reference to a code defined by a terminology system."; case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc."; case COUNT: return ""; + case DATAREQUIREMENT: return "Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data."; case DISTANCE: return ""; case DURATION: return ""; case ELEMENT: return "Base definition for all elements in a resource."; @@ -3119,8 +3393,10 @@ public class Enumerations { case HUMANNAME: return "A human's name with the ability to identify parts and usage."; case IDENTIFIER: return "A technical identifier - identifies some entity uniquely and unambiguously."; case META: return "The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource."; + case MODULEMETADATA: return "The ModuleMetadata structure defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information."; case MONEY: return ""; case NARRATIVE: return "A human-readable formatted text, including images."; + case PARAMETERDEFINITION: return "The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse."; case PERIOD: return "A time period defined by a start and end date and optionally time."; case QUANTITY: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies."; case RANGE: return "A set of ordered Quantities defined by a low and high limit."; @@ -3130,6 +3406,7 @@ public class Enumerations { case SIGNATURE: return "A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities."; case SIMPLEQUANTITY: return ""; case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds."; + case TRIGGERDEFINITION: return "A description of a triggering event."; case BASE64BINARY: return "A stream of bytes"; case BOOLEAN: return "Value of \"true\" or \"false\""; case CODE: return "A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents"; @@ -3158,12 +3435,14 @@ public class Enumerations { case BODYSITE: return "Record details about the anatomical location of a specimen or body part. This resource may be used when a coded concept does not provide the necessary detail needed for the use case."; case BUNDLE: return "A container for a collection of resources."; case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions."; + case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient."; case CLAIM: return "A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery."; case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource."; case CLINICALIMPRESSION: return "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score."; - case CODESYSTEM: return "A code system specifies a set of codes drawn from one or more code systems."; + case CODESYSTEM: return "A code system resource specifies a set of codes drawn from one or more code systems."; case COMMUNICATION: return "An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition."; case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition."; + case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server."; case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained."; case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models."; case CONDITION: return "Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a diagnosis during an encounter; populating a problem list or a summary statement, such as a discharge summary."; @@ -3171,10 +3450,10 @@ public class Enumerations { case CONTRACT: return "A formal agreement between parties regarding the conduct of business, exchange of information or other matters."; case COVERAGE: return "Financial instrument which may be used to pay for or reimburse health care products and services."; case DATAELEMENT: return "The formal description of a single piece of information that can be gathered and reported."; - case DECISIONSUPPORTRULE: return "This resource defines a decision support rule of the form [on Event] if Condition then Action."; - case DECISIONSUPPORTSERVICEMODULE: return "The DecisionSupportServiceModule resource describes decision support functionality that is available as a service."; + case DECISIONSUPPORTRULE: return "This resource defines a decision support rule of the form [on Event] if Condition then Action. It is intended to be a shareable, computable definition of a actions that should be taken whenever some condition is met in response to a particular event or events."; + case DECISIONSUPPORTSERVICEMODULE: return "The DecisionSupportServiceModule describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking."; case DETECTEDISSUE: return "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc."; - case DEVICE: return "This resource identifies an instance of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc."; + case DEVICE: return "This resource identifies an instance or a type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc."; case DEVICECOMPONENT: return "Describes the characteristics, operational status and capabilities of a medical-related component of a medical device."; case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device."; case DEVICEUSEREQUEST: return "Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker."; @@ -3196,8 +3475,9 @@ public class Enumerations { case FLAG: return "Prospective warnings of potential issues when providing care to the patient."; case GOAL: return "Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc."; case GROUP: return "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization."; - case GUIDANCERESPONSE: return "A guidance response is the formal response to a previous guidance request. It is a derivative of the knowledge response that provides additional information relevant specifically to clinical decision support such as a description of any proposed actions to be taken."; + case GUIDANCERESPONSE: return "A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken."; case HEALTHCARESERVICE: return "The details of a healthcare service available at a location."; + case IMAGINGEXCERPT: return "A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingExcerpt resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance (\"cine\" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on."; case IMAGINGOBJECTSELECTION: return "A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance (\"cine\" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on."; case IMAGINGSTUDY: return "Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities."; case IMMUNIZATION: return "Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed."; @@ -3208,6 +3488,7 @@ public class Enumerations { case LIST: return "A set of information summarized from a list of other resources."; case LOCATION: return "Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated."; case MEASURE: return "The Measure resource provides the definition of a quality measure."; + case MEASUREREPORT: return "The MeasureReport resource contains the results of evaluating a measure."; case MEDIA: return "A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference."; case MEDICATION: return "This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication."; case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner."; @@ -3216,7 +3497,6 @@ public class Enumerations { case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from e.g. the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains \r\rThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information."; case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle."; case MODULEDEFINITION: return "The ModuleDefinition resource defines the data requirements for a quality artifact."; - case MODULEMETADATA: return "The ModuleMetadata resource defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information."; case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a \"System\" used within the Identifier and Coding data types."; case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident."; case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject."; @@ -3232,6 +3512,7 @@ public class Enumerations { case PAYMENTRECONCILIATION: return "This resource provides payment details and claim references supporting a bulk payment."; case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context."; case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare."; + case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time."; case PROCEDURE: return "An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy."; case PROCEDUREREQUEST: return "A request for a procedure to be performed. May be a proposal or an order."; case PROCESSREQUEST: return "This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources."; @@ -3250,18 +3531,23 @@ public class Enumerations { case SLOT: return "A slot of time on a schedule that may be available for booking appointments."; case SPECIMEN: return "A sample to be used for analysis."; case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions, and constraints on resources and data types."; + case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data."; case SUBSCRIPTION: return "The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system is able to take an appropriate action."; case SUBSTANCE: return "A homogeneous material with a definite composition."; case SUPPLYDELIVERY: return "Record of delivery of what is supplied."; case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting."; + case TASK: return "A task to be performed."; case TESTSCRIPT: return "TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification."; case VALUESET: return "A value set specifies a set of codes drawn from one or more code systems."; case VISIONPRESCRIPTION: return "An authorization for the supply of glasses and/or contact lenses to a patient."; + case TYPE: return "A place holder that means any kind of data type"; + case ANY: return "A place holder that means any kind of resource"; default: return "?"; } } public String getDisplay() { switch (this) { + case ACTIONDEFINITION: return "ActionDefinition"; case ADDRESS: return "Address"; case AGE: return "Age"; case ANNOTATION: return "Annotation"; @@ -3271,6 +3557,7 @@ public class Enumerations { case CODING: return "Coding"; case CONTACTPOINT: return "ContactPoint"; case COUNT: return "Count"; + case DATAREQUIREMENT: return "DataRequirement"; case DISTANCE: return "Distance"; case DURATION: return "Duration"; case ELEMENT: return "Element"; @@ -3279,8 +3566,10 @@ public class Enumerations { case HUMANNAME: return "HumanName"; case IDENTIFIER: return "Identifier"; case META: return "Meta"; + case MODULEMETADATA: return "ModuleMetadata"; case MONEY: return "Money"; case NARRATIVE: return "Narrative"; + case PARAMETERDEFINITION: return "ParameterDefinition"; case PERIOD: return "Period"; case QUANTITY: return "Quantity"; case RANGE: return "Range"; @@ -3290,6 +3579,7 @@ public class Enumerations { case SIGNATURE: return "Signature"; case SIMPLEQUANTITY: return "SimpleQuantity"; case TIMING: return "Timing"; + case TRIGGERDEFINITION: return "TriggerDefinition"; case BASE64BINARY: return "base64Binary"; case BOOLEAN: return "boolean"; case CODE: return "code"; @@ -3318,12 +3608,14 @@ public class Enumerations { case BODYSITE: return "BodySite"; case BUNDLE: return "Bundle"; case CAREPLAN: return "CarePlan"; + case CARETEAM: return "CareTeam"; case CLAIM: return "Claim"; case CLAIMRESPONSE: return "ClaimResponse"; case CLINICALIMPRESSION: return "ClinicalImpression"; case CODESYSTEM: return "CodeSystem"; case COMMUNICATION: return "Communication"; case COMMUNICATIONREQUEST: return "CommunicationRequest"; + case COMPARTMENTDEFINITION: return "CompartmentDefinition"; case COMPOSITION: return "Composition"; case CONCEPTMAP: return "ConceptMap"; case CONDITION: return "Condition"; @@ -3358,6 +3650,7 @@ public class Enumerations { case GROUP: return "Group"; case GUIDANCERESPONSE: return "GuidanceResponse"; case HEALTHCARESERVICE: return "HealthcareService"; + case IMAGINGEXCERPT: return "ImagingExcerpt"; case IMAGINGOBJECTSELECTION: return "ImagingObjectSelection"; case IMAGINGSTUDY: return "ImagingStudy"; case IMMUNIZATION: return "Immunization"; @@ -3368,6 +3661,7 @@ public class Enumerations { case LIST: return "List"; case LOCATION: return "Location"; case MEASURE: return "Measure"; + case MEASUREREPORT: return "MeasureReport"; case MEDIA: return "Media"; case MEDICATION: return "Medication"; case MEDICATIONADMINISTRATION: return "MedicationAdministration"; @@ -3376,7 +3670,6 @@ public class Enumerations { case MEDICATIONSTATEMENT: return "MedicationStatement"; case MESSAGEHEADER: return "MessageHeader"; case MODULEDEFINITION: return "ModuleDefinition"; - case MODULEMETADATA: return "ModuleMetadata"; case NAMINGSYSTEM: return "NamingSystem"; case NUTRITIONORDER: return "NutritionOrder"; case OBSERVATION: return "Observation"; @@ -3392,6 +3685,7 @@ public class Enumerations { case PAYMENTRECONCILIATION: return "PaymentReconciliation"; case PERSON: return "Person"; case PRACTITIONER: return "Practitioner"; + case PRACTITIONERROLE: return "PractitionerRole"; case PROCEDURE: return "Procedure"; case PROCEDUREREQUEST: return "ProcedureRequest"; case PROCESSREQUEST: return "ProcessRequest"; @@ -3410,10 +3704,2737 @@ public class Enumerations { case SLOT: return "Slot"; case SPECIMEN: return "Specimen"; case STRUCTUREDEFINITION: return "StructureDefinition"; + case STRUCTUREMAP: return "StructureMap"; case SUBSCRIPTION: return "Subscription"; case SUBSTANCE: return "Substance"; case SUPPLYDELIVERY: return "SupplyDelivery"; case SUPPLYREQUEST: return "SupplyRequest"; + case TASK: return "Task"; + case TESTSCRIPT: return "TestScript"; + case VALUESET: return "ValueSet"; + case VISIONPRESCRIPTION: return "VisionPrescription"; + case TYPE: return "Type"; + case ANY: return "Any"; + default: return "?"; + } + } + } + + public static class FHIRAllTypesEnumFactory implements EnumFactory { + public FHIRAllTypes fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("ActionDefinition".equals(codeString)) + return FHIRAllTypes.ACTIONDEFINITION; + if ("Address".equals(codeString)) + return FHIRAllTypes.ADDRESS; + if ("Age".equals(codeString)) + return FHIRAllTypes.AGE; + if ("Annotation".equals(codeString)) + return FHIRAllTypes.ANNOTATION; + if ("Attachment".equals(codeString)) + return FHIRAllTypes.ATTACHMENT; + if ("BackboneElement".equals(codeString)) + return FHIRAllTypes.BACKBONEELEMENT; + if ("CodeableConcept".equals(codeString)) + return FHIRAllTypes.CODEABLECONCEPT; + if ("Coding".equals(codeString)) + return FHIRAllTypes.CODING; + if ("ContactPoint".equals(codeString)) + return FHIRAllTypes.CONTACTPOINT; + if ("Count".equals(codeString)) + return FHIRAllTypes.COUNT; + if ("DataRequirement".equals(codeString)) + return FHIRAllTypes.DATAREQUIREMENT; + if ("Distance".equals(codeString)) + return FHIRAllTypes.DISTANCE; + if ("Duration".equals(codeString)) + return FHIRAllTypes.DURATION; + if ("Element".equals(codeString)) + return FHIRAllTypes.ELEMENT; + if ("ElementDefinition".equals(codeString)) + return FHIRAllTypes.ELEMENTDEFINITION; + if ("Extension".equals(codeString)) + return FHIRAllTypes.EXTENSION; + if ("HumanName".equals(codeString)) + return FHIRAllTypes.HUMANNAME; + if ("Identifier".equals(codeString)) + return FHIRAllTypes.IDENTIFIER; + if ("Meta".equals(codeString)) + return FHIRAllTypes.META; + if ("ModuleMetadata".equals(codeString)) + return FHIRAllTypes.MODULEMETADATA; + if ("Money".equals(codeString)) + return FHIRAllTypes.MONEY; + if ("Narrative".equals(codeString)) + return FHIRAllTypes.NARRATIVE; + if ("ParameterDefinition".equals(codeString)) + return FHIRAllTypes.PARAMETERDEFINITION; + if ("Period".equals(codeString)) + return FHIRAllTypes.PERIOD; + if ("Quantity".equals(codeString)) + return FHIRAllTypes.QUANTITY; + if ("Range".equals(codeString)) + return FHIRAllTypes.RANGE; + if ("Ratio".equals(codeString)) + return FHIRAllTypes.RATIO; + if ("Reference".equals(codeString)) + return FHIRAllTypes.REFERENCE; + if ("SampledData".equals(codeString)) + return FHIRAllTypes.SAMPLEDDATA; + if ("Signature".equals(codeString)) + return FHIRAllTypes.SIGNATURE; + if ("SimpleQuantity".equals(codeString)) + return FHIRAllTypes.SIMPLEQUANTITY; + if ("Timing".equals(codeString)) + return FHIRAllTypes.TIMING; + if ("TriggerDefinition".equals(codeString)) + return FHIRAllTypes.TRIGGERDEFINITION; + if ("base64Binary".equals(codeString)) + return FHIRAllTypes.BASE64BINARY; + if ("boolean".equals(codeString)) + return FHIRAllTypes.BOOLEAN; + if ("code".equals(codeString)) + return FHIRAllTypes.CODE; + if ("date".equals(codeString)) + return FHIRAllTypes.DATE; + if ("dateTime".equals(codeString)) + return FHIRAllTypes.DATETIME; + if ("decimal".equals(codeString)) + return FHIRAllTypes.DECIMAL; + if ("id".equals(codeString)) + return FHIRAllTypes.ID; + if ("instant".equals(codeString)) + return FHIRAllTypes.INSTANT; + if ("integer".equals(codeString)) + return FHIRAllTypes.INTEGER; + if ("markdown".equals(codeString)) + return FHIRAllTypes.MARKDOWN; + if ("oid".equals(codeString)) + return FHIRAllTypes.OID; + if ("positiveInt".equals(codeString)) + return FHIRAllTypes.POSITIVEINT; + if ("string".equals(codeString)) + return FHIRAllTypes.STRING; + if ("time".equals(codeString)) + return FHIRAllTypes.TIME; + if ("unsignedInt".equals(codeString)) + return FHIRAllTypes.UNSIGNEDINT; + if ("uri".equals(codeString)) + return FHIRAllTypes.URI; + if ("uuid".equals(codeString)) + return FHIRAllTypes.UUID; + if ("xhtml".equals(codeString)) + return FHIRAllTypes.XHTML; + if ("Account".equals(codeString)) + return FHIRAllTypes.ACCOUNT; + if ("AllergyIntolerance".equals(codeString)) + return FHIRAllTypes.ALLERGYINTOLERANCE; + if ("Appointment".equals(codeString)) + return FHIRAllTypes.APPOINTMENT; + if ("AppointmentResponse".equals(codeString)) + return FHIRAllTypes.APPOINTMENTRESPONSE; + if ("AuditEvent".equals(codeString)) + return FHIRAllTypes.AUDITEVENT; + if ("Basic".equals(codeString)) + return FHIRAllTypes.BASIC; + if ("Binary".equals(codeString)) + return FHIRAllTypes.BINARY; + if ("BodySite".equals(codeString)) + return FHIRAllTypes.BODYSITE; + if ("Bundle".equals(codeString)) + return FHIRAllTypes.BUNDLE; + if ("CarePlan".equals(codeString)) + return FHIRAllTypes.CAREPLAN; + if ("CareTeam".equals(codeString)) + return FHIRAllTypes.CARETEAM; + if ("Claim".equals(codeString)) + return FHIRAllTypes.CLAIM; + if ("ClaimResponse".equals(codeString)) + return FHIRAllTypes.CLAIMRESPONSE; + if ("ClinicalImpression".equals(codeString)) + return FHIRAllTypes.CLINICALIMPRESSION; + if ("CodeSystem".equals(codeString)) + return FHIRAllTypes.CODESYSTEM; + if ("Communication".equals(codeString)) + return FHIRAllTypes.COMMUNICATION; + if ("CommunicationRequest".equals(codeString)) + return FHIRAllTypes.COMMUNICATIONREQUEST; + if ("CompartmentDefinition".equals(codeString)) + return FHIRAllTypes.COMPARTMENTDEFINITION; + if ("Composition".equals(codeString)) + return FHIRAllTypes.COMPOSITION; + if ("ConceptMap".equals(codeString)) + return FHIRAllTypes.CONCEPTMAP; + if ("Condition".equals(codeString)) + return FHIRAllTypes.CONDITION; + if ("Conformance".equals(codeString)) + return FHIRAllTypes.CONFORMANCE; + if ("Contract".equals(codeString)) + return FHIRAllTypes.CONTRACT; + if ("Coverage".equals(codeString)) + return FHIRAllTypes.COVERAGE; + if ("DataElement".equals(codeString)) + return FHIRAllTypes.DATAELEMENT; + if ("DecisionSupportRule".equals(codeString)) + return FHIRAllTypes.DECISIONSUPPORTRULE; + if ("DecisionSupportServiceModule".equals(codeString)) + return FHIRAllTypes.DECISIONSUPPORTSERVICEMODULE; + if ("DetectedIssue".equals(codeString)) + return FHIRAllTypes.DETECTEDISSUE; + if ("Device".equals(codeString)) + return FHIRAllTypes.DEVICE; + if ("DeviceComponent".equals(codeString)) + return FHIRAllTypes.DEVICECOMPONENT; + if ("DeviceMetric".equals(codeString)) + return FHIRAllTypes.DEVICEMETRIC; + if ("DeviceUseRequest".equals(codeString)) + return FHIRAllTypes.DEVICEUSEREQUEST; + if ("DeviceUseStatement".equals(codeString)) + return FHIRAllTypes.DEVICEUSESTATEMENT; + if ("DiagnosticOrder".equals(codeString)) + return FHIRAllTypes.DIAGNOSTICORDER; + if ("DiagnosticReport".equals(codeString)) + return FHIRAllTypes.DIAGNOSTICREPORT; + if ("DocumentManifest".equals(codeString)) + return FHIRAllTypes.DOCUMENTMANIFEST; + if ("DocumentReference".equals(codeString)) + return FHIRAllTypes.DOCUMENTREFERENCE; + if ("DomainResource".equals(codeString)) + return FHIRAllTypes.DOMAINRESOURCE; + if ("EligibilityRequest".equals(codeString)) + return FHIRAllTypes.ELIGIBILITYREQUEST; + if ("EligibilityResponse".equals(codeString)) + return FHIRAllTypes.ELIGIBILITYRESPONSE; + if ("Encounter".equals(codeString)) + return FHIRAllTypes.ENCOUNTER; + if ("EnrollmentRequest".equals(codeString)) + return FHIRAllTypes.ENROLLMENTREQUEST; + if ("EnrollmentResponse".equals(codeString)) + return FHIRAllTypes.ENROLLMENTRESPONSE; + if ("EpisodeOfCare".equals(codeString)) + return FHIRAllTypes.EPISODEOFCARE; + if ("ExpansionProfile".equals(codeString)) + return FHIRAllTypes.EXPANSIONPROFILE; + if ("ExplanationOfBenefit".equals(codeString)) + return FHIRAllTypes.EXPLANATIONOFBENEFIT; + if ("FamilyMemberHistory".equals(codeString)) + return FHIRAllTypes.FAMILYMEMBERHISTORY; + if ("Flag".equals(codeString)) + return FHIRAllTypes.FLAG; + if ("Goal".equals(codeString)) + return FHIRAllTypes.GOAL; + if ("Group".equals(codeString)) + return FHIRAllTypes.GROUP; + if ("GuidanceResponse".equals(codeString)) + return FHIRAllTypes.GUIDANCERESPONSE; + if ("HealthcareService".equals(codeString)) + return FHIRAllTypes.HEALTHCARESERVICE; + if ("ImagingExcerpt".equals(codeString)) + return FHIRAllTypes.IMAGINGEXCERPT; + if ("ImagingObjectSelection".equals(codeString)) + return FHIRAllTypes.IMAGINGOBJECTSELECTION; + if ("ImagingStudy".equals(codeString)) + return FHIRAllTypes.IMAGINGSTUDY; + if ("Immunization".equals(codeString)) + return FHIRAllTypes.IMMUNIZATION; + if ("ImmunizationRecommendation".equals(codeString)) + return FHIRAllTypes.IMMUNIZATIONRECOMMENDATION; + if ("ImplementationGuide".equals(codeString)) + return FHIRAllTypes.IMPLEMENTATIONGUIDE; + if ("Library".equals(codeString)) + return FHIRAllTypes.LIBRARY; + if ("Linkage".equals(codeString)) + return FHIRAllTypes.LINKAGE; + if ("List".equals(codeString)) + return FHIRAllTypes.LIST; + if ("Location".equals(codeString)) + return FHIRAllTypes.LOCATION; + if ("Measure".equals(codeString)) + return FHIRAllTypes.MEASURE; + if ("MeasureReport".equals(codeString)) + return FHIRAllTypes.MEASUREREPORT; + if ("Media".equals(codeString)) + return FHIRAllTypes.MEDIA; + if ("Medication".equals(codeString)) + return FHIRAllTypes.MEDICATION; + if ("MedicationAdministration".equals(codeString)) + return FHIRAllTypes.MEDICATIONADMINISTRATION; + if ("MedicationDispense".equals(codeString)) + return FHIRAllTypes.MEDICATIONDISPENSE; + if ("MedicationOrder".equals(codeString)) + return FHIRAllTypes.MEDICATIONORDER; + if ("MedicationStatement".equals(codeString)) + return FHIRAllTypes.MEDICATIONSTATEMENT; + if ("MessageHeader".equals(codeString)) + return FHIRAllTypes.MESSAGEHEADER; + if ("ModuleDefinition".equals(codeString)) + return FHIRAllTypes.MODULEDEFINITION; + if ("NamingSystem".equals(codeString)) + return FHIRAllTypes.NAMINGSYSTEM; + if ("NutritionOrder".equals(codeString)) + return FHIRAllTypes.NUTRITIONORDER; + if ("Observation".equals(codeString)) + return FHIRAllTypes.OBSERVATION; + if ("OperationDefinition".equals(codeString)) + return FHIRAllTypes.OPERATIONDEFINITION; + if ("OperationOutcome".equals(codeString)) + return FHIRAllTypes.OPERATIONOUTCOME; + if ("Order".equals(codeString)) + return FHIRAllTypes.ORDER; + if ("OrderResponse".equals(codeString)) + return FHIRAllTypes.ORDERRESPONSE; + if ("OrderSet".equals(codeString)) + return FHIRAllTypes.ORDERSET; + if ("Organization".equals(codeString)) + return FHIRAllTypes.ORGANIZATION; + if ("Parameters".equals(codeString)) + return FHIRAllTypes.PARAMETERS; + if ("Patient".equals(codeString)) + return FHIRAllTypes.PATIENT; + if ("PaymentNotice".equals(codeString)) + return FHIRAllTypes.PAYMENTNOTICE; + if ("PaymentReconciliation".equals(codeString)) + return FHIRAllTypes.PAYMENTRECONCILIATION; + if ("Person".equals(codeString)) + return FHIRAllTypes.PERSON; + if ("Practitioner".equals(codeString)) + return FHIRAllTypes.PRACTITIONER; + if ("PractitionerRole".equals(codeString)) + return FHIRAllTypes.PRACTITIONERROLE; + if ("Procedure".equals(codeString)) + return FHIRAllTypes.PROCEDURE; + if ("ProcedureRequest".equals(codeString)) + return FHIRAllTypes.PROCEDUREREQUEST; + if ("ProcessRequest".equals(codeString)) + return FHIRAllTypes.PROCESSREQUEST; + if ("ProcessResponse".equals(codeString)) + return FHIRAllTypes.PROCESSRESPONSE; + if ("Protocol".equals(codeString)) + return FHIRAllTypes.PROTOCOL; + if ("Provenance".equals(codeString)) + return FHIRAllTypes.PROVENANCE; + if ("Questionnaire".equals(codeString)) + return FHIRAllTypes.QUESTIONNAIRE; + if ("QuestionnaireResponse".equals(codeString)) + return FHIRAllTypes.QUESTIONNAIRERESPONSE; + if ("ReferralRequest".equals(codeString)) + return FHIRAllTypes.REFERRALREQUEST; + if ("RelatedPerson".equals(codeString)) + return FHIRAllTypes.RELATEDPERSON; + if ("Resource".equals(codeString)) + return FHIRAllTypes.RESOURCE; + if ("RiskAssessment".equals(codeString)) + return FHIRAllTypes.RISKASSESSMENT; + if ("Schedule".equals(codeString)) + return FHIRAllTypes.SCHEDULE; + if ("SearchParameter".equals(codeString)) + return FHIRAllTypes.SEARCHPARAMETER; + if ("Sequence".equals(codeString)) + return FHIRAllTypes.SEQUENCE; + if ("Slot".equals(codeString)) + return FHIRAllTypes.SLOT; + if ("Specimen".equals(codeString)) + return FHIRAllTypes.SPECIMEN; + if ("StructureDefinition".equals(codeString)) + return FHIRAllTypes.STRUCTUREDEFINITION; + if ("StructureMap".equals(codeString)) + return FHIRAllTypes.STRUCTUREMAP; + if ("Subscription".equals(codeString)) + return FHIRAllTypes.SUBSCRIPTION; + if ("Substance".equals(codeString)) + return FHIRAllTypes.SUBSTANCE; + if ("SupplyDelivery".equals(codeString)) + return FHIRAllTypes.SUPPLYDELIVERY; + if ("SupplyRequest".equals(codeString)) + return FHIRAllTypes.SUPPLYREQUEST; + if ("Task".equals(codeString)) + return FHIRAllTypes.TASK; + if ("TestScript".equals(codeString)) + return FHIRAllTypes.TESTSCRIPT; + if ("ValueSet".equals(codeString)) + return FHIRAllTypes.VALUESET; + if ("VisionPrescription".equals(codeString)) + return FHIRAllTypes.VISIONPRESCRIPTION; + if ("Type".equals(codeString)) + return FHIRAllTypes.TYPE; + if ("Any".equals(codeString)) + return FHIRAllTypes.ANY; + throw new IllegalArgumentException("Unknown FHIRAllTypes code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("ActionDefinition".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ACTIONDEFINITION); + if ("Address".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ADDRESS); + if ("Age".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.AGE); + if ("Annotation".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ANNOTATION); + if ("Attachment".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ATTACHMENT); + if ("BackboneElement".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.BACKBONEELEMENT); + if ("CodeableConcept".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.CODEABLECONCEPT); + if ("Coding".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.CODING); + if ("ContactPoint".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.CONTACTPOINT); + if ("Count".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.COUNT); + if ("DataRequirement".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DATAREQUIREMENT); + if ("Distance".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DISTANCE); + if ("Duration".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DURATION); + if ("Element".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ELEMENT); + if ("ElementDefinition".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ELEMENTDEFINITION); + if ("Extension".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.EXTENSION); + if ("HumanName".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.HUMANNAME); + if ("Identifier".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.IDENTIFIER); + if ("Meta".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.META); + if ("ModuleMetadata".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.MODULEMETADATA); + if ("Money".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.MONEY); + if ("Narrative".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.NARRATIVE); + if ("ParameterDefinition".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.PARAMETERDEFINITION); + if ("Period".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.PERIOD); + if ("Quantity".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.QUANTITY); + if ("Range".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.RANGE); + if ("Ratio".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.RATIO); + if ("Reference".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.REFERENCE); + if ("SampledData".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.SAMPLEDDATA); + if ("Signature".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.SIGNATURE); + if ("SimpleQuantity".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.SIMPLEQUANTITY); + if ("Timing".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.TIMING); + if ("TriggerDefinition".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.TRIGGERDEFINITION); + if ("base64Binary".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.BASE64BINARY); + if ("boolean".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.BOOLEAN); + if ("code".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.CODE); + if ("date".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DATE); + if ("dateTime".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DATETIME); + if ("decimal".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DECIMAL); + if ("id".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ID); + if ("instant".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.INSTANT); + if ("integer".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.INTEGER); + if ("markdown".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.MARKDOWN); + if ("oid".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.OID); + if ("positiveInt".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.POSITIVEINT); + if ("string".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.STRING); + if ("time".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.TIME); + if ("unsignedInt".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.UNSIGNEDINT); + if ("uri".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.URI); + if ("uuid".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.UUID); + if ("xhtml".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.XHTML); + if ("Account".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ACCOUNT); + if ("AllergyIntolerance".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ALLERGYINTOLERANCE); + if ("Appointment".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.APPOINTMENT); + if ("AppointmentResponse".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.APPOINTMENTRESPONSE); + if ("AuditEvent".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.AUDITEVENT); + if ("Basic".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.BASIC); + if ("Binary".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.BINARY); + if ("BodySite".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.BODYSITE); + if ("Bundle".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.BUNDLE); + if ("CarePlan".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.CAREPLAN); + if ("CareTeam".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.CARETEAM); + if ("Claim".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.CLAIM); + if ("ClaimResponse".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.CLAIMRESPONSE); + if ("ClinicalImpression".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.CLINICALIMPRESSION); + if ("CodeSystem".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.CODESYSTEM); + if ("Communication".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.COMMUNICATION); + if ("CommunicationRequest".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.COMMUNICATIONREQUEST); + if ("CompartmentDefinition".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.COMPARTMENTDEFINITION); + if ("Composition".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.COMPOSITION); + if ("ConceptMap".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.CONCEPTMAP); + if ("Condition".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.CONDITION); + if ("Conformance".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.CONFORMANCE); + if ("Contract".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.CONTRACT); + if ("Coverage".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.COVERAGE); + if ("DataElement".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DATAELEMENT); + if ("DecisionSupportRule".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DECISIONSUPPORTRULE); + if ("DecisionSupportServiceModule".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DECISIONSUPPORTSERVICEMODULE); + if ("DetectedIssue".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DETECTEDISSUE); + if ("Device".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DEVICE); + if ("DeviceComponent".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DEVICECOMPONENT); + if ("DeviceMetric".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DEVICEMETRIC); + if ("DeviceUseRequest".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DEVICEUSEREQUEST); + if ("DeviceUseStatement".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DEVICEUSESTATEMENT); + if ("DiagnosticOrder".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DIAGNOSTICORDER); + if ("DiagnosticReport".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DIAGNOSTICREPORT); + if ("DocumentManifest".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DOCUMENTMANIFEST); + if ("DocumentReference".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DOCUMENTREFERENCE); + if ("DomainResource".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.DOMAINRESOURCE); + if ("EligibilityRequest".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ELIGIBILITYREQUEST); + if ("EligibilityResponse".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ELIGIBILITYRESPONSE); + if ("Encounter".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ENCOUNTER); + if ("EnrollmentRequest".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ENROLLMENTREQUEST); + if ("EnrollmentResponse".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ENROLLMENTRESPONSE); + if ("EpisodeOfCare".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.EPISODEOFCARE); + if ("ExpansionProfile".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.EXPANSIONPROFILE); + if ("ExplanationOfBenefit".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.EXPLANATIONOFBENEFIT); + if ("FamilyMemberHistory".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.FAMILYMEMBERHISTORY); + if ("Flag".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.FLAG); + if ("Goal".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.GOAL); + if ("Group".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.GROUP); + if ("GuidanceResponse".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.GUIDANCERESPONSE); + if ("HealthcareService".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.HEALTHCARESERVICE); + if ("ImagingExcerpt".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.IMAGINGEXCERPT); + if ("ImagingObjectSelection".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.IMAGINGOBJECTSELECTION); + if ("ImagingStudy".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.IMAGINGSTUDY); + if ("Immunization".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.IMMUNIZATION); + if ("ImmunizationRecommendation".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.IMMUNIZATIONRECOMMENDATION); + if ("ImplementationGuide".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.IMPLEMENTATIONGUIDE); + if ("Library".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.LIBRARY); + if ("Linkage".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.LINKAGE); + if ("List".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.LIST); + if ("Location".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.LOCATION); + if ("Measure".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.MEASURE); + if ("MeasureReport".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.MEASUREREPORT); + if ("Media".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.MEDIA); + if ("Medication".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.MEDICATION); + if ("MedicationAdministration".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.MEDICATIONADMINISTRATION); + if ("MedicationDispense".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.MEDICATIONDISPENSE); + if ("MedicationOrder".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.MEDICATIONORDER); + if ("MedicationStatement".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.MEDICATIONSTATEMENT); + if ("MessageHeader".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.MESSAGEHEADER); + if ("ModuleDefinition".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.MODULEDEFINITION); + if ("NamingSystem".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.NAMINGSYSTEM); + if ("NutritionOrder".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.NUTRITIONORDER); + if ("Observation".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.OBSERVATION); + if ("OperationDefinition".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.OPERATIONDEFINITION); + if ("OperationOutcome".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.OPERATIONOUTCOME); + if ("Order".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ORDER); + if ("OrderResponse".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ORDERRESPONSE); + if ("OrderSet".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ORDERSET); + if ("Organization".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ORGANIZATION); + if ("Parameters".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.PARAMETERS); + if ("Patient".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.PATIENT); + if ("PaymentNotice".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.PAYMENTNOTICE); + if ("PaymentReconciliation".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.PAYMENTRECONCILIATION); + if ("Person".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.PERSON); + if ("Practitioner".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.PRACTITIONER); + if ("PractitionerRole".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.PRACTITIONERROLE); + if ("Procedure".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.PROCEDURE); + if ("ProcedureRequest".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.PROCEDUREREQUEST); + if ("ProcessRequest".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.PROCESSREQUEST); + if ("ProcessResponse".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.PROCESSRESPONSE); + if ("Protocol".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.PROTOCOL); + if ("Provenance".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.PROVENANCE); + if ("Questionnaire".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.QUESTIONNAIRE); + if ("QuestionnaireResponse".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.QUESTIONNAIRERESPONSE); + if ("ReferralRequest".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.REFERRALREQUEST); + if ("RelatedPerson".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.RELATEDPERSON); + if ("Resource".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.RESOURCE); + if ("RiskAssessment".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.RISKASSESSMENT); + if ("Schedule".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.SCHEDULE); + if ("SearchParameter".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.SEARCHPARAMETER); + if ("Sequence".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.SEQUENCE); + if ("Slot".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.SLOT); + if ("Specimen".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.SPECIMEN); + if ("StructureDefinition".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.STRUCTUREDEFINITION); + if ("StructureMap".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.STRUCTUREMAP); + if ("Subscription".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.SUBSCRIPTION); + if ("Substance".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.SUBSTANCE); + if ("SupplyDelivery".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.SUPPLYDELIVERY); + if ("SupplyRequest".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.SUPPLYREQUEST); + if ("Task".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.TASK); + if ("TestScript".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.TESTSCRIPT); + if ("ValueSet".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.VALUESET); + if ("VisionPrescription".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.VISIONPRESCRIPTION); + if ("Type".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.TYPE); + if ("Any".equals(codeString)) + return new Enumeration(this, FHIRAllTypes.ANY); + throw new FHIRException("Unknown FHIRAllTypes code '"+codeString+"'"); + } + public String toCode(FHIRAllTypes code) { + if (code == FHIRAllTypes.ACTIONDEFINITION) + return "ActionDefinition"; + if (code == FHIRAllTypes.ADDRESS) + return "Address"; + if (code == FHIRAllTypes.AGE) + return "Age"; + if (code == FHIRAllTypes.ANNOTATION) + return "Annotation"; + if (code == FHIRAllTypes.ATTACHMENT) + return "Attachment"; + if (code == FHIRAllTypes.BACKBONEELEMENT) + return "BackboneElement"; + if (code == FHIRAllTypes.CODEABLECONCEPT) + return "CodeableConcept"; + if (code == FHIRAllTypes.CODING) + return "Coding"; + if (code == FHIRAllTypes.CONTACTPOINT) + return "ContactPoint"; + if (code == FHIRAllTypes.COUNT) + return "Count"; + if (code == FHIRAllTypes.DATAREQUIREMENT) + return "DataRequirement"; + if (code == FHIRAllTypes.DISTANCE) + return "Distance"; + if (code == FHIRAllTypes.DURATION) + return "Duration"; + if (code == FHIRAllTypes.ELEMENT) + return "Element"; + if (code == FHIRAllTypes.ELEMENTDEFINITION) + return "ElementDefinition"; + if (code == FHIRAllTypes.EXTENSION) + return "Extension"; + if (code == FHIRAllTypes.HUMANNAME) + return "HumanName"; + if (code == FHIRAllTypes.IDENTIFIER) + return "Identifier"; + if (code == FHIRAllTypes.META) + return "Meta"; + if (code == FHIRAllTypes.MODULEMETADATA) + return "ModuleMetadata"; + if (code == FHIRAllTypes.MONEY) + return "Money"; + if (code == FHIRAllTypes.NARRATIVE) + return "Narrative"; + if (code == FHIRAllTypes.PARAMETERDEFINITION) + return "ParameterDefinition"; + if (code == FHIRAllTypes.PERIOD) + return "Period"; + if (code == FHIRAllTypes.QUANTITY) + return "Quantity"; + if (code == FHIRAllTypes.RANGE) + return "Range"; + if (code == FHIRAllTypes.RATIO) + return "Ratio"; + if (code == FHIRAllTypes.REFERENCE) + return "Reference"; + if (code == FHIRAllTypes.SAMPLEDDATA) + return "SampledData"; + if (code == FHIRAllTypes.SIGNATURE) + return "Signature"; + if (code == FHIRAllTypes.SIMPLEQUANTITY) + return "SimpleQuantity"; + if (code == FHIRAllTypes.TIMING) + return "Timing"; + if (code == FHIRAllTypes.TRIGGERDEFINITION) + return "TriggerDefinition"; + if (code == FHIRAllTypes.BASE64BINARY) + return "base64Binary"; + if (code == FHIRAllTypes.BOOLEAN) + return "boolean"; + if (code == FHIRAllTypes.CODE) + return "code"; + if (code == FHIRAllTypes.DATE) + return "date"; + if (code == FHIRAllTypes.DATETIME) + return "dateTime"; + if (code == FHIRAllTypes.DECIMAL) + return "decimal"; + if (code == FHIRAllTypes.ID) + return "id"; + if (code == FHIRAllTypes.INSTANT) + return "instant"; + if (code == FHIRAllTypes.INTEGER) + return "integer"; + if (code == FHIRAllTypes.MARKDOWN) + return "markdown"; + if (code == FHIRAllTypes.OID) + return "oid"; + if (code == FHIRAllTypes.POSITIVEINT) + return "positiveInt"; + if (code == FHIRAllTypes.STRING) + return "string"; + if (code == FHIRAllTypes.TIME) + return "time"; + if (code == FHIRAllTypes.UNSIGNEDINT) + return "unsignedInt"; + if (code == FHIRAllTypes.URI) + return "uri"; + if (code == FHIRAllTypes.UUID) + return "uuid"; + if (code == FHIRAllTypes.XHTML) + return "xhtml"; + if (code == FHIRAllTypes.ACCOUNT) + return "Account"; + if (code == FHIRAllTypes.ALLERGYINTOLERANCE) + return "AllergyIntolerance"; + if (code == FHIRAllTypes.APPOINTMENT) + return "Appointment"; + if (code == FHIRAllTypes.APPOINTMENTRESPONSE) + return "AppointmentResponse"; + if (code == FHIRAllTypes.AUDITEVENT) + return "AuditEvent"; + if (code == FHIRAllTypes.BASIC) + return "Basic"; + if (code == FHIRAllTypes.BINARY) + return "Binary"; + if (code == FHIRAllTypes.BODYSITE) + return "BodySite"; + if (code == FHIRAllTypes.BUNDLE) + return "Bundle"; + if (code == FHIRAllTypes.CAREPLAN) + return "CarePlan"; + if (code == FHIRAllTypes.CARETEAM) + return "CareTeam"; + if (code == FHIRAllTypes.CLAIM) + return "Claim"; + if (code == FHIRAllTypes.CLAIMRESPONSE) + return "ClaimResponse"; + if (code == FHIRAllTypes.CLINICALIMPRESSION) + return "ClinicalImpression"; + if (code == FHIRAllTypes.CODESYSTEM) + return "CodeSystem"; + if (code == FHIRAllTypes.COMMUNICATION) + return "Communication"; + if (code == FHIRAllTypes.COMMUNICATIONREQUEST) + return "CommunicationRequest"; + if (code == FHIRAllTypes.COMPARTMENTDEFINITION) + return "CompartmentDefinition"; + if (code == FHIRAllTypes.COMPOSITION) + return "Composition"; + if (code == FHIRAllTypes.CONCEPTMAP) + return "ConceptMap"; + if (code == FHIRAllTypes.CONDITION) + return "Condition"; + if (code == FHIRAllTypes.CONFORMANCE) + return "Conformance"; + if (code == FHIRAllTypes.CONTRACT) + return "Contract"; + if (code == FHIRAllTypes.COVERAGE) + return "Coverage"; + if (code == FHIRAllTypes.DATAELEMENT) + return "DataElement"; + if (code == FHIRAllTypes.DECISIONSUPPORTRULE) + return "DecisionSupportRule"; + if (code == FHIRAllTypes.DECISIONSUPPORTSERVICEMODULE) + return "DecisionSupportServiceModule"; + if (code == FHIRAllTypes.DETECTEDISSUE) + return "DetectedIssue"; + if (code == FHIRAllTypes.DEVICE) + return "Device"; + if (code == FHIRAllTypes.DEVICECOMPONENT) + return "DeviceComponent"; + if (code == FHIRAllTypes.DEVICEMETRIC) + return "DeviceMetric"; + if (code == FHIRAllTypes.DEVICEUSEREQUEST) + return "DeviceUseRequest"; + if (code == FHIRAllTypes.DEVICEUSESTATEMENT) + return "DeviceUseStatement"; + if (code == FHIRAllTypes.DIAGNOSTICORDER) + return "DiagnosticOrder"; + if (code == FHIRAllTypes.DIAGNOSTICREPORT) + return "DiagnosticReport"; + if (code == FHIRAllTypes.DOCUMENTMANIFEST) + return "DocumentManifest"; + if (code == FHIRAllTypes.DOCUMENTREFERENCE) + return "DocumentReference"; + if (code == FHIRAllTypes.DOMAINRESOURCE) + return "DomainResource"; + if (code == FHIRAllTypes.ELIGIBILITYREQUEST) + return "EligibilityRequest"; + if (code == FHIRAllTypes.ELIGIBILITYRESPONSE) + return "EligibilityResponse"; + if (code == FHIRAllTypes.ENCOUNTER) + return "Encounter"; + if (code == FHIRAllTypes.ENROLLMENTREQUEST) + return "EnrollmentRequest"; + if (code == FHIRAllTypes.ENROLLMENTRESPONSE) + return "EnrollmentResponse"; + if (code == FHIRAllTypes.EPISODEOFCARE) + return "EpisodeOfCare"; + if (code == FHIRAllTypes.EXPANSIONPROFILE) + return "ExpansionProfile"; + if (code == FHIRAllTypes.EXPLANATIONOFBENEFIT) + return "ExplanationOfBenefit"; + if (code == FHIRAllTypes.FAMILYMEMBERHISTORY) + return "FamilyMemberHistory"; + if (code == FHIRAllTypes.FLAG) + return "Flag"; + if (code == FHIRAllTypes.GOAL) + return "Goal"; + if (code == FHIRAllTypes.GROUP) + return "Group"; + if (code == FHIRAllTypes.GUIDANCERESPONSE) + return "GuidanceResponse"; + if (code == FHIRAllTypes.HEALTHCARESERVICE) + return "HealthcareService"; + if (code == FHIRAllTypes.IMAGINGEXCERPT) + return "ImagingExcerpt"; + if (code == FHIRAllTypes.IMAGINGOBJECTSELECTION) + return "ImagingObjectSelection"; + if (code == FHIRAllTypes.IMAGINGSTUDY) + return "ImagingStudy"; + if (code == FHIRAllTypes.IMMUNIZATION) + return "Immunization"; + if (code == FHIRAllTypes.IMMUNIZATIONRECOMMENDATION) + return "ImmunizationRecommendation"; + if (code == FHIRAllTypes.IMPLEMENTATIONGUIDE) + return "ImplementationGuide"; + if (code == FHIRAllTypes.LIBRARY) + return "Library"; + if (code == FHIRAllTypes.LINKAGE) + return "Linkage"; + if (code == FHIRAllTypes.LIST) + return "List"; + if (code == FHIRAllTypes.LOCATION) + return "Location"; + if (code == FHIRAllTypes.MEASURE) + return "Measure"; + if (code == FHIRAllTypes.MEASUREREPORT) + return "MeasureReport"; + if (code == FHIRAllTypes.MEDIA) + return "Media"; + if (code == FHIRAllTypes.MEDICATION) + return "Medication"; + if (code == FHIRAllTypes.MEDICATIONADMINISTRATION) + return "MedicationAdministration"; + if (code == FHIRAllTypes.MEDICATIONDISPENSE) + return "MedicationDispense"; + if (code == FHIRAllTypes.MEDICATIONORDER) + return "MedicationOrder"; + if (code == FHIRAllTypes.MEDICATIONSTATEMENT) + return "MedicationStatement"; + if (code == FHIRAllTypes.MESSAGEHEADER) + return "MessageHeader"; + if (code == FHIRAllTypes.MODULEDEFINITION) + return "ModuleDefinition"; + if (code == FHIRAllTypes.NAMINGSYSTEM) + return "NamingSystem"; + if (code == FHIRAllTypes.NUTRITIONORDER) + return "NutritionOrder"; + if (code == FHIRAllTypes.OBSERVATION) + return "Observation"; + if (code == FHIRAllTypes.OPERATIONDEFINITION) + return "OperationDefinition"; + if (code == FHIRAllTypes.OPERATIONOUTCOME) + return "OperationOutcome"; + if (code == FHIRAllTypes.ORDER) + return "Order"; + if (code == FHIRAllTypes.ORDERRESPONSE) + return "OrderResponse"; + if (code == FHIRAllTypes.ORDERSET) + return "OrderSet"; + if (code == FHIRAllTypes.ORGANIZATION) + return "Organization"; + if (code == FHIRAllTypes.PARAMETERS) + return "Parameters"; + if (code == FHIRAllTypes.PATIENT) + return "Patient"; + if (code == FHIRAllTypes.PAYMENTNOTICE) + return "PaymentNotice"; + if (code == FHIRAllTypes.PAYMENTRECONCILIATION) + return "PaymentReconciliation"; + if (code == FHIRAllTypes.PERSON) + return "Person"; + if (code == FHIRAllTypes.PRACTITIONER) + return "Practitioner"; + if (code == FHIRAllTypes.PRACTITIONERROLE) + return "PractitionerRole"; + if (code == FHIRAllTypes.PROCEDURE) + return "Procedure"; + if (code == FHIRAllTypes.PROCEDUREREQUEST) + return "ProcedureRequest"; + if (code == FHIRAllTypes.PROCESSREQUEST) + return "ProcessRequest"; + if (code == FHIRAllTypes.PROCESSRESPONSE) + return "ProcessResponse"; + if (code == FHIRAllTypes.PROTOCOL) + return "Protocol"; + if (code == FHIRAllTypes.PROVENANCE) + return "Provenance"; + if (code == FHIRAllTypes.QUESTIONNAIRE) + return "Questionnaire"; + if (code == FHIRAllTypes.QUESTIONNAIRERESPONSE) + return "QuestionnaireResponse"; + if (code == FHIRAllTypes.REFERRALREQUEST) + return "ReferralRequest"; + if (code == FHIRAllTypes.RELATEDPERSON) + return "RelatedPerson"; + if (code == FHIRAllTypes.RESOURCE) + return "Resource"; + if (code == FHIRAllTypes.RISKASSESSMENT) + return "RiskAssessment"; + if (code == FHIRAllTypes.SCHEDULE) + return "Schedule"; + if (code == FHIRAllTypes.SEARCHPARAMETER) + return "SearchParameter"; + if (code == FHIRAllTypes.SEQUENCE) + return "Sequence"; + if (code == FHIRAllTypes.SLOT) + return "Slot"; + if (code == FHIRAllTypes.SPECIMEN) + return "Specimen"; + if (code == FHIRAllTypes.STRUCTUREDEFINITION) + return "StructureDefinition"; + if (code == FHIRAllTypes.STRUCTUREMAP) + return "StructureMap"; + if (code == FHIRAllTypes.SUBSCRIPTION) + return "Subscription"; + if (code == FHIRAllTypes.SUBSTANCE) + return "Substance"; + if (code == FHIRAllTypes.SUPPLYDELIVERY) + return "SupplyDelivery"; + if (code == FHIRAllTypes.SUPPLYREQUEST) + return "SupplyRequest"; + if (code == FHIRAllTypes.TASK) + return "Task"; + if (code == FHIRAllTypes.TESTSCRIPT) + return "TestScript"; + if (code == FHIRAllTypes.VALUESET) + return "ValueSet"; + if (code == FHIRAllTypes.VISIONPRESCRIPTION) + return "VisionPrescription"; + if (code == FHIRAllTypes.TYPE) + return "Type"; + if (code == FHIRAllTypes.ANY) + return "Any"; + return "?"; + } + public String toSystem(FHIRAllTypes code) { + return code.getSystem(); + } + } + + public enum FHIRDefinedType { + /** + * The definition of an action to be performed. Some aspects of the definition are specified statically, and some aspects can be specified dynamically by referencing logic defined in a library. + */ + ACTIONDEFINITION, + /** + * An address expressed using postal conventions (as opposed to GPS or other location definition formats). This data type may be used to convey addresses for use in delivering mail as well as for visiting locations and which might not be valid for mail delivery. There are a variety of postal address formats defined around the world. + */ + ADDRESS, + /** + * null + */ + AGE, + /** + * A text note which also contains information about who made the statement and when. + */ + ANNOTATION, + /** + * For referring to data content defined in other formats. + */ + ATTACHMENT, + /** + * Base definition for all elements that are defined inside a resource - but not those in a data type. + */ + BACKBONEELEMENT, + /** + * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text. + */ + CODEABLECONCEPT, + /** + * A reference to a code defined by a terminology system. + */ + CODING, + /** + * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc. + */ + CONTACTPOINT, + /** + * null + */ + COUNT, + /** + * Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data. + */ + DATAREQUIREMENT, + /** + * null + */ + DISTANCE, + /** + * null + */ + DURATION, + /** + * Base definition for all elements in a resource. + */ + ELEMENT, + /** + * Captures constraints on each element within the resource, profile, or extension. + */ + ELEMENTDEFINITION, + /** + * Optional Extensions Element - found in all resources. + */ + EXTENSION, + /** + * A human's name with the ability to identify parts and usage. + */ + HUMANNAME, + /** + * A technical identifier - identifies some entity uniquely and unambiguously. + */ + IDENTIFIER, + /** + * The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource. + */ + META, + /** + * The ModuleMetadata structure defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information. + */ + MODULEMETADATA, + /** + * null + */ + MONEY, + /** + * A human-readable formatted text, including images. + */ + NARRATIVE, + /** + * The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse. + */ + PARAMETERDEFINITION, + /** + * A time period defined by a start and end date and optionally time. + */ + PERIOD, + /** + * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. + */ + QUANTITY, + /** + * A set of ordered Quantities defined by a low and high limit. + */ + RANGE, + /** + * A relationship of two Quantity values - expressed as a numerator and a denominator. + */ + RATIO, + /** + * A reference from one resource to another. + */ + REFERENCE, + /** + * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data. + */ + SAMPLEDDATA, + /** + * A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities. + */ + SIGNATURE, + /** + * null + */ + SIMPLEQUANTITY, + /** + * Specifies an event that may occur multiple times. Timing schedules are used to record when things are expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds. + */ + TIMING, + /** + * A description of a triggering event. + */ + TRIGGERDEFINITION, + /** + * A stream of bytes + */ + BASE64BINARY, + /** + * Value of "true" or "false" + */ + BOOLEAN, + /** + * A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents + */ + CODE, + /** + * A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date. Dates SHALL be valid dates. + */ + DATE, + /** + * A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates. + */ + DATETIME, + /** + * A rational number with implicit precision + */ + DECIMAL, + /** + * Any combination of letters, numerals, "-" and ".", with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive. + */ + ID, + /** + * An instant in time - known at least to the second + */ + INSTANT, + /** + * A whole number + */ + INTEGER, + /** + * A string that may contain markdown syntax for optional processing by a mark down presentation engine + */ + MARKDOWN, + /** + * An oid represented as a URI + */ + OID, + /** + * An integer with a value that is positive (e.g. >0) + */ + POSITIVEINT, + /** + * A sequence of Unicode characters + */ + STRING, + /** + * A time during the day, with no date specified + */ + TIME, + /** + * An integer with a value that is not negative (e.g. >= 0) + */ + UNSIGNEDINT, + /** + * String of characters used to identify a name or a resource + */ + URI, + /** + * A UUID, represented as a URI + */ + UUID, + /** + * XHTML format, as defined by W3C, but restricted usage (mainly, no active content) + */ + XHTML, + /** + * A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centres, etc. + */ + ACCOUNT, + /** + * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance. + */ + ALLERGYINTOLERANCE, + /** + * A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s). + */ + APPOINTMENT, + /** + * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection. + */ + APPOINTMENTRESPONSE, + /** + * A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage. + */ + AUDITEVENT, + /** + * Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification. + */ + BASIC, + /** + * A binary resource can contain any content, whether text, image, pdf, zip archive, etc. + */ + BINARY, + /** + * Record details about the anatomical location of a specimen or body part. This resource may be used when a coded concept does not provide the necessary detail needed for the use case. + */ + BODYSITE, + /** + * A container for a collection of resources. + */ + BUNDLE, + /** + * Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions. + */ + CAREPLAN, + /** + * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient. + */ + CARETEAM, + /** + * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery. + */ + CLAIM, + /** + * This resource provides the adjudication details from the processing of a Claim resource. + */ + CLAIMRESPONSE, + /** + * A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with the recording of assessment tools such as Apgar score. + */ + CLINICALIMPRESSION, + /** + * A code system resource specifies a set of codes drawn from one or more code systems. + */ + CODESYSTEM, + /** + * An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition. + */ + COMMUNICATION, + /** + * A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition. + */ + COMMUNICATIONREQUEST, + /** + * A compartment definition that defines how resources are accessed on a server. + */ + COMPARTMENTDEFINITION, + /** + * A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained. + */ + COMPOSITION, + /** + * A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models. + */ + CONCEPTMAP, + /** + * Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a diagnosis during an encounter; populating a problem list or a summary statement, such as a discharge summary. + */ + CONDITION, + /** + * A conformance statement is a set of capabilities of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation. + */ + CONFORMANCE, + /** + * A formal agreement between parties regarding the conduct of business, exchange of information or other matters. + */ + CONTRACT, + /** + * Financial instrument which may be used to pay for or reimburse health care products and services. + */ + COVERAGE, + /** + * The formal description of a single piece of information that can be gathered and reported. + */ + DATAELEMENT, + /** + * This resource defines a decision support rule of the form [on Event] if Condition then Action. It is intended to be a shareable, computable definition of a actions that should be taken whenever some condition is met in response to a particular event or events. + */ + DECISIONSUPPORTRULE, + /** + * The DecisionSupportServiceModule describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking. + */ + DECISIONSUPPORTSERVICEMODULE, + /** + * Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc. + */ + DETECTEDISSUE, + /** + * This resource identifies an instance or a type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc. + */ + DEVICE, + /** + * Describes the characteristics, operational status and capabilities of a medical-related component of a medical device. + */ + DEVICECOMPONENT, + /** + * Describes a measurement, calculation or setting capability of a medical device. + */ + DEVICEMETRIC, + /** + * Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker. + */ + DEVICEUSEREQUEST, + /** + * A record of a device being used by a patient where the record is the result of a report from the patient or another clinician. + */ + DEVICEUSESTATEMENT, + /** + * A record of a request for a diagnostic investigation service to be performed. + */ + DIAGNOSTICORDER, + /** + * The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. + */ + DIAGNOSTICREPORT, + /** + * A manifest that defines a set of documents. + */ + DOCUMENTMANIFEST, + /** + * A reference to a document . + */ + DOCUMENTREFERENCE, + /** + * --- Abstract Type! ---A resource that includes narrative, extensions, and contained resources. + */ + DOMAINRESOURCE, + /** + * This resource provides the insurance eligibility details from the insurer regarding a specified coverage and optionally some class of service. + */ + ELIGIBILITYREQUEST, + /** + * This resource provides eligibility and plan details from the processing of an Eligibility resource. + */ + ELIGIBILITYRESPONSE, + /** + * An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient. + */ + ENCOUNTER, + /** + * This resource provides the insurance enrollment details to the insurer regarding a specified coverage. + */ + ENROLLMENTREQUEST, + /** + * This resource provides enrollment and plan details from the processing of an Enrollment resource. + */ + ENROLLMENTRESPONSE, + /** + * An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time. + */ + EPISODEOFCARE, + /** + * Resource to define constraints on the Expansion of a FHIR ValueSet. + */ + EXPANSIONPROFILE, + /** + * This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided. + */ + EXPLANATIONOFBENEFIT, + /** + * Significant health events and conditions for a person related to the patient relevant in the context of care for the patient. + */ + FAMILYMEMBERHISTORY, + /** + * Prospective warnings of potential issues when providing care to the patient. + */ + FLAG, + /** + * Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc. + */ + GOAL, + /** + * Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization. + */ + GROUP, + /** + * A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken. + */ + GUIDANCERESPONSE, + /** + * The details of a healthcare service available at a location. + */ + HEALTHCARESERVICE, + /** + * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingExcerpt resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on. + */ + IMAGINGEXCERPT, + /** + * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on. + */ + IMAGINGOBJECTSELECTION, + /** + * Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities. + */ + IMAGINGSTUDY, + /** + * Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed. + */ + IMMUNIZATION, + /** + * A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification. + */ + IMMUNIZATIONRECOMMENDATION, + /** + * A set of rules or how FHIR is used to solve a particular problem. This resource is used to gather all the parts of an implementation guide into a logical whole, and to publish a computable definition of all the parts. + */ + IMPLEMENTATIONGUIDE, + /** + * The Library resource provides a representation container for knowledge artifact component definitions. It is effectively an exposure of the header information for a CQL/ELM library. + */ + LIBRARY, + /** + * Identifies two or more records (resource instances) that are referring to the same real-world "occurrence". + */ + LINKAGE, + /** + * A set of information summarized from a list of other resources. + */ + LIST, + /** + * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated. + */ + LOCATION, + /** + * The Measure resource provides the definition of a quality measure. + */ + MEASURE, + /** + * The MeasureReport resource contains the results of evaluating a measure. + */ + MEASUREREPORT, + /** + * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference. + */ + MEDIA, + /** + * This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication. + */ + MEDICATION, + /** + * Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner. + */ + MEDICATIONADMINISTRATION, + /** + * Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order. + */ + MEDICATIONDISPENSE, + /** + * An order for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationOrder" rather than "MedicationPrescription" to generalize the use across inpatient and outpatient settings as well as for care plans, etc. + */ + MEDICATIONORDER, + /** + * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from e.g. the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. + */ + MEDICATIONSTATEMENT, + /** + * The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle. + */ + MESSAGEHEADER, + /** + * The ModuleDefinition resource defines the data requirements for a quality artifact. + */ + MODULEDEFINITION, + /** + * A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a "System" used within the Identifier and Coding data types. + */ + NAMINGSYSTEM, + /** + * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident. + */ + NUTRITIONORDER, + /** + * Measurements and simple assertions made about a patient, device or other subject. + */ + OBSERVATION, + /** + * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction). + */ + OPERATIONDEFINITION, + /** + * A collection of error, warning or information messages that result from a system action. + */ + OPERATIONOUTCOME, + /** + * A request to perform an action. + */ + ORDER, + /** + * A response to an order. + */ + ORDERRESPONSE, + /** + * This resource allows for the definition of an order set as a sharable, consumable, and executable artifact in support of clinical decision support. + */ + ORDERSET, + /** + * A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc. + */ + ORGANIZATION, + /** + * This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it. + */ + PARAMETERS, + /** + * Demographics and other administrative information about an individual or animal receiving care or other health-related services. + */ + PATIENT, + /** + * This resource provides the status of the payment for goods and services rendered, and the request and response resource references. + */ + PAYMENTNOTICE, + /** + * This resource provides payment details and claim references supporting a bulk payment. + */ + PAYMENTRECONCILIATION, + /** + * Demographics and administrative information about a person independent of a specific health-related context. + */ + PERSON, + /** + * A person who is directly or indirectly involved in the provisioning of healthcare. + */ + PRACTITIONER, + /** + * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time. + */ + PRACTITIONERROLE, + /** + * An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy. + */ + PROCEDURE, + /** + * A request for a procedure to be performed. May be a proposal or an order. + */ + PROCEDUREREQUEST, + /** + * This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources. + */ + PROCESSREQUEST, + /** + * This resource provides processing status, errors and notes from the processing of a resource. + */ + PROCESSRESPONSE, + /** + * A definition of behaviors to be taken in particular circumstances, often including conditions, options and other decision points. + */ + PROTOCOL, + /** + * Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies. + */ + PROVENANCE, + /** + * A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions. + */ + QUESTIONNAIRE, + /** + * A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions. + */ + QUESTIONNAIRERESPONSE, + /** + * Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization. + */ + REFERRALREQUEST, + /** + * Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process. + */ + RELATEDPERSON, + /** + * --- Abstract Type! ---This is the base resource type for everything. + */ + RESOURCE, + /** + * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome. + */ + RISKASSESSMENT, + /** + * A container for slot(s) of time that may be available for booking appointments. + */ + SCHEDULE, + /** + * A search parameter that defines a named search item that can be used to search/filter on a resource. + */ + SEARCHPARAMETER, + /** + * Variation and Sequence data. + */ + SEQUENCE, + /** + * A slot of time on a schedule that may be available for booking appointments. + */ + SLOT, + /** + * A sample to be used for analysis. + */ + SPECIMEN, + /** + * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions, and constraints on resources and data types. + */ + STRUCTUREDEFINITION, + /** + * A Map of relationships between 2 structures that can be used to transform data. + */ + STRUCTUREMAP, + /** + * The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system is able to take an appropriate action. + */ + SUBSCRIPTION, + /** + * A homogeneous material with a definite composition. + */ + SUBSTANCE, + /** + * Record of delivery of what is supplied. + */ + SUPPLYDELIVERY, + /** + * A record of a request for a medication, substance or device used in the healthcare setting. + */ + SUPPLYREQUEST, + /** + * A task to be performed. + */ + TASK, + /** + * TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification. + */ + TESTSCRIPT, + /** + * A value set specifies a set of codes drawn from one or more code systems. + */ + VALUESET, + /** + * An authorization for the supply of glasses and/or contact lenses to a patient. + */ + VISIONPRESCRIPTION, + /** + * added to help the parsers + */ + NULL; + public static FHIRDefinedType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("ActionDefinition".equals(codeString)) + return ACTIONDEFINITION; + if ("Address".equals(codeString)) + return ADDRESS; + if ("Age".equals(codeString)) + return AGE; + if ("Annotation".equals(codeString)) + return ANNOTATION; + if ("Attachment".equals(codeString)) + return ATTACHMENT; + if ("BackboneElement".equals(codeString)) + return BACKBONEELEMENT; + if ("CodeableConcept".equals(codeString)) + return CODEABLECONCEPT; + if ("Coding".equals(codeString)) + return CODING; + if ("ContactPoint".equals(codeString)) + return CONTACTPOINT; + if ("Count".equals(codeString)) + return COUNT; + if ("DataRequirement".equals(codeString)) + return DATAREQUIREMENT; + if ("Distance".equals(codeString)) + return DISTANCE; + if ("Duration".equals(codeString)) + return DURATION; + if ("Element".equals(codeString)) + return ELEMENT; + if ("ElementDefinition".equals(codeString)) + return ELEMENTDEFINITION; + if ("Extension".equals(codeString)) + return EXTENSION; + if ("HumanName".equals(codeString)) + return HUMANNAME; + if ("Identifier".equals(codeString)) + return IDENTIFIER; + if ("Meta".equals(codeString)) + return META; + if ("ModuleMetadata".equals(codeString)) + return MODULEMETADATA; + if ("Money".equals(codeString)) + return MONEY; + if ("Narrative".equals(codeString)) + return NARRATIVE; + if ("ParameterDefinition".equals(codeString)) + return PARAMETERDEFINITION; + if ("Period".equals(codeString)) + return PERIOD; + if ("Quantity".equals(codeString)) + return QUANTITY; + if ("Range".equals(codeString)) + return RANGE; + if ("Ratio".equals(codeString)) + return RATIO; + if ("Reference".equals(codeString)) + return REFERENCE; + if ("SampledData".equals(codeString)) + return SAMPLEDDATA; + if ("Signature".equals(codeString)) + return SIGNATURE; + if ("SimpleQuantity".equals(codeString)) + return SIMPLEQUANTITY; + if ("Timing".equals(codeString)) + return TIMING; + if ("TriggerDefinition".equals(codeString)) + return TRIGGERDEFINITION; + if ("base64Binary".equals(codeString)) + return BASE64BINARY; + if ("boolean".equals(codeString)) + return BOOLEAN; + if ("code".equals(codeString)) + return CODE; + if ("date".equals(codeString)) + return DATE; + if ("dateTime".equals(codeString)) + return DATETIME; + if ("decimal".equals(codeString)) + return DECIMAL; + if ("id".equals(codeString)) + return ID; + if ("instant".equals(codeString)) + return INSTANT; + if ("integer".equals(codeString)) + return INTEGER; + if ("markdown".equals(codeString)) + return MARKDOWN; + if ("oid".equals(codeString)) + return OID; + if ("positiveInt".equals(codeString)) + return POSITIVEINT; + if ("string".equals(codeString)) + return STRING; + if ("time".equals(codeString)) + return TIME; + if ("unsignedInt".equals(codeString)) + return UNSIGNEDINT; + if ("uri".equals(codeString)) + return URI; + if ("uuid".equals(codeString)) + return UUID; + if ("xhtml".equals(codeString)) + return XHTML; + if ("Account".equals(codeString)) + return ACCOUNT; + if ("AllergyIntolerance".equals(codeString)) + return ALLERGYINTOLERANCE; + if ("Appointment".equals(codeString)) + return APPOINTMENT; + if ("AppointmentResponse".equals(codeString)) + return APPOINTMENTRESPONSE; + if ("AuditEvent".equals(codeString)) + return AUDITEVENT; + if ("Basic".equals(codeString)) + return BASIC; + if ("Binary".equals(codeString)) + return BINARY; + if ("BodySite".equals(codeString)) + return BODYSITE; + if ("Bundle".equals(codeString)) + return BUNDLE; + if ("CarePlan".equals(codeString)) + return CAREPLAN; + if ("CareTeam".equals(codeString)) + return CARETEAM; + if ("Claim".equals(codeString)) + return CLAIM; + if ("ClaimResponse".equals(codeString)) + return CLAIMRESPONSE; + if ("ClinicalImpression".equals(codeString)) + return CLINICALIMPRESSION; + if ("CodeSystem".equals(codeString)) + return CODESYSTEM; + if ("Communication".equals(codeString)) + return COMMUNICATION; + if ("CommunicationRequest".equals(codeString)) + return COMMUNICATIONREQUEST; + if ("CompartmentDefinition".equals(codeString)) + return COMPARTMENTDEFINITION; + if ("Composition".equals(codeString)) + return COMPOSITION; + if ("ConceptMap".equals(codeString)) + return CONCEPTMAP; + if ("Condition".equals(codeString)) + return CONDITION; + if ("Conformance".equals(codeString)) + return CONFORMANCE; + if ("Contract".equals(codeString)) + return CONTRACT; + if ("Coverage".equals(codeString)) + return COVERAGE; + if ("DataElement".equals(codeString)) + return DATAELEMENT; + if ("DecisionSupportRule".equals(codeString)) + return DECISIONSUPPORTRULE; + if ("DecisionSupportServiceModule".equals(codeString)) + return DECISIONSUPPORTSERVICEMODULE; + if ("DetectedIssue".equals(codeString)) + return DETECTEDISSUE; + if ("Device".equals(codeString)) + return DEVICE; + if ("DeviceComponent".equals(codeString)) + return DEVICECOMPONENT; + if ("DeviceMetric".equals(codeString)) + return DEVICEMETRIC; + if ("DeviceUseRequest".equals(codeString)) + return DEVICEUSEREQUEST; + if ("DeviceUseStatement".equals(codeString)) + return DEVICEUSESTATEMENT; + if ("DiagnosticOrder".equals(codeString)) + return DIAGNOSTICORDER; + if ("DiagnosticReport".equals(codeString)) + return DIAGNOSTICREPORT; + if ("DocumentManifest".equals(codeString)) + return DOCUMENTMANIFEST; + if ("DocumentReference".equals(codeString)) + return DOCUMENTREFERENCE; + if ("DomainResource".equals(codeString)) + return DOMAINRESOURCE; + if ("EligibilityRequest".equals(codeString)) + return ELIGIBILITYREQUEST; + if ("EligibilityResponse".equals(codeString)) + return ELIGIBILITYRESPONSE; + if ("Encounter".equals(codeString)) + return ENCOUNTER; + if ("EnrollmentRequest".equals(codeString)) + return ENROLLMENTREQUEST; + if ("EnrollmentResponse".equals(codeString)) + return ENROLLMENTRESPONSE; + if ("EpisodeOfCare".equals(codeString)) + return EPISODEOFCARE; + if ("ExpansionProfile".equals(codeString)) + return EXPANSIONPROFILE; + if ("ExplanationOfBenefit".equals(codeString)) + return EXPLANATIONOFBENEFIT; + if ("FamilyMemberHistory".equals(codeString)) + return FAMILYMEMBERHISTORY; + if ("Flag".equals(codeString)) + return FLAG; + if ("Goal".equals(codeString)) + return GOAL; + if ("Group".equals(codeString)) + return GROUP; + if ("GuidanceResponse".equals(codeString)) + return GUIDANCERESPONSE; + if ("HealthcareService".equals(codeString)) + return HEALTHCARESERVICE; + if ("ImagingExcerpt".equals(codeString)) + return IMAGINGEXCERPT; + if ("ImagingObjectSelection".equals(codeString)) + return IMAGINGOBJECTSELECTION; + if ("ImagingStudy".equals(codeString)) + return IMAGINGSTUDY; + if ("Immunization".equals(codeString)) + return IMMUNIZATION; + if ("ImmunizationRecommendation".equals(codeString)) + return IMMUNIZATIONRECOMMENDATION; + if ("ImplementationGuide".equals(codeString)) + return IMPLEMENTATIONGUIDE; + if ("Library".equals(codeString)) + return LIBRARY; + if ("Linkage".equals(codeString)) + return LINKAGE; + if ("List".equals(codeString)) + return LIST; + if ("Location".equals(codeString)) + return LOCATION; + if ("Measure".equals(codeString)) + return MEASURE; + if ("MeasureReport".equals(codeString)) + return MEASUREREPORT; + if ("Media".equals(codeString)) + return MEDIA; + if ("Medication".equals(codeString)) + return MEDICATION; + if ("MedicationAdministration".equals(codeString)) + return MEDICATIONADMINISTRATION; + if ("MedicationDispense".equals(codeString)) + return MEDICATIONDISPENSE; + if ("MedicationOrder".equals(codeString)) + return MEDICATIONORDER; + if ("MedicationStatement".equals(codeString)) + return MEDICATIONSTATEMENT; + if ("MessageHeader".equals(codeString)) + return MESSAGEHEADER; + if ("ModuleDefinition".equals(codeString)) + return MODULEDEFINITION; + if ("NamingSystem".equals(codeString)) + return NAMINGSYSTEM; + if ("NutritionOrder".equals(codeString)) + return NUTRITIONORDER; + if ("Observation".equals(codeString)) + return OBSERVATION; + if ("OperationDefinition".equals(codeString)) + return OPERATIONDEFINITION; + if ("OperationOutcome".equals(codeString)) + return OPERATIONOUTCOME; + if ("Order".equals(codeString)) + return ORDER; + if ("OrderResponse".equals(codeString)) + return ORDERRESPONSE; + if ("OrderSet".equals(codeString)) + return ORDERSET; + if ("Organization".equals(codeString)) + return ORGANIZATION; + if ("Parameters".equals(codeString)) + return PARAMETERS; + if ("Patient".equals(codeString)) + return PATIENT; + if ("PaymentNotice".equals(codeString)) + return PAYMENTNOTICE; + if ("PaymentReconciliation".equals(codeString)) + return PAYMENTRECONCILIATION; + if ("Person".equals(codeString)) + return PERSON; + if ("Practitioner".equals(codeString)) + return PRACTITIONER; + if ("PractitionerRole".equals(codeString)) + return PRACTITIONERROLE; + if ("Procedure".equals(codeString)) + return PROCEDURE; + if ("ProcedureRequest".equals(codeString)) + return PROCEDUREREQUEST; + if ("ProcessRequest".equals(codeString)) + return PROCESSREQUEST; + if ("ProcessResponse".equals(codeString)) + return PROCESSRESPONSE; + if ("Protocol".equals(codeString)) + return PROTOCOL; + if ("Provenance".equals(codeString)) + return PROVENANCE; + if ("Questionnaire".equals(codeString)) + return QUESTIONNAIRE; + if ("QuestionnaireResponse".equals(codeString)) + return QUESTIONNAIRERESPONSE; + if ("ReferralRequest".equals(codeString)) + return REFERRALREQUEST; + if ("RelatedPerson".equals(codeString)) + return RELATEDPERSON; + if ("Resource".equals(codeString)) + return RESOURCE; + if ("RiskAssessment".equals(codeString)) + return RISKASSESSMENT; + if ("Schedule".equals(codeString)) + return SCHEDULE; + if ("SearchParameter".equals(codeString)) + return SEARCHPARAMETER; + if ("Sequence".equals(codeString)) + return SEQUENCE; + if ("Slot".equals(codeString)) + return SLOT; + if ("Specimen".equals(codeString)) + return SPECIMEN; + if ("StructureDefinition".equals(codeString)) + return STRUCTUREDEFINITION; + if ("StructureMap".equals(codeString)) + return STRUCTUREMAP; + if ("Subscription".equals(codeString)) + return SUBSCRIPTION; + if ("Substance".equals(codeString)) + return SUBSTANCE; + if ("SupplyDelivery".equals(codeString)) + return SUPPLYDELIVERY; + if ("SupplyRequest".equals(codeString)) + return SUPPLYREQUEST; + if ("Task".equals(codeString)) + return TASK; + if ("TestScript".equals(codeString)) + return TESTSCRIPT; + if ("ValueSet".equals(codeString)) + return VALUESET; + if ("VisionPrescription".equals(codeString)) + return VISIONPRESCRIPTION; + throw new FHIRException("Unknown FHIRDefinedType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case ACTIONDEFINITION: return "ActionDefinition"; + case ADDRESS: return "Address"; + case AGE: return "Age"; + case ANNOTATION: return "Annotation"; + case ATTACHMENT: return "Attachment"; + case BACKBONEELEMENT: return "BackboneElement"; + case CODEABLECONCEPT: return "CodeableConcept"; + case CODING: return "Coding"; + case CONTACTPOINT: return "ContactPoint"; + case COUNT: return "Count"; + case DATAREQUIREMENT: return "DataRequirement"; + case DISTANCE: return "Distance"; + case DURATION: return "Duration"; + case ELEMENT: return "Element"; + case ELEMENTDEFINITION: return "ElementDefinition"; + case EXTENSION: return "Extension"; + case HUMANNAME: return "HumanName"; + case IDENTIFIER: return "Identifier"; + case META: return "Meta"; + case MODULEMETADATA: return "ModuleMetadata"; + case MONEY: return "Money"; + case NARRATIVE: return "Narrative"; + case PARAMETERDEFINITION: return "ParameterDefinition"; + case PERIOD: return "Period"; + case QUANTITY: return "Quantity"; + case RANGE: return "Range"; + case RATIO: return "Ratio"; + case REFERENCE: return "Reference"; + case SAMPLEDDATA: return "SampledData"; + case SIGNATURE: return "Signature"; + case SIMPLEQUANTITY: return "SimpleQuantity"; + case TIMING: return "Timing"; + case TRIGGERDEFINITION: return "TriggerDefinition"; + case BASE64BINARY: return "base64Binary"; + case BOOLEAN: return "boolean"; + case CODE: return "code"; + case DATE: return "date"; + case DATETIME: return "dateTime"; + case DECIMAL: return "decimal"; + case ID: return "id"; + case INSTANT: return "instant"; + case INTEGER: return "integer"; + case MARKDOWN: return "markdown"; + case OID: return "oid"; + case POSITIVEINT: return "positiveInt"; + case STRING: return "string"; + case TIME: return "time"; + case UNSIGNEDINT: return "unsignedInt"; + case URI: return "uri"; + case UUID: return "uuid"; + case XHTML: return "xhtml"; + case ACCOUNT: return "Account"; + case ALLERGYINTOLERANCE: return "AllergyIntolerance"; + case APPOINTMENT: return "Appointment"; + case APPOINTMENTRESPONSE: return "AppointmentResponse"; + case AUDITEVENT: return "AuditEvent"; + case BASIC: return "Basic"; + case BINARY: return "Binary"; + case BODYSITE: return "BodySite"; + case BUNDLE: return "Bundle"; + case CAREPLAN: return "CarePlan"; + case CARETEAM: return "CareTeam"; + case CLAIM: return "Claim"; + case CLAIMRESPONSE: return "ClaimResponse"; + case CLINICALIMPRESSION: return "ClinicalImpression"; + case CODESYSTEM: return "CodeSystem"; + case COMMUNICATION: return "Communication"; + case COMMUNICATIONREQUEST: return "CommunicationRequest"; + case COMPARTMENTDEFINITION: return "CompartmentDefinition"; + case COMPOSITION: return "Composition"; + case CONCEPTMAP: return "ConceptMap"; + case CONDITION: return "Condition"; + case CONFORMANCE: return "Conformance"; + case CONTRACT: return "Contract"; + case COVERAGE: return "Coverage"; + case DATAELEMENT: return "DataElement"; + case DECISIONSUPPORTRULE: return "DecisionSupportRule"; + case DECISIONSUPPORTSERVICEMODULE: return "DecisionSupportServiceModule"; + case DETECTEDISSUE: return "DetectedIssue"; + case DEVICE: return "Device"; + case DEVICECOMPONENT: return "DeviceComponent"; + case DEVICEMETRIC: return "DeviceMetric"; + case DEVICEUSEREQUEST: return "DeviceUseRequest"; + case DEVICEUSESTATEMENT: return "DeviceUseStatement"; + case DIAGNOSTICORDER: return "DiagnosticOrder"; + case DIAGNOSTICREPORT: return "DiagnosticReport"; + case DOCUMENTMANIFEST: return "DocumentManifest"; + case DOCUMENTREFERENCE: return "DocumentReference"; + case DOMAINRESOURCE: return "DomainResource"; + case ELIGIBILITYREQUEST: return "EligibilityRequest"; + case ELIGIBILITYRESPONSE: return "EligibilityResponse"; + case ENCOUNTER: return "Encounter"; + case ENROLLMENTREQUEST: return "EnrollmentRequest"; + case ENROLLMENTRESPONSE: return "EnrollmentResponse"; + case EPISODEOFCARE: return "EpisodeOfCare"; + case EXPANSIONPROFILE: return "ExpansionProfile"; + case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; + case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; + case FLAG: return "Flag"; + case GOAL: return "Goal"; + case GROUP: return "Group"; + case GUIDANCERESPONSE: return "GuidanceResponse"; + case HEALTHCARESERVICE: return "HealthcareService"; + case IMAGINGEXCERPT: return "ImagingExcerpt"; + case IMAGINGOBJECTSELECTION: return "ImagingObjectSelection"; + case IMAGINGSTUDY: return "ImagingStudy"; + case IMMUNIZATION: return "Immunization"; + case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation"; + case IMPLEMENTATIONGUIDE: return "ImplementationGuide"; + case LIBRARY: return "Library"; + case LINKAGE: return "Linkage"; + case LIST: return "List"; + case LOCATION: return "Location"; + case MEASURE: return "Measure"; + case MEASUREREPORT: return "MeasureReport"; + case MEDIA: return "Media"; + case MEDICATION: return "Medication"; + case MEDICATIONADMINISTRATION: return "MedicationAdministration"; + case MEDICATIONDISPENSE: return "MedicationDispense"; + case MEDICATIONORDER: return "MedicationOrder"; + case MEDICATIONSTATEMENT: return "MedicationStatement"; + case MESSAGEHEADER: return "MessageHeader"; + case MODULEDEFINITION: return "ModuleDefinition"; + case NAMINGSYSTEM: return "NamingSystem"; + case NUTRITIONORDER: return "NutritionOrder"; + case OBSERVATION: return "Observation"; + case OPERATIONDEFINITION: return "OperationDefinition"; + case OPERATIONOUTCOME: return "OperationOutcome"; + case ORDER: return "Order"; + case ORDERRESPONSE: return "OrderResponse"; + case ORDERSET: return "OrderSet"; + case ORGANIZATION: return "Organization"; + case PARAMETERS: return "Parameters"; + case PATIENT: return "Patient"; + case PAYMENTNOTICE: return "PaymentNotice"; + case PAYMENTRECONCILIATION: return "PaymentReconciliation"; + case PERSON: return "Person"; + case PRACTITIONER: return "Practitioner"; + case PRACTITIONERROLE: return "PractitionerRole"; + case PROCEDURE: return "Procedure"; + case PROCEDUREREQUEST: return "ProcedureRequest"; + case PROCESSREQUEST: return "ProcessRequest"; + case PROCESSRESPONSE: return "ProcessResponse"; + case PROTOCOL: return "Protocol"; + case PROVENANCE: return "Provenance"; + case QUESTIONNAIRE: return "Questionnaire"; + case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse"; + case REFERRALREQUEST: return "ReferralRequest"; + case RELATEDPERSON: return "RelatedPerson"; + case RESOURCE: return "Resource"; + case RISKASSESSMENT: return "RiskAssessment"; + case SCHEDULE: return "Schedule"; + case SEARCHPARAMETER: return "SearchParameter"; + case SEQUENCE: return "Sequence"; + case SLOT: return "Slot"; + case SPECIMEN: return "Specimen"; + case STRUCTUREDEFINITION: return "StructureDefinition"; + case STRUCTUREMAP: return "StructureMap"; + case SUBSCRIPTION: return "Subscription"; + case SUBSTANCE: return "Substance"; + case SUPPLYDELIVERY: return "SupplyDelivery"; + case SUPPLYREQUEST: return "SupplyRequest"; + case TASK: return "Task"; + case TESTSCRIPT: return "TestScript"; + case VALUESET: return "ValueSet"; + case VISIONPRESCRIPTION: return "VisionPrescription"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case ACTIONDEFINITION: return "http://hl7.org/fhir/data-types"; + case ADDRESS: return "http://hl7.org/fhir/data-types"; + case AGE: return "http://hl7.org/fhir/data-types"; + case ANNOTATION: return "http://hl7.org/fhir/data-types"; + case ATTACHMENT: return "http://hl7.org/fhir/data-types"; + case BACKBONEELEMENT: return "http://hl7.org/fhir/data-types"; + case CODEABLECONCEPT: return "http://hl7.org/fhir/data-types"; + case CODING: return "http://hl7.org/fhir/data-types"; + case CONTACTPOINT: return "http://hl7.org/fhir/data-types"; + case COUNT: return "http://hl7.org/fhir/data-types"; + case DATAREQUIREMENT: return "http://hl7.org/fhir/data-types"; + case DISTANCE: return "http://hl7.org/fhir/data-types"; + case DURATION: return "http://hl7.org/fhir/data-types"; + case ELEMENT: return "http://hl7.org/fhir/data-types"; + case ELEMENTDEFINITION: return "http://hl7.org/fhir/data-types"; + case EXTENSION: return "http://hl7.org/fhir/data-types"; + case HUMANNAME: return "http://hl7.org/fhir/data-types"; + case IDENTIFIER: return "http://hl7.org/fhir/data-types"; + case META: return "http://hl7.org/fhir/data-types"; + case MODULEMETADATA: return "http://hl7.org/fhir/data-types"; + case MONEY: return "http://hl7.org/fhir/data-types"; + case NARRATIVE: return "http://hl7.org/fhir/data-types"; + case PARAMETERDEFINITION: return "http://hl7.org/fhir/data-types"; + case PERIOD: return "http://hl7.org/fhir/data-types"; + case QUANTITY: return "http://hl7.org/fhir/data-types"; + case RANGE: return "http://hl7.org/fhir/data-types"; + case RATIO: return "http://hl7.org/fhir/data-types"; + case REFERENCE: return "http://hl7.org/fhir/data-types"; + case SAMPLEDDATA: return "http://hl7.org/fhir/data-types"; + case SIGNATURE: return "http://hl7.org/fhir/data-types"; + case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types"; + case TIMING: return "http://hl7.org/fhir/data-types"; + case TRIGGERDEFINITION: return "http://hl7.org/fhir/data-types"; + case BASE64BINARY: return "http://hl7.org/fhir/data-types"; + case BOOLEAN: return "http://hl7.org/fhir/data-types"; + case CODE: return "http://hl7.org/fhir/data-types"; + case DATE: return "http://hl7.org/fhir/data-types"; + case DATETIME: return "http://hl7.org/fhir/data-types"; + case DECIMAL: return "http://hl7.org/fhir/data-types"; + case ID: return "http://hl7.org/fhir/data-types"; + case INSTANT: return "http://hl7.org/fhir/data-types"; + case INTEGER: return "http://hl7.org/fhir/data-types"; + case MARKDOWN: return "http://hl7.org/fhir/data-types"; + case OID: return "http://hl7.org/fhir/data-types"; + case POSITIVEINT: return "http://hl7.org/fhir/data-types"; + case STRING: return "http://hl7.org/fhir/data-types"; + case TIME: return "http://hl7.org/fhir/data-types"; + case UNSIGNEDINT: return "http://hl7.org/fhir/data-types"; + case URI: return "http://hl7.org/fhir/data-types"; + case UUID: return "http://hl7.org/fhir/data-types"; + case XHTML: return "http://hl7.org/fhir/data-types"; + case ACCOUNT: return "http://hl7.org/fhir/resource-types"; + case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types"; + case APPOINTMENT: return "http://hl7.org/fhir/resource-types"; + case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types"; + case AUDITEVENT: return "http://hl7.org/fhir/resource-types"; + case BASIC: return "http://hl7.org/fhir/resource-types"; + case BINARY: return "http://hl7.org/fhir/resource-types"; + case BODYSITE: return "http://hl7.org/fhir/resource-types"; + case BUNDLE: return "http://hl7.org/fhir/resource-types"; + case CAREPLAN: return "http://hl7.org/fhir/resource-types"; + case CARETEAM: return "http://hl7.org/fhir/resource-types"; + case CLAIM: return "http://hl7.org/fhir/resource-types"; + case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types"; + case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types"; + case CODESYSTEM: return "http://hl7.org/fhir/resource-types"; + case COMMUNICATION: return "http://hl7.org/fhir/resource-types"; + case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types"; + case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types"; + case COMPOSITION: return "http://hl7.org/fhir/resource-types"; + case CONCEPTMAP: return "http://hl7.org/fhir/resource-types"; + case CONDITION: return "http://hl7.org/fhir/resource-types"; + case CONFORMANCE: return "http://hl7.org/fhir/resource-types"; + case CONTRACT: return "http://hl7.org/fhir/resource-types"; + case COVERAGE: return "http://hl7.org/fhir/resource-types"; + case DATAELEMENT: return "http://hl7.org/fhir/resource-types"; + case DECISIONSUPPORTRULE: return "http://hl7.org/fhir/resource-types"; + case DECISIONSUPPORTSERVICEMODULE: return "http://hl7.org/fhir/resource-types"; + case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types"; + case DEVICE: return "http://hl7.org/fhir/resource-types"; + case DEVICECOMPONENT: return "http://hl7.org/fhir/resource-types"; + case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types"; + case DEVICEUSEREQUEST: return "http://hl7.org/fhir/resource-types"; + case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/resource-types"; + case DIAGNOSTICORDER: return "http://hl7.org/fhir/resource-types"; + case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types"; + case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types"; + case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types"; + case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types"; + case ELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types"; + case ELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types"; + case ENCOUNTER: return "http://hl7.org/fhir/resource-types"; + case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types"; + case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types"; + case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types"; + case EXPANSIONPROFILE: return "http://hl7.org/fhir/resource-types"; + case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types"; + case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types"; + case FLAG: return "http://hl7.org/fhir/resource-types"; + case GOAL: return "http://hl7.org/fhir/resource-types"; + case GROUP: return "http://hl7.org/fhir/resource-types"; + case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types"; + case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types"; + case IMAGINGEXCERPT: return "http://hl7.org/fhir/resource-types"; + case IMAGINGOBJECTSELECTION: return "http://hl7.org/fhir/resource-types"; + case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types"; + case IMMUNIZATION: return "http://hl7.org/fhir/resource-types"; + case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types"; + case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types"; + case LIBRARY: return "http://hl7.org/fhir/resource-types"; + case LINKAGE: return "http://hl7.org/fhir/resource-types"; + case LIST: return "http://hl7.org/fhir/resource-types"; + case LOCATION: return "http://hl7.org/fhir/resource-types"; + case MEASURE: return "http://hl7.org/fhir/resource-types"; + case MEASUREREPORT: return "http://hl7.org/fhir/resource-types"; + case MEDIA: return "http://hl7.org/fhir/resource-types"; + case MEDICATION: return "http://hl7.org/fhir/resource-types"; + case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types"; + case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types"; + case MEDICATIONORDER: return "http://hl7.org/fhir/resource-types"; + case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types"; + case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types"; + case MODULEDEFINITION: return "http://hl7.org/fhir/resource-types"; + case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types"; + case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types"; + case OBSERVATION: return "http://hl7.org/fhir/resource-types"; + case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types"; + case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types"; + case ORDER: return "http://hl7.org/fhir/resource-types"; + case ORDERRESPONSE: return "http://hl7.org/fhir/resource-types"; + case ORDERSET: return "http://hl7.org/fhir/resource-types"; + case ORGANIZATION: return "http://hl7.org/fhir/resource-types"; + case PARAMETERS: return "http://hl7.org/fhir/resource-types"; + case PATIENT: return "http://hl7.org/fhir/resource-types"; + case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types"; + case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types"; + case PERSON: return "http://hl7.org/fhir/resource-types"; + case PRACTITIONER: return "http://hl7.org/fhir/resource-types"; + case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types"; + case PROCEDURE: return "http://hl7.org/fhir/resource-types"; + case PROCEDUREREQUEST: return "http://hl7.org/fhir/resource-types"; + case PROCESSREQUEST: return "http://hl7.org/fhir/resource-types"; + case PROCESSRESPONSE: return "http://hl7.org/fhir/resource-types"; + case PROTOCOL: return "http://hl7.org/fhir/resource-types"; + case PROVENANCE: return "http://hl7.org/fhir/resource-types"; + case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types"; + case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types"; + case REFERRALREQUEST: return "http://hl7.org/fhir/resource-types"; + case RELATEDPERSON: return "http://hl7.org/fhir/resource-types"; + case RESOURCE: return "http://hl7.org/fhir/resource-types"; + case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types"; + case SCHEDULE: return "http://hl7.org/fhir/resource-types"; + case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types"; + case SEQUENCE: return "http://hl7.org/fhir/resource-types"; + case SLOT: return "http://hl7.org/fhir/resource-types"; + case SPECIMEN: return "http://hl7.org/fhir/resource-types"; + case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types"; + case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types"; + case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types"; + case SUBSTANCE: return "http://hl7.org/fhir/resource-types"; + case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types"; + case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types"; + case TASK: return "http://hl7.org/fhir/resource-types"; + case TESTSCRIPT: return "http://hl7.org/fhir/resource-types"; + case VALUESET: return "http://hl7.org/fhir/resource-types"; + case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case ACTIONDEFINITION: return "The definition of an action to be performed. Some aspects of the definition are specified statically, and some aspects can be specified dynamically by referencing logic defined in a library."; + case ADDRESS: return "An address expressed using postal conventions (as opposed to GPS or other location definition formats). This data type may be used to convey addresses for use in delivering mail as well as for visiting locations and which might not be valid for mail delivery. There are a variety of postal address formats defined around the world."; + case AGE: return ""; + case ANNOTATION: return "A text note which also contains information about who made the statement and when."; + case ATTACHMENT: return "For referring to data content defined in other formats."; + case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type."; + case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text."; + case CODING: return "A reference to a code defined by a terminology system."; + case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc."; + case COUNT: return ""; + case DATAREQUIREMENT: return "Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data."; + case DISTANCE: return ""; + case DURATION: return ""; + case ELEMENT: return "Base definition for all elements in a resource."; + case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension."; + case EXTENSION: return "Optional Extensions Element - found in all resources."; + case HUMANNAME: return "A human's name with the ability to identify parts and usage."; + case IDENTIFIER: return "A technical identifier - identifies some entity uniquely and unambiguously."; + case META: return "The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource."; + case MODULEMETADATA: return "The ModuleMetadata structure defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information."; + case MONEY: return ""; + case NARRATIVE: return "A human-readable formatted text, including images."; + case PARAMETERDEFINITION: return "The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse."; + case PERIOD: return "A time period defined by a start and end date and optionally time."; + case QUANTITY: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies."; + case RANGE: return "A set of ordered Quantities defined by a low and high limit."; + case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator."; + case REFERENCE: return "A reference from one resource to another."; + case SAMPLEDDATA: return "A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data."; + case SIGNATURE: return "A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities."; + case SIMPLEQUANTITY: return ""; + case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds."; + case TRIGGERDEFINITION: return "A description of a triggering event."; + case BASE64BINARY: return "A stream of bytes"; + case BOOLEAN: return "Value of \"true\" or \"false\""; + case CODE: return "A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents"; + case DATE: return "A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date. Dates SHALL be valid dates."; + case DATETIME: return "A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates."; + case DECIMAL: return "A rational number with implicit precision"; + case ID: return "Any combination of letters, numerals, \"-\" and \".\", with a length limit of 64 characters. (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.) Ids are case-insensitive."; + case INSTANT: return "An instant in time - known at least to the second"; + case INTEGER: return "A whole number"; + case MARKDOWN: return "A string that may contain markdown syntax for optional processing by a mark down presentation engine"; + case OID: return "An oid represented as a URI"; + case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)"; + case STRING: return "A sequence of Unicode characters"; + case TIME: return "A time during the day, with no date specified"; + case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)"; + case URI: return "String of characters used to identify a name or a resource"; + case UUID: return "A UUID, represented as a URI"; + case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)"; + case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centres, etc."; + case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance."; + case APPOINTMENT: return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s)."; + case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection."; + case AUDITEVENT: return "A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage."; + case BASIC: return "Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification."; + case BINARY: return "A binary resource can contain any content, whether text, image, pdf, zip archive, etc."; + case BODYSITE: return "Record details about the anatomical location of a specimen or body part. This resource may be used when a coded concept does not provide the necessary detail needed for the use case."; + case BUNDLE: return "A container for a collection of resources."; + case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions."; + case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient."; + case CLAIM: return "A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery."; + case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource."; + case CLINICALIMPRESSION: return "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score."; + case CODESYSTEM: return "A code system resource specifies a set of codes drawn from one or more code systems."; + case COMMUNICATION: return "An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition."; + case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition."; + case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server."; + case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained."; + case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models."; + case CONDITION: return "Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a diagnosis during an encounter; populating a problem list or a summary statement, such as a discharge summary."; + case CONFORMANCE: return "A conformance statement is a set of capabilities of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation."; + case CONTRACT: return "A formal agreement between parties regarding the conduct of business, exchange of information or other matters."; + case COVERAGE: return "Financial instrument which may be used to pay for or reimburse health care products and services."; + case DATAELEMENT: return "The formal description of a single piece of information that can be gathered and reported."; + case DECISIONSUPPORTRULE: return "This resource defines a decision support rule of the form [on Event] if Condition then Action. It is intended to be a shareable, computable definition of a actions that should be taken whenever some condition is met in response to a particular event or events."; + case DECISIONSUPPORTSERVICEMODULE: return "The DecisionSupportServiceModule describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking."; + case DETECTEDISSUE: return "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc."; + case DEVICE: return "This resource identifies an instance or a type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc."; + case DEVICECOMPONENT: return "Describes the characteristics, operational status and capabilities of a medical-related component of a medical device."; + case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device."; + case DEVICEUSEREQUEST: return "Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker."; + case DEVICEUSESTATEMENT: return "A record of a device being used by a patient where the record is the result of a report from the patient or another clinician."; + case DIAGNOSTICORDER: return "A record of a request for a diagnostic investigation service to be performed."; + case DIAGNOSTICREPORT: return "The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports."; + case DOCUMENTMANIFEST: return "A manifest that defines a set of documents."; + case DOCUMENTREFERENCE: return "A reference to a document ."; + case DOMAINRESOURCE: return "--- Abstract Type! ---A resource that includes narrative, extensions, and contained resources."; + case ELIGIBILITYREQUEST: return "This resource provides the insurance eligibility details from the insurer regarding a specified coverage and optionally some class of service."; + case ELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an Eligibility resource."; + case ENCOUNTER: return "An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient."; + case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage."; + case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an Enrollment resource."; + case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time."; + case EXPANSIONPROFILE: return "Resource to define constraints on the Expansion of a FHIR ValueSet."; + case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided."; + case FAMILYMEMBERHISTORY: return "Significant health events and conditions for a person related to the patient relevant in the context of care for the patient."; + case FLAG: return "Prospective warnings of potential issues when providing care to the patient."; + case GOAL: return "Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc."; + case GROUP: return "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization."; + case GUIDANCERESPONSE: return "A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken."; + case HEALTHCARESERVICE: return "The details of a healthcare service available at a location."; + case IMAGINGEXCERPT: return "A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingExcerpt resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance (\"cine\" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on."; + case IMAGINGOBJECTSELECTION: return "A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance (\"cine\" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on."; + case IMAGINGSTUDY: return "Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities."; + case IMMUNIZATION: return "Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed."; + case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification."; + case IMPLEMENTATIONGUIDE: return "A set of rules or how FHIR is used to solve a particular problem. This resource is used to gather all the parts of an implementation guide into a logical whole, and to publish a computable definition of all the parts."; + case LIBRARY: return "The Library resource provides a representation container for knowledge artifact component definitions. It is effectively an exposure of the header information for a CQL/ELM library."; + case LINKAGE: return "Identifies two or more records (resource instances) that are referring to the same real-world \"occurrence\"."; + case LIST: return "A set of information summarized from a list of other resources."; + case LOCATION: return "Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated."; + case MEASURE: return "The Measure resource provides the definition of a quality measure."; + case MEASUREREPORT: return "The MeasureReport resource contains the results of evaluating a measure."; + case MEDIA: return "A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference."; + case MEDICATION: return "This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication."; + case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner."; + case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order."; + case MEDICATIONORDER: return "An order for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationOrder\" rather than \"MedicationPrescription\" to generalize the use across inpatient and outpatient settings as well as for care plans, etc."; + case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from e.g. the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains \r\rThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information."; + case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle."; + case MODULEDEFINITION: return "The ModuleDefinition resource defines the data requirements for a quality artifact."; + case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a \"System\" used within the Identifier and Coding data types."; + case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident."; + case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject."; + case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction)."; + case OPERATIONOUTCOME: return "A collection of error, warning or information messages that result from a system action."; + case ORDER: return "A request to perform an action."; + case ORDERRESPONSE: return "A response to an order."; + case ORDERSET: return "This resource allows for the definition of an order set as a sharable, consumable, and executable artifact in support of clinical decision support."; + case ORGANIZATION: return "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc."; + case PARAMETERS: return "This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it."; + case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services."; + case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references."; + case PAYMENTRECONCILIATION: return "This resource provides payment details and claim references supporting a bulk payment."; + case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context."; + case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare."; + case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time."; + case PROCEDURE: return "An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy."; + case PROCEDUREREQUEST: return "A request for a procedure to be performed. May be a proposal or an order."; + case PROCESSREQUEST: return "This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources."; + case PROCESSRESPONSE: return "This resource provides processing status, errors and notes from the processing of a resource."; + case PROTOCOL: return "A definition of behaviors to be taken in particular circumstances, often including conditions, options and other decision points."; + case PROVENANCE: return "Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies."; + case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions."; + case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions."; + case REFERRALREQUEST: return "Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization."; + case RELATEDPERSON: return "Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process."; + case RESOURCE: return "--- Abstract Type! ---This is the base resource type for everything."; + case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome."; + case SCHEDULE: return "A container for slot(s) of time that may be available for booking appointments."; + case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource."; + case SEQUENCE: return "Variation and Sequence data."; + case SLOT: return "A slot of time on a schedule that may be available for booking appointments."; + case SPECIMEN: return "A sample to be used for analysis."; + case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions, and constraints on resources and data types."; + case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data."; + case SUBSCRIPTION: return "The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system is able to take an appropriate action."; + case SUBSTANCE: return "A homogeneous material with a definite composition."; + case SUPPLYDELIVERY: return "Record of delivery of what is supplied."; + case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting."; + case TASK: return "A task to be performed."; + case TESTSCRIPT: return "TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification."; + case VALUESET: return "A value set specifies a set of codes drawn from one or more code systems."; + case VISIONPRESCRIPTION: return "An authorization for the supply of glasses and/or contact lenses to a patient."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case ACTIONDEFINITION: return "ActionDefinition"; + case ADDRESS: return "Address"; + case AGE: return "Age"; + case ANNOTATION: return "Annotation"; + case ATTACHMENT: return "Attachment"; + case BACKBONEELEMENT: return "BackboneElement"; + case CODEABLECONCEPT: return "CodeableConcept"; + case CODING: return "Coding"; + case CONTACTPOINT: return "ContactPoint"; + case COUNT: return "Count"; + case DATAREQUIREMENT: return "DataRequirement"; + case DISTANCE: return "Distance"; + case DURATION: return "Duration"; + case ELEMENT: return "Element"; + case ELEMENTDEFINITION: return "ElementDefinition"; + case EXTENSION: return "Extension"; + case HUMANNAME: return "HumanName"; + case IDENTIFIER: return "Identifier"; + case META: return "Meta"; + case MODULEMETADATA: return "ModuleMetadata"; + case MONEY: return "Money"; + case NARRATIVE: return "Narrative"; + case PARAMETERDEFINITION: return "ParameterDefinition"; + case PERIOD: return "Period"; + case QUANTITY: return "Quantity"; + case RANGE: return "Range"; + case RATIO: return "Ratio"; + case REFERENCE: return "Reference"; + case SAMPLEDDATA: return "SampledData"; + case SIGNATURE: return "Signature"; + case SIMPLEQUANTITY: return "SimpleQuantity"; + case TIMING: return "Timing"; + case TRIGGERDEFINITION: return "TriggerDefinition"; + case BASE64BINARY: return "base64Binary"; + case BOOLEAN: return "boolean"; + case CODE: return "code"; + case DATE: return "date"; + case DATETIME: return "dateTime"; + case DECIMAL: return "decimal"; + case ID: return "id"; + case INSTANT: return "instant"; + case INTEGER: return "integer"; + case MARKDOWN: return "markdown"; + case OID: return "oid"; + case POSITIVEINT: return "positiveInt"; + case STRING: return "string"; + case TIME: return "time"; + case UNSIGNEDINT: return "unsignedInt"; + case URI: return "uri"; + case UUID: return "uuid"; + case XHTML: return "XHTML"; + case ACCOUNT: return "Account"; + case ALLERGYINTOLERANCE: return "AllergyIntolerance"; + case APPOINTMENT: return "Appointment"; + case APPOINTMENTRESPONSE: return "AppointmentResponse"; + case AUDITEVENT: return "AuditEvent"; + case BASIC: return "Basic"; + case BINARY: return "Binary"; + case BODYSITE: return "BodySite"; + case BUNDLE: return "Bundle"; + case CAREPLAN: return "CarePlan"; + case CARETEAM: return "CareTeam"; + case CLAIM: return "Claim"; + case CLAIMRESPONSE: return "ClaimResponse"; + case CLINICALIMPRESSION: return "ClinicalImpression"; + case CODESYSTEM: return "CodeSystem"; + case COMMUNICATION: return "Communication"; + case COMMUNICATIONREQUEST: return "CommunicationRequest"; + case COMPARTMENTDEFINITION: return "CompartmentDefinition"; + case COMPOSITION: return "Composition"; + case CONCEPTMAP: return "ConceptMap"; + case CONDITION: return "Condition"; + case CONFORMANCE: return "Conformance"; + case CONTRACT: return "Contract"; + case COVERAGE: return "Coverage"; + case DATAELEMENT: return "DataElement"; + case DECISIONSUPPORTRULE: return "DecisionSupportRule"; + case DECISIONSUPPORTSERVICEMODULE: return "DecisionSupportServiceModule"; + case DETECTEDISSUE: return "DetectedIssue"; + case DEVICE: return "Device"; + case DEVICECOMPONENT: return "DeviceComponent"; + case DEVICEMETRIC: return "DeviceMetric"; + case DEVICEUSEREQUEST: return "DeviceUseRequest"; + case DEVICEUSESTATEMENT: return "DeviceUseStatement"; + case DIAGNOSTICORDER: return "DiagnosticOrder"; + case DIAGNOSTICREPORT: return "DiagnosticReport"; + case DOCUMENTMANIFEST: return "DocumentManifest"; + case DOCUMENTREFERENCE: return "DocumentReference"; + case DOMAINRESOURCE: return "DomainResource"; + case ELIGIBILITYREQUEST: return "EligibilityRequest"; + case ELIGIBILITYRESPONSE: return "EligibilityResponse"; + case ENCOUNTER: return "Encounter"; + case ENROLLMENTREQUEST: return "EnrollmentRequest"; + case ENROLLMENTRESPONSE: return "EnrollmentResponse"; + case EPISODEOFCARE: return "EpisodeOfCare"; + case EXPANSIONPROFILE: return "ExpansionProfile"; + case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit"; + case FAMILYMEMBERHISTORY: return "FamilyMemberHistory"; + case FLAG: return "Flag"; + case GOAL: return "Goal"; + case GROUP: return "Group"; + case GUIDANCERESPONSE: return "GuidanceResponse"; + case HEALTHCARESERVICE: return "HealthcareService"; + case IMAGINGEXCERPT: return "ImagingExcerpt"; + case IMAGINGOBJECTSELECTION: return "ImagingObjectSelection"; + case IMAGINGSTUDY: return "ImagingStudy"; + case IMMUNIZATION: return "Immunization"; + case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation"; + case IMPLEMENTATIONGUIDE: return "ImplementationGuide"; + case LIBRARY: return "Library"; + case LINKAGE: return "Linkage"; + case LIST: return "List"; + case LOCATION: return "Location"; + case MEASURE: return "Measure"; + case MEASUREREPORT: return "MeasureReport"; + case MEDIA: return "Media"; + case MEDICATION: return "Medication"; + case MEDICATIONADMINISTRATION: return "MedicationAdministration"; + case MEDICATIONDISPENSE: return "MedicationDispense"; + case MEDICATIONORDER: return "MedicationOrder"; + case MEDICATIONSTATEMENT: return "MedicationStatement"; + case MESSAGEHEADER: return "MessageHeader"; + case MODULEDEFINITION: return "ModuleDefinition"; + case NAMINGSYSTEM: return "NamingSystem"; + case NUTRITIONORDER: return "NutritionOrder"; + case OBSERVATION: return "Observation"; + case OPERATIONDEFINITION: return "OperationDefinition"; + case OPERATIONOUTCOME: return "OperationOutcome"; + case ORDER: return "Order"; + case ORDERRESPONSE: return "OrderResponse"; + case ORDERSET: return "OrderSet"; + case ORGANIZATION: return "Organization"; + case PARAMETERS: return "Parameters"; + case PATIENT: return "Patient"; + case PAYMENTNOTICE: return "PaymentNotice"; + case PAYMENTRECONCILIATION: return "PaymentReconciliation"; + case PERSON: return "Person"; + case PRACTITIONER: return "Practitioner"; + case PRACTITIONERROLE: return "PractitionerRole"; + case PROCEDURE: return "Procedure"; + case PROCEDUREREQUEST: return "ProcedureRequest"; + case PROCESSREQUEST: return "ProcessRequest"; + case PROCESSRESPONSE: return "ProcessResponse"; + case PROTOCOL: return "Protocol"; + case PROVENANCE: return "Provenance"; + case QUESTIONNAIRE: return "Questionnaire"; + case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse"; + case REFERRALREQUEST: return "ReferralRequest"; + case RELATEDPERSON: return "RelatedPerson"; + case RESOURCE: return "Resource"; + case RISKASSESSMENT: return "RiskAssessment"; + case SCHEDULE: return "Schedule"; + case SEARCHPARAMETER: return "SearchParameter"; + case SEQUENCE: return "Sequence"; + case SLOT: return "Slot"; + case SPECIMEN: return "Specimen"; + case STRUCTUREDEFINITION: return "StructureDefinition"; + case STRUCTUREMAP: return "StructureMap"; + case SUBSCRIPTION: return "Subscription"; + case SUBSTANCE: return "Substance"; + case SUPPLYDELIVERY: return "SupplyDelivery"; + case SUPPLYREQUEST: return "SupplyRequest"; + case TASK: return "Task"; case TESTSCRIPT: return "TestScript"; case VALUESET: return "ValueSet"; case VISIONPRESCRIPTION: return "VisionPrescription"; @@ -3427,6 +6448,8 @@ public class Enumerations { if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString)) return null; + if ("ActionDefinition".equals(codeString)) + return FHIRDefinedType.ACTIONDEFINITION; if ("Address".equals(codeString)) return FHIRDefinedType.ADDRESS; if ("Age".equals(codeString)) @@ -3445,6 +6468,8 @@ public class Enumerations { return FHIRDefinedType.CONTACTPOINT; if ("Count".equals(codeString)) return FHIRDefinedType.COUNT; + if ("DataRequirement".equals(codeString)) + return FHIRDefinedType.DATAREQUIREMENT; if ("Distance".equals(codeString)) return FHIRDefinedType.DISTANCE; if ("Duration".equals(codeString)) @@ -3461,10 +6486,14 @@ public class Enumerations { return FHIRDefinedType.IDENTIFIER; if ("Meta".equals(codeString)) return FHIRDefinedType.META; + if ("ModuleMetadata".equals(codeString)) + return FHIRDefinedType.MODULEMETADATA; if ("Money".equals(codeString)) return FHIRDefinedType.MONEY; if ("Narrative".equals(codeString)) return FHIRDefinedType.NARRATIVE; + if ("ParameterDefinition".equals(codeString)) + return FHIRDefinedType.PARAMETERDEFINITION; if ("Period".equals(codeString)) return FHIRDefinedType.PERIOD; if ("Quantity".equals(codeString)) @@ -3483,6 +6512,8 @@ public class Enumerations { return FHIRDefinedType.SIMPLEQUANTITY; if ("Timing".equals(codeString)) return FHIRDefinedType.TIMING; + if ("TriggerDefinition".equals(codeString)) + return FHIRDefinedType.TRIGGERDEFINITION; if ("base64Binary".equals(codeString)) return FHIRDefinedType.BASE64BINARY; if ("boolean".equals(codeString)) @@ -3539,6 +6570,8 @@ public class Enumerations { return FHIRDefinedType.BUNDLE; if ("CarePlan".equals(codeString)) return FHIRDefinedType.CAREPLAN; + if ("CareTeam".equals(codeString)) + return FHIRDefinedType.CARETEAM; if ("Claim".equals(codeString)) return FHIRDefinedType.CLAIM; if ("ClaimResponse".equals(codeString)) @@ -3551,6 +6584,8 @@ public class Enumerations { return FHIRDefinedType.COMMUNICATION; if ("CommunicationRequest".equals(codeString)) return FHIRDefinedType.COMMUNICATIONREQUEST; + if ("CompartmentDefinition".equals(codeString)) + return FHIRDefinedType.COMPARTMENTDEFINITION; if ("Composition".equals(codeString)) return FHIRDefinedType.COMPOSITION; if ("ConceptMap".equals(codeString)) @@ -3619,6 +6654,8 @@ public class Enumerations { return FHIRDefinedType.GUIDANCERESPONSE; if ("HealthcareService".equals(codeString)) return FHIRDefinedType.HEALTHCARESERVICE; + if ("ImagingExcerpt".equals(codeString)) + return FHIRDefinedType.IMAGINGEXCERPT; if ("ImagingObjectSelection".equals(codeString)) return FHIRDefinedType.IMAGINGOBJECTSELECTION; if ("ImagingStudy".equals(codeString)) @@ -3639,6 +6676,8 @@ public class Enumerations { return FHIRDefinedType.LOCATION; if ("Measure".equals(codeString)) return FHIRDefinedType.MEASURE; + if ("MeasureReport".equals(codeString)) + return FHIRDefinedType.MEASUREREPORT; if ("Media".equals(codeString)) return FHIRDefinedType.MEDIA; if ("Medication".equals(codeString)) @@ -3655,8 +6694,6 @@ public class Enumerations { return FHIRDefinedType.MESSAGEHEADER; if ("ModuleDefinition".equals(codeString)) return FHIRDefinedType.MODULEDEFINITION; - if ("ModuleMetadata".equals(codeString)) - return FHIRDefinedType.MODULEMETADATA; if ("NamingSystem".equals(codeString)) return FHIRDefinedType.NAMINGSYSTEM; if ("NutritionOrder".equals(codeString)) @@ -3687,6 +6724,8 @@ public class Enumerations { return FHIRDefinedType.PERSON; if ("Practitioner".equals(codeString)) return FHIRDefinedType.PRACTITIONER; + if ("PractitionerRole".equals(codeString)) + return FHIRDefinedType.PRACTITIONERROLE; if ("Procedure".equals(codeString)) return FHIRDefinedType.PROCEDURE; if ("ProcedureRequest".equals(codeString)) @@ -3723,6 +6762,8 @@ public class Enumerations { return FHIRDefinedType.SPECIMEN; if ("StructureDefinition".equals(codeString)) return FHIRDefinedType.STRUCTUREDEFINITION; + if ("StructureMap".equals(codeString)) + return FHIRDefinedType.STRUCTUREMAP; if ("Subscription".equals(codeString)) return FHIRDefinedType.SUBSCRIPTION; if ("Substance".equals(codeString)) @@ -3731,6 +6772,8 @@ public class Enumerations { return FHIRDefinedType.SUPPLYDELIVERY; if ("SupplyRequest".equals(codeString)) return FHIRDefinedType.SUPPLYREQUEST; + if ("Task".equals(codeString)) + return FHIRDefinedType.TASK; if ("TestScript".equals(codeString)) return FHIRDefinedType.TESTSCRIPT; if ("ValueSet".equals(codeString)) @@ -3745,6 +6788,8 @@ public class Enumerations { String codeString = ((PrimitiveType) code).asStringValue(); if (codeString == null || "".equals(codeString)) return null; + if ("ActionDefinition".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.ACTIONDEFINITION); if ("Address".equals(codeString)) return new Enumeration(this, FHIRDefinedType.ADDRESS); if ("Age".equals(codeString)) @@ -3763,6 +6808,8 @@ public class Enumerations { return new Enumeration(this, FHIRDefinedType.CONTACTPOINT); if ("Count".equals(codeString)) return new Enumeration(this, FHIRDefinedType.COUNT); + if ("DataRequirement".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.DATAREQUIREMENT); if ("Distance".equals(codeString)) return new Enumeration(this, FHIRDefinedType.DISTANCE); if ("Duration".equals(codeString)) @@ -3779,10 +6826,14 @@ public class Enumerations { return new Enumeration(this, FHIRDefinedType.IDENTIFIER); if ("Meta".equals(codeString)) return new Enumeration(this, FHIRDefinedType.META); + if ("ModuleMetadata".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.MODULEMETADATA); if ("Money".equals(codeString)) return new Enumeration(this, FHIRDefinedType.MONEY); if ("Narrative".equals(codeString)) return new Enumeration(this, FHIRDefinedType.NARRATIVE); + if ("ParameterDefinition".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.PARAMETERDEFINITION); if ("Period".equals(codeString)) return new Enumeration(this, FHIRDefinedType.PERIOD); if ("Quantity".equals(codeString)) @@ -3801,6 +6852,8 @@ public class Enumerations { return new Enumeration(this, FHIRDefinedType.SIMPLEQUANTITY); if ("Timing".equals(codeString)) return new Enumeration(this, FHIRDefinedType.TIMING); + if ("TriggerDefinition".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.TRIGGERDEFINITION); if ("base64Binary".equals(codeString)) return new Enumeration(this, FHIRDefinedType.BASE64BINARY); if ("boolean".equals(codeString)) @@ -3857,6 +6910,8 @@ public class Enumerations { return new Enumeration(this, FHIRDefinedType.BUNDLE); if ("CarePlan".equals(codeString)) return new Enumeration(this, FHIRDefinedType.CAREPLAN); + if ("CareTeam".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.CARETEAM); if ("Claim".equals(codeString)) return new Enumeration(this, FHIRDefinedType.CLAIM); if ("ClaimResponse".equals(codeString)) @@ -3869,6 +6924,8 @@ public class Enumerations { return new Enumeration(this, FHIRDefinedType.COMMUNICATION); if ("CommunicationRequest".equals(codeString)) return new Enumeration(this, FHIRDefinedType.COMMUNICATIONREQUEST); + if ("CompartmentDefinition".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.COMPARTMENTDEFINITION); if ("Composition".equals(codeString)) return new Enumeration(this, FHIRDefinedType.COMPOSITION); if ("ConceptMap".equals(codeString)) @@ -3937,6 +6994,8 @@ public class Enumerations { return new Enumeration(this, FHIRDefinedType.GUIDANCERESPONSE); if ("HealthcareService".equals(codeString)) return new Enumeration(this, FHIRDefinedType.HEALTHCARESERVICE); + if ("ImagingExcerpt".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.IMAGINGEXCERPT); if ("ImagingObjectSelection".equals(codeString)) return new Enumeration(this, FHIRDefinedType.IMAGINGOBJECTSELECTION); if ("ImagingStudy".equals(codeString)) @@ -3957,6 +7016,8 @@ public class Enumerations { return new Enumeration(this, FHIRDefinedType.LOCATION); if ("Measure".equals(codeString)) return new Enumeration(this, FHIRDefinedType.MEASURE); + if ("MeasureReport".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.MEASUREREPORT); if ("Media".equals(codeString)) return new Enumeration(this, FHIRDefinedType.MEDIA); if ("Medication".equals(codeString)) @@ -3973,8 +7034,6 @@ public class Enumerations { return new Enumeration(this, FHIRDefinedType.MESSAGEHEADER); if ("ModuleDefinition".equals(codeString)) return new Enumeration(this, FHIRDefinedType.MODULEDEFINITION); - if ("ModuleMetadata".equals(codeString)) - return new Enumeration(this, FHIRDefinedType.MODULEMETADATA); if ("NamingSystem".equals(codeString)) return new Enumeration(this, FHIRDefinedType.NAMINGSYSTEM); if ("NutritionOrder".equals(codeString)) @@ -4005,6 +7064,8 @@ public class Enumerations { return new Enumeration(this, FHIRDefinedType.PERSON); if ("Practitioner".equals(codeString)) return new Enumeration(this, FHIRDefinedType.PRACTITIONER); + if ("PractitionerRole".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.PRACTITIONERROLE); if ("Procedure".equals(codeString)) return new Enumeration(this, FHIRDefinedType.PROCEDURE); if ("ProcedureRequest".equals(codeString)) @@ -4041,6 +7102,8 @@ public class Enumerations { return new Enumeration(this, FHIRDefinedType.SPECIMEN); if ("StructureDefinition".equals(codeString)) return new Enumeration(this, FHIRDefinedType.STRUCTUREDEFINITION); + if ("StructureMap".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.STRUCTUREMAP); if ("Subscription".equals(codeString)) return new Enumeration(this, FHIRDefinedType.SUBSCRIPTION); if ("Substance".equals(codeString)) @@ -4049,6 +7112,8 @@ public class Enumerations { return new Enumeration(this, FHIRDefinedType.SUPPLYDELIVERY); if ("SupplyRequest".equals(codeString)) return new Enumeration(this, FHIRDefinedType.SUPPLYREQUEST); + if ("Task".equals(codeString)) + return new Enumeration(this, FHIRDefinedType.TASK); if ("TestScript".equals(codeString)) return new Enumeration(this, FHIRDefinedType.TESTSCRIPT); if ("ValueSet".equals(codeString)) @@ -4058,6 +7123,8 @@ public class Enumerations { throw new FHIRException("Unknown FHIRDefinedType code '"+codeString+"'"); } public String toCode(FHIRDefinedType code) { + if (code == FHIRDefinedType.ACTIONDEFINITION) + return "ActionDefinition"; if (code == FHIRDefinedType.ADDRESS) return "Address"; if (code == FHIRDefinedType.AGE) @@ -4076,6 +7143,8 @@ public class Enumerations { return "ContactPoint"; if (code == FHIRDefinedType.COUNT) return "Count"; + if (code == FHIRDefinedType.DATAREQUIREMENT) + return "DataRequirement"; if (code == FHIRDefinedType.DISTANCE) return "Distance"; if (code == FHIRDefinedType.DURATION) @@ -4092,10 +7161,14 @@ public class Enumerations { return "Identifier"; if (code == FHIRDefinedType.META) return "Meta"; + if (code == FHIRDefinedType.MODULEMETADATA) + return "ModuleMetadata"; if (code == FHIRDefinedType.MONEY) return "Money"; if (code == FHIRDefinedType.NARRATIVE) return "Narrative"; + if (code == FHIRDefinedType.PARAMETERDEFINITION) + return "ParameterDefinition"; if (code == FHIRDefinedType.PERIOD) return "Period"; if (code == FHIRDefinedType.QUANTITY) @@ -4114,6 +7187,8 @@ public class Enumerations { return "SimpleQuantity"; if (code == FHIRDefinedType.TIMING) return "Timing"; + if (code == FHIRDefinedType.TRIGGERDEFINITION) + return "TriggerDefinition"; if (code == FHIRDefinedType.BASE64BINARY) return "base64Binary"; if (code == FHIRDefinedType.BOOLEAN) @@ -4170,6 +7245,8 @@ public class Enumerations { return "Bundle"; if (code == FHIRDefinedType.CAREPLAN) return "CarePlan"; + if (code == FHIRDefinedType.CARETEAM) + return "CareTeam"; if (code == FHIRDefinedType.CLAIM) return "Claim"; if (code == FHIRDefinedType.CLAIMRESPONSE) @@ -4182,6 +7259,8 @@ public class Enumerations { return "Communication"; if (code == FHIRDefinedType.COMMUNICATIONREQUEST) return "CommunicationRequest"; + if (code == FHIRDefinedType.COMPARTMENTDEFINITION) + return "CompartmentDefinition"; if (code == FHIRDefinedType.COMPOSITION) return "Composition"; if (code == FHIRDefinedType.CONCEPTMAP) @@ -4250,6 +7329,8 @@ public class Enumerations { return "GuidanceResponse"; if (code == FHIRDefinedType.HEALTHCARESERVICE) return "HealthcareService"; + if (code == FHIRDefinedType.IMAGINGEXCERPT) + return "ImagingExcerpt"; if (code == FHIRDefinedType.IMAGINGOBJECTSELECTION) return "ImagingObjectSelection"; if (code == FHIRDefinedType.IMAGINGSTUDY) @@ -4270,6 +7351,8 @@ public class Enumerations { return "Location"; if (code == FHIRDefinedType.MEASURE) return "Measure"; + if (code == FHIRDefinedType.MEASUREREPORT) + return "MeasureReport"; if (code == FHIRDefinedType.MEDIA) return "Media"; if (code == FHIRDefinedType.MEDICATION) @@ -4286,8 +7369,6 @@ public class Enumerations { return "MessageHeader"; if (code == FHIRDefinedType.MODULEDEFINITION) return "ModuleDefinition"; - if (code == FHIRDefinedType.MODULEMETADATA) - return "ModuleMetadata"; if (code == FHIRDefinedType.NAMINGSYSTEM) return "NamingSystem"; if (code == FHIRDefinedType.NUTRITIONORDER) @@ -4318,6 +7399,8 @@ public class Enumerations { return "Person"; if (code == FHIRDefinedType.PRACTITIONER) return "Practitioner"; + if (code == FHIRDefinedType.PRACTITIONERROLE) + return "PractitionerRole"; if (code == FHIRDefinedType.PROCEDURE) return "Procedure"; if (code == FHIRDefinedType.PROCEDUREREQUEST) @@ -4354,6 +7437,8 @@ public class Enumerations { return "Specimen"; if (code == FHIRDefinedType.STRUCTUREDEFINITION) return "StructureDefinition"; + if (code == FHIRDefinedType.STRUCTUREMAP) + return "StructureMap"; if (code == FHIRDefinedType.SUBSCRIPTION) return "Subscription"; if (code == FHIRDefinedType.SUBSTANCE) @@ -4362,6 +7447,8 @@ public class Enumerations { return "SupplyDelivery"; if (code == FHIRDefinedType.SUPPLYREQUEST) return "SupplyRequest"; + if (code == FHIRDefinedType.TASK) + return "Task"; if (code == FHIRDefinedType.TESTSCRIPT) return "TestScript"; if (code == FHIRDefinedType.VALUESET) @@ -4837,6 +7924,10 @@ public class Enumerations { * Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions. */ CAREPLAN, + /** + * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient. + */ + CARETEAM, /** * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery. */ @@ -4850,7 +7941,7 @@ public class Enumerations { */ CLINICALIMPRESSION, /** - * A code system specifies a set of codes drawn from one or more code systems. + * A code system resource specifies a set of codes drawn from one or more code systems. */ CODESYSTEM, /** @@ -4861,6 +7952,10 @@ public class Enumerations { * A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition. */ COMMUNICATIONREQUEST, + /** + * A compartment definition that defines how resources are accessed on a server. + */ + COMPARTMENTDEFINITION, /** * A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained. */ @@ -4890,11 +7985,11 @@ public class Enumerations { */ DATAELEMENT, /** - * This resource defines a decision support rule of the form [on Event] if Condition then Action. + * This resource defines a decision support rule of the form [on Event] if Condition then Action. It is intended to be a shareable, computable definition of a actions that should be taken whenever some condition is met in response to a particular event or events. */ DECISIONSUPPORTRULE, /** - * The DecisionSupportServiceModule resource describes decision support functionality that is available as a service. + * The DecisionSupportServiceModule describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking. */ DECISIONSUPPORTSERVICEMODULE, /** @@ -4902,7 +7997,7 @@ public class Enumerations { */ DETECTEDISSUE, /** - * This resource identifies an instance of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc. + * This resource identifies an instance or a type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc. */ DEVICE, /** @@ -4990,13 +8085,17 @@ public class Enumerations { */ GROUP, /** - * A guidance response is the formal response to a previous guidance request. It is a derivative of the knowledge response that provides additional information relevant specifically to clinical decision support such as a description of any proposed actions to be taken. + * A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken. */ GUIDANCERESPONSE, /** * The details of a healthcare service available at a location. */ HEALTHCARESERVICE, + /** + * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingExcerpt resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on. + */ + IMAGINGEXCERPT, /** * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on. */ @@ -5037,6 +8136,10 @@ public class Enumerations { * The Measure resource provides the definition of a quality measure. */ MEASURE, + /** + * The MeasureReport resource contains the results of evaluating a measure. + */ + MEASUREREPORT, /** * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference. */ @@ -5069,10 +8172,6 @@ public class Enumerations { * The ModuleDefinition resource defines the data requirements for a quality artifact. */ MODULEDEFINITION, - /** - * The ModuleMetadata resource defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information. - */ - MODULEMETADATA, /** * A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a "System" used within the Identifier and Coding data types. */ @@ -5133,6 +8232,10 @@ public class Enumerations { * A person who is directly or indirectly involved in the provisioning of healthcare. */ PRACTITIONER, + /** + * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time. + */ + PRACTITIONERROLE, /** * An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy. */ @@ -5205,6 +8308,10 @@ public class Enumerations { * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions, and constraints on resources and data types. */ STRUCTUREDEFINITION, + /** + * A Map of relationships between 2 structures that can be used to transform data. + */ + STRUCTUREMAP, /** * The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system is able to take an appropriate action. */ @@ -5221,6 +8328,10 @@ public class Enumerations { * A record of a request for a medication, substance or device used in the healthcare setting. */ SUPPLYREQUEST, + /** + * A task to be performed. + */ + TASK, /** * TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification. */ @@ -5260,6 +8371,8 @@ public class Enumerations { return BUNDLE; if ("CarePlan".equals(codeString)) return CAREPLAN; + if ("CareTeam".equals(codeString)) + return CARETEAM; if ("Claim".equals(codeString)) return CLAIM; if ("ClaimResponse".equals(codeString)) @@ -5272,6 +8385,8 @@ public class Enumerations { return COMMUNICATION; if ("CommunicationRequest".equals(codeString)) return COMMUNICATIONREQUEST; + if ("CompartmentDefinition".equals(codeString)) + return COMPARTMENTDEFINITION; if ("Composition".equals(codeString)) return COMPOSITION; if ("ConceptMap".equals(codeString)) @@ -5340,6 +8455,8 @@ public class Enumerations { return GUIDANCERESPONSE; if ("HealthcareService".equals(codeString)) return HEALTHCARESERVICE; + if ("ImagingExcerpt".equals(codeString)) + return IMAGINGEXCERPT; if ("ImagingObjectSelection".equals(codeString)) return IMAGINGOBJECTSELECTION; if ("ImagingStudy".equals(codeString)) @@ -5360,6 +8477,8 @@ public class Enumerations { return LOCATION; if ("Measure".equals(codeString)) return MEASURE; + if ("MeasureReport".equals(codeString)) + return MEASUREREPORT; if ("Media".equals(codeString)) return MEDIA; if ("Medication".equals(codeString)) @@ -5376,8 +8495,6 @@ public class Enumerations { return MESSAGEHEADER; if ("ModuleDefinition".equals(codeString)) return MODULEDEFINITION; - if ("ModuleMetadata".equals(codeString)) - return MODULEMETADATA; if ("NamingSystem".equals(codeString)) return NAMINGSYSTEM; if ("NutritionOrder".equals(codeString)) @@ -5408,6 +8525,8 @@ public class Enumerations { return PERSON; if ("Practitioner".equals(codeString)) return PRACTITIONER; + if ("PractitionerRole".equals(codeString)) + return PRACTITIONERROLE; if ("Procedure".equals(codeString)) return PROCEDURE; if ("ProcedureRequest".equals(codeString)) @@ -5444,6 +8563,8 @@ public class Enumerations { return SPECIMEN; if ("StructureDefinition".equals(codeString)) return STRUCTUREDEFINITION; + if ("StructureMap".equals(codeString)) + return STRUCTUREMAP; if ("Subscription".equals(codeString)) return SUBSCRIPTION; if ("Substance".equals(codeString)) @@ -5452,6 +8573,8 @@ public class Enumerations { return SUPPLYDELIVERY; if ("SupplyRequest".equals(codeString)) return SUPPLYREQUEST; + if ("Task".equals(codeString)) + return TASK; if ("TestScript".equals(codeString)) return TESTSCRIPT; if ("ValueSet".equals(codeString)) @@ -5472,12 +8595,14 @@ public class Enumerations { case BODYSITE: return "BodySite"; case BUNDLE: return "Bundle"; case CAREPLAN: return "CarePlan"; + case CARETEAM: return "CareTeam"; case CLAIM: return "Claim"; case CLAIMRESPONSE: return "ClaimResponse"; case CLINICALIMPRESSION: return "ClinicalImpression"; case CODESYSTEM: return "CodeSystem"; case COMMUNICATION: return "Communication"; case COMMUNICATIONREQUEST: return "CommunicationRequest"; + case COMPARTMENTDEFINITION: return "CompartmentDefinition"; case COMPOSITION: return "Composition"; case CONCEPTMAP: return "ConceptMap"; case CONDITION: return "Condition"; @@ -5512,6 +8637,7 @@ public class Enumerations { case GROUP: return "Group"; case GUIDANCERESPONSE: return "GuidanceResponse"; case HEALTHCARESERVICE: return "HealthcareService"; + case IMAGINGEXCERPT: return "ImagingExcerpt"; case IMAGINGOBJECTSELECTION: return "ImagingObjectSelection"; case IMAGINGSTUDY: return "ImagingStudy"; case IMMUNIZATION: return "Immunization"; @@ -5522,6 +8648,7 @@ public class Enumerations { case LIST: return "List"; case LOCATION: return "Location"; case MEASURE: return "Measure"; + case MEASUREREPORT: return "MeasureReport"; case MEDIA: return "Media"; case MEDICATION: return "Medication"; case MEDICATIONADMINISTRATION: return "MedicationAdministration"; @@ -5530,7 +8657,6 @@ public class Enumerations { case MEDICATIONSTATEMENT: return "MedicationStatement"; case MESSAGEHEADER: return "MessageHeader"; case MODULEDEFINITION: return "ModuleDefinition"; - case MODULEMETADATA: return "ModuleMetadata"; case NAMINGSYSTEM: return "NamingSystem"; case NUTRITIONORDER: return "NutritionOrder"; case OBSERVATION: return "Observation"; @@ -5546,6 +8672,7 @@ public class Enumerations { case PAYMENTRECONCILIATION: return "PaymentReconciliation"; case PERSON: return "Person"; case PRACTITIONER: return "Practitioner"; + case PRACTITIONERROLE: return "PractitionerRole"; case PROCEDURE: return "Procedure"; case PROCEDUREREQUEST: return "ProcedureRequest"; case PROCESSREQUEST: return "ProcessRequest"; @@ -5564,10 +8691,12 @@ public class Enumerations { case SLOT: return "Slot"; case SPECIMEN: return "Specimen"; case STRUCTUREDEFINITION: return "StructureDefinition"; + case STRUCTUREMAP: return "StructureMap"; case SUBSCRIPTION: return "Subscription"; case SUBSTANCE: return "Substance"; case SUPPLYDELIVERY: return "SupplyDelivery"; case SUPPLYREQUEST: return "SupplyRequest"; + case TASK: return "Task"; case TESTSCRIPT: return "TestScript"; case VALUESET: return "ValueSet"; case VISIONPRESCRIPTION: return "VisionPrescription"; @@ -5586,12 +8715,14 @@ public class Enumerations { case BODYSITE: return "http://hl7.org/fhir/resource-types"; case BUNDLE: return "http://hl7.org/fhir/resource-types"; case CAREPLAN: return "http://hl7.org/fhir/resource-types"; + case CARETEAM: return "http://hl7.org/fhir/resource-types"; case CLAIM: return "http://hl7.org/fhir/resource-types"; case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types"; case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types"; case CODESYSTEM: return "http://hl7.org/fhir/resource-types"; case COMMUNICATION: return "http://hl7.org/fhir/resource-types"; case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types"; + case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types"; case COMPOSITION: return "http://hl7.org/fhir/resource-types"; case CONCEPTMAP: return "http://hl7.org/fhir/resource-types"; case CONDITION: return "http://hl7.org/fhir/resource-types"; @@ -5626,6 +8757,7 @@ public class Enumerations { case GROUP: return "http://hl7.org/fhir/resource-types"; case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types"; case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types"; + case IMAGINGEXCERPT: return "http://hl7.org/fhir/resource-types"; case IMAGINGOBJECTSELECTION: return "http://hl7.org/fhir/resource-types"; case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types"; case IMMUNIZATION: return "http://hl7.org/fhir/resource-types"; @@ -5636,6 +8768,7 @@ public class Enumerations { case LIST: return "http://hl7.org/fhir/resource-types"; case LOCATION: return "http://hl7.org/fhir/resource-types"; case MEASURE: return "http://hl7.org/fhir/resource-types"; + case MEASUREREPORT: return "http://hl7.org/fhir/resource-types"; case MEDIA: return "http://hl7.org/fhir/resource-types"; case MEDICATION: return "http://hl7.org/fhir/resource-types"; case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types"; @@ -5644,7 +8777,6 @@ public class Enumerations { case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types"; case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types"; case MODULEDEFINITION: return "http://hl7.org/fhir/resource-types"; - case MODULEMETADATA: return "http://hl7.org/fhir/resource-types"; case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types"; case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types"; case OBSERVATION: return "http://hl7.org/fhir/resource-types"; @@ -5660,6 +8792,7 @@ public class Enumerations { case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types"; case PERSON: return "http://hl7.org/fhir/resource-types"; case PRACTITIONER: return "http://hl7.org/fhir/resource-types"; + case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types"; case PROCEDURE: return "http://hl7.org/fhir/resource-types"; case PROCEDUREREQUEST: return "http://hl7.org/fhir/resource-types"; case PROCESSREQUEST: return "http://hl7.org/fhir/resource-types"; @@ -5678,10 +8811,12 @@ public class Enumerations { case SLOT: return "http://hl7.org/fhir/resource-types"; case SPECIMEN: return "http://hl7.org/fhir/resource-types"; case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types"; + case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types"; case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types"; case SUBSTANCE: return "http://hl7.org/fhir/resource-types"; case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types"; case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types"; + case TASK: return "http://hl7.org/fhir/resource-types"; case TESTSCRIPT: return "http://hl7.org/fhir/resource-types"; case VALUESET: return "http://hl7.org/fhir/resource-types"; case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types"; @@ -5700,12 +8835,14 @@ public class Enumerations { case BODYSITE: return "Record details about the anatomical location of a specimen or body part. This resource may be used when a coded concept does not provide the necessary detail needed for the use case."; case BUNDLE: return "A container for a collection of resources."; case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions."; + case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient."; case CLAIM: return "A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery."; case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource."; case CLINICALIMPRESSION: return "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score."; - case CODESYSTEM: return "A code system specifies a set of codes drawn from one or more code systems."; + case CODESYSTEM: return "A code system resource specifies a set of codes drawn from one or more code systems."; case COMMUNICATION: return "An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition."; case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition."; + case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server."; case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained."; case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models."; case CONDITION: return "Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a diagnosis during an encounter; populating a problem list or a summary statement, such as a discharge summary."; @@ -5713,10 +8850,10 @@ public class Enumerations { case CONTRACT: return "A formal agreement between parties regarding the conduct of business, exchange of information or other matters."; case COVERAGE: return "Financial instrument which may be used to pay for or reimburse health care products and services."; case DATAELEMENT: return "The formal description of a single piece of information that can be gathered and reported."; - case DECISIONSUPPORTRULE: return "This resource defines a decision support rule of the form [on Event] if Condition then Action."; - case DECISIONSUPPORTSERVICEMODULE: return "The DecisionSupportServiceModule resource describes decision support functionality that is available as a service."; + case DECISIONSUPPORTRULE: return "This resource defines a decision support rule of the form [on Event] if Condition then Action. It is intended to be a shareable, computable definition of a actions that should be taken whenever some condition is met in response to a particular event or events."; + case DECISIONSUPPORTSERVICEMODULE: return "The DecisionSupportServiceModule describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking."; case DETECTEDISSUE: return "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc."; - case DEVICE: return "This resource identifies an instance of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc."; + case DEVICE: return "This resource identifies an instance or a type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc."; case DEVICECOMPONENT: return "Describes the characteristics, operational status and capabilities of a medical-related component of a medical device."; case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device."; case DEVICEUSEREQUEST: return "Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker."; @@ -5738,8 +8875,9 @@ public class Enumerations { case FLAG: return "Prospective warnings of potential issues when providing care to the patient."; case GOAL: return "Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc."; case GROUP: return "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization."; - case GUIDANCERESPONSE: return "A guidance response is the formal response to a previous guidance request. It is a derivative of the knowledge response that provides additional information relevant specifically to clinical decision support such as a description of any proposed actions to be taken."; + case GUIDANCERESPONSE: return "A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken."; case HEALTHCARESERVICE: return "The details of a healthcare service available at a location."; + case IMAGINGEXCERPT: return "A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingExcerpt resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance (\"cine\" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on."; case IMAGINGOBJECTSELECTION: return "A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance (\"cine\" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on."; case IMAGINGSTUDY: return "Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities."; case IMMUNIZATION: return "Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed."; @@ -5750,6 +8888,7 @@ public class Enumerations { case LIST: return "A set of information summarized from a list of other resources."; case LOCATION: return "Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated."; case MEASURE: return "The Measure resource provides the definition of a quality measure."; + case MEASUREREPORT: return "The MeasureReport resource contains the results of evaluating a measure."; case MEDIA: return "A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference."; case MEDICATION: return "This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication."; case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner."; @@ -5758,7 +8897,6 @@ public class Enumerations { case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from e.g. the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains \r\rThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information."; case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle."; case MODULEDEFINITION: return "The ModuleDefinition resource defines the data requirements for a quality artifact."; - case MODULEMETADATA: return "The ModuleMetadata resource defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information."; case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a \"System\" used within the Identifier and Coding data types."; case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident."; case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject."; @@ -5774,6 +8912,7 @@ public class Enumerations { case PAYMENTRECONCILIATION: return "This resource provides payment details and claim references supporting a bulk payment."; case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context."; case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare."; + case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time."; case PROCEDURE: return "An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy."; case PROCEDUREREQUEST: return "A request for a procedure to be performed. May be a proposal or an order."; case PROCESSREQUEST: return "This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources."; @@ -5792,10 +8931,12 @@ public class Enumerations { case SLOT: return "A slot of time on a schedule that may be available for booking appointments."; case SPECIMEN: return "A sample to be used for analysis."; case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions, and constraints on resources and data types."; + case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data."; case SUBSCRIPTION: return "The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system is able to take an appropriate action."; case SUBSTANCE: return "A homogeneous material with a definite composition."; case SUPPLYDELIVERY: return "Record of delivery of what is supplied."; case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting."; + case TASK: return "A task to be performed."; case TESTSCRIPT: return "TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification."; case VALUESET: return "A value set specifies a set of codes drawn from one or more code systems."; case VISIONPRESCRIPTION: return "An authorization for the supply of glasses and/or contact lenses to a patient."; @@ -5814,12 +8955,14 @@ public class Enumerations { case BODYSITE: return "BodySite"; case BUNDLE: return "Bundle"; case CAREPLAN: return "CarePlan"; + case CARETEAM: return "CareTeam"; case CLAIM: return "Claim"; case CLAIMRESPONSE: return "ClaimResponse"; case CLINICALIMPRESSION: return "ClinicalImpression"; case CODESYSTEM: return "CodeSystem"; case COMMUNICATION: return "Communication"; case COMMUNICATIONREQUEST: return "CommunicationRequest"; + case COMPARTMENTDEFINITION: return "CompartmentDefinition"; case COMPOSITION: return "Composition"; case CONCEPTMAP: return "ConceptMap"; case CONDITION: return "Condition"; @@ -5854,6 +8997,7 @@ public class Enumerations { case GROUP: return "Group"; case GUIDANCERESPONSE: return "GuidanceResponse"; case HEALTHCARESERVICE: return "HealthcareService"; + case IMAGINGEXCERPT: return "ImagingExcerpt"; case IMAGINGOBJECTSELECTION: return "ImagingObjectSelection"; case IMAGINGSTUDY: return "ImagingStudy"; case IMMUNIZATION: return "Immunization"; @@ -5864,6 +9008,7 @@ public class Enumerations { case LIST: return "List"; case LOCATION: return "Location"; case MEASURE: return "Measure"; + case MEASUREREPORT: return "MeasureReport"; case MEDIA: return "Media"; case MEDICATION: return "Medication"; case MEDICATIONADMINISTRATION: return "MedicationAdministration"; @@ -5872,7 +9017,6 @@ public class Enumerations { case MEDICATIONSTATEMENT: return "MedicationStatement"; case MESSAGEHEADER: return "MessageHeader"; case MODULEDEFINITION: return "ModuleDefinition"; - case MODULEMETADATA: return "ModuleMetadata"; case NAMINGSYSTEM: return "NamingSystem"; case NUTRITIONORDER: return "NutritionOrder"; case OBSERVATION: return "Observation"; @@ -5888,6 +9032,7 @@ public class Enumerations { case PAYMENTRECONCILIATION: return "PaymentReconciliation"; case PERSON: return "Person"; case PRACTITIONER: return "Practitioner"; + case PRACTITIONERROLE: return "PractitionerRole"; case PROCEDURE: return "Procedure"; case PROCEDUREREQUEST: return "ProcedureRequest"; case PROCESSREQUEST: return "ProcessRequest"; @@ -5906,10 +9051,12 @@ public class Enumerations { case SLOT: return "Slot"; case SPECIMEN: return "Specimen"; case STRUCTUREDEFINITION: return "StructureDefinition"; + case STRUCTUREMAP: return "StructureMap"; case SUBSCRIPTION: return "Subscription"; case SUBSTANCE: return "Substance"; case SUPPLYDELIVERY: return "SupplyDelivery"; case SUPPLYREQUEST: return "SupplyRequest"; + case TASK: return "Task"; case TESTSCRIPT: return "TestScript"; case VALUESET: return "ValueSet"; case VISIONPRESCRIPTION: return "VisionPrescription"; @@ -5943,6 +9090,8 @@ public class Enumerations { return ResourceType.BUNDLE; if ("CarePlan".equals(codeString)) return ResourceType.CAREPLAN; + if ("CareTeam".equals(codeString)) + return ResourceType.CARETEAM; if ("Claim".equals(codeString)) return ResourceType.CLAIM; if ("ClaimResponse".equals(codeString)) @@ -5955,6 +9104,8 @@ public class Enumerations { return ResourceType.COMMUNICATION; if ("CommunicationRequest".equals(codeString)) return ResourceType.COMMUNICATIONREQUEST; + if ("CompartmentDefinition".equals(codeString)) + return ResourceType.COMPARTMENTDEFINITION; if ("Composition".equals(codeString)) return ResourceType.COMPOSITION; if ("ConceptMap".equals(codeString)) @@ -6023,6 +9174,8 @@ public class Enumerations { return ResourceType.GUIDANCERESPONSE; if ("HealthcareService".equals(codeString)) return ResourceType.HEALTHCARESERVICE; + if ("ImagingExcerpt".equals(codeString)) + return ResourceType.IMAGINGEXCERPT; if ("ImagingObjectSelection".equals(codeString)) return ResourceType.IMAGINGOBJECTSELECTION; if ("ImagingStudy".equals(codeString)) @@ -6043,6 +9196,8 @@ public class Enumerations { return ResourceType.LOCATION; if ("Measure".equals(codeString)) return ResourceType.MEASURE; + if ("MeasureReport".equals(codeString)) + return ResourceType.MEASUREREPORT; if ("Media".equals(codeString)) return ResourceType.MEDIA; if ("Medication".equals(codeString)) @@ -6059,8 +9214,6 @@ public class Enumerations { return ResourceType.MESSAGEHEADER; if ("ModuleDefinition".equals(codeString)) return ResourceType.MODULEDEFINITION; - if ("ModuleMetadata".equals(codeString)) - return ResourceType.MODULEMETADATA; if ("NamingSystem".equals(codeString)) return ResourceType.NAMINGSYSTEM; if ("NutritionOrder".equals(codeString)) @@ -6091,6 +9244,8 @@ public class Enumerations { return ResourceType.PERSON; if ("Practitioner".equals(codeString)) return ResourceType.PRACTITIONER; + if ("PractitionerRole".equals(codeString)) + return ResourceType.PRACTITIONERROLE; if ("Procedure".equals(codeString)) return ResourceType.PROCEDURE; if ("ProcedureRequest".equals(codeString)) @@ -6127,6 +9282,8 @@ public class Enumerations { return ResourceType.SPECIMEN; if ("StructureDefinition".equals(codeString)) return ResourceType.STRUCTUREDEFINITION; + if ("StructureMap".equals(codeString)) + return ResourceType.STRUCTUREMAP; if ("Subscription".equals(codeString)) return ResourceType.SUBSCRIPTION; if ("Substance".equals(codeString)) @@ -6135,6 +9292,8 @@ public class Enumerations { return ResourceType.SUPPLYDELIVERY; if ("SupplyRequest".equals(codeString)) return ResourceType.SUPPLYREQUEST; + if ("Task".equals(codeString)) + return ResourceType.TASK; if ("TestScript".equals(codeString)) return ResourceType.TESTSCRIPT; if ("ValueSet".equals(codeString)) @@ -6169,6 +9328,8 @@ public class Enumerations { return new Enumeration(this, ResourceType.BUNDLE); if ("CarePlan".equals(codeString)) return new Enumeration(this, ResourceType.CAREPLAN); + if ("CareTeam".equals(codeString)) + return new Enumeration(this, ResourceType.CARETEAM); if ("Claim".equals(codeString)) return new Enumeration(this, ResourceType.CLAIM); if ("ClaimResponse".equals(codeString)) @@ -6181,6 +9342,8 @@ public class Enumerations { return new Enumeration(this, ResourceType.COMMUNICATION); if ("CommunicationRequest".equals(codeString)) return new Enumeration(this, ResourceType.COMMUNICATIONREQUEST); + if ("CompartmentDefinition".equals(codeString)) + return new Enumeration(this, ResourceType.COMPARTMENTDEFINITION); if ("Composition".equals(codeString)) return new Enumeration(this, ResourceType.COMPOSITION); if ("ConceptMap".equals(codeString)) @@ -6249,6 +9412,8 @@ public class Enumerations { return new Enumeration(this, ResourceType.GUIDANCERESPONSE); if ("HealthcareService".equals(codeString)) return new Enumeration(this, ResourceType.HEALTHCARESERVICE); + if ("ImagingExcerpt".equals(codeString)) + return new Enumeration(this, ResourceType.IMAGINGEXCERPT); if ("ImagingObjectSelection".equals(codeString)) return new Enumeration(this, ResourceType.IMAGINGOBJECTSELECTION); if ("ImagingStudy".equals(codeString)) @@ -6269,6 +9434,8 @@ public class Enumerations { return new Enumeration(this, ResourceType.LOCATION); if ("Measure".equals(codeString)) return new Enumeration(this, ResourceType.MEASURE); + if ("MeasureReport".equals(codeString)) + return new Enumeration(this, ResourceType.MEASUREREPORT); if ("Media".equals(codeString)) return new Enumeration(this, ResourceType.MEDIA); if ("Medication".equals(codeString)) @@ -6285,8 +9452,6 @@ public class Enumerations { return new Enumeration(this, ResourceType.MESSAGEHEADER); if ("ModuleDefinition".equals(codeString)) return new Enumeration(this, ResourceType.MODULEDEFINITION); - if ("ModuleMetadata".equals(codeString)) - return new Enumeration(this, ResourceType.MODULEMETADATA); if ("NamingSystem".equals(codeString)) return new Enumeration(this, ResourceType.NAMINGSYSTEM); if ("NutritionOrder".equals(codeString)) @@ -6317,6 +9482,8 @@ public class Enumerations { return new Enumeration(this, ResourceType.PERSON); if ("Practitioner".equals(codeString)) return new Enumeration(this, ResourceType.PRACTITIONER); + if ("PractitionerRole".equals(codeString)) + return new Enumeration(this, ResourceType.PRACTITIONERROLE); if ("Procedure".equals(codeString)) return new Enumeration(this, ResourceType.PROCEDURE); if ("ProcedureRequest".equals(codeString)) @@ -6353,6 +9520,8 @@ public class Enumerations { return new Enumeration(this, ResourceType.SPECIMEN); if ("StructureDefinition".equals(codeString)) return new Enumeration(this, ResourceType.STRUCTUREDEFINITION); + if ("StructureMap".equals(codeString)) + return new Enumeration(this, ResourceType.STRUCTUREMAP); if ("Subscription".equals(codeString)) return new Enumeration(this, ResourceType.SUBSCRIPTION); if ("Substance".equals(codeString)) @@ -6361,6 +9530,8 @@ public class Enumerations { return new Enumeration(this, ResourceType.SUPPLYDELIVERY); if ("SupplyRequest".equals(codeString)) return new Enumeration(this, ResourceType.SUPPLYREQUEST); + if ("Task".equals(codeString)) + return new Enumeration(this, ResourceType.TASK); if ("TestScript".equals(codeString)) return new Enumeration(this, ResourceType.TESTSCRIPT); if ("ValueSet".equals(codeString)) @@ -6390,6 +9561,8 @@ public class Enumerations { return "Bundle"; if (code == ResourceType.CAREPLAN) return "CarePlan"; + if (code == ResourceType.CARETEAM) + return "CareTeam"; if (code == ResourceType.CLAIM) return "Claim"; if (code == ResourceType.CLAIMRESPONSE) @@ -6402,6 +9575,8 @@ public class Enumerations { return "Communication"; if (code == ResourceType.COMMUNICATIONREQUEST) return "CommunicationRequest"; + if (code == ResourceType.COMPARTMENTDEFINITION) + return "CompartmentDefinition"; if (code == ResourceType.COMPOSITION) return "Composition"; if (code == ResourceType.CONCEPTMAP) @@ -6470,6 +9645,8 @@ public class Enumerations { return "GuidanceResponse"; if (code == ResourceType.HEALTHCARESERVICE) return "HealthcareService"; + if (code == ResourceType.IMAGINGEXCERPT) + return "ImagingExcerpt"; if (code == ResourceType.IMAGINGOBJECTSELECTION) return "ImagingObjectSelection"; if (code == ResourceType.IMAGINGSTUDY) @@ -6490,6 +9667,8 @@ public class Enumerations { return "Location"; if (code == ResourceType.MEASURE) return "Measure"; + if (code == ResourceType.MEASUREREPORT) + return "MeasureReport"; if (code == ResourceType.MEDIA) return "Media"; if (code == ResourceType.MEDICATION) @@ -6506,8 +9685,6 @@ public class Enumerations { return "MessageHeader"; if (code == ResourceType.MODULEDEFINITION) return "ModuleDefinition"; - if (code == ResourceType.MODULEMETADATA) - return "ModuleMetadata"; if (code == ResourceType.NAMINGSYSTEM) return "NamingSystem"; if (code == ResourceType.NUTRITIONORDER) @@ -6538,6 +9715,8 @@ public class Enumerations { return "Person"; if (code == ResourceType.PRACTITIONER) return "Practitioner"; + if (code == ResourceType.PRACTITIONERROLE) + return "PractitionerRole"; if (code == ResourceType.PROCEDURE) return "Procedure"; if (code == ResourceType.PROCEDUREREQUEST) @@ -6574,6 +9753,8 @@ public class Enumerations { return "Specimen"; if (code == ResourceType.STRUCTUREDEFINITION) return "StructureDefinition"; + if (code == ResourceType.STRUCTUREMAP) + return "StructureMap"; if (code == ResourceType.SUBSCRIPTION) return "Subscription"; if (code == ResourceType.SUBSTANCE) @@ -6582,6 +9763,8 @@ public class Enumerations { return "SupplyDelivery"; if (code == ResourceType.SUPPLYREQUEST) return "SupplyRequest"; + if (code == ResourceType.TASK) + return "Task"; if (code == ResourceType.TESTSCRIPT) return "TestScript"; if (code == ResourceType.VALUESET) diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EpisodeOfCare.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EpisodeOfCare.java index fb60b681243..4d3c7d9d3a1 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EpisodeOfCare.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/EpisodeOfCare.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time. */ @@ -360,8 +359,7 @@ public class EpisodeOfCare extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (status == null || status.isEmpty()) && (period == null || period.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( status, period); } public String fhirType() { @@ -369,228 +367,6 @@ public class EpisodeOfCare extends DomainResource { } - } - - @Block() - public static class EpisodeOfCareCareTeamComponent extends BackboneElement implements IBaseBackboneElement { - /** - * The role this team member is taking within this episode of care. - */ - @Child(name = "role", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Role taken by this team member", formalDefinition="The role this team member is taking within this episode of care." ) - protected List role; - - /** - * The period of time this practitioner is performing some role within the episode of care. - */ - @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Period of time for this role", formalDefinition="The period of time this practitioner is performing some role within the episode of care." ) - protected Period period; - - /** - * The practitioner (or Organization) within the team. - */ - @Child(name = "member", type = {Practitioner.class, Organization.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The practitioner (or Organization) within the team", formalDefinition="The practitioner (or Organization) within the team." ) - protected Reference member; - - /** - * The actual object that is the target of the reference (The practitioner (or Organization) within the team.) - */ - protected Resource memberTarget; - - private static final long serialVersionUID = -437303089L; - - /** - * Constructor - */ - public EpisodeOfCareCareTeamComponent() { - super(); - } - - /** - * @return {@link #role} (The role this team member is taking within this episode of care.) - */ - public List getRole() { - if (this.role == null) - this.role = new ArrayList(); - return this.role; - } - - public boolean hasRole() { - if (this.role == null) - return false; - for (CodeableConcept item : this.role) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #role} (The role this team member is taking within this episode of care.) - */ - // syntactic sugar - public CodeableConcept addRole() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.role == null) - this.role = new ArrayList(); - this.role.add(t); - return t; - } - - // syntactic sugar - public EpisodeOfCareCareTeamComponent addRole(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.role == null) - this.role = new ArrayList(); - this.role.add(t); - return this; - } - - /** - * @return {@link #period} (The period of time this practitioner is performing some role within the episode of care.) - */ - public Period getPeriod() { - if (this.period == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EpisodeOfCareCareTeamComponent.period"); - else if (Configuration.doAutoCreate()) - this.period = new Period(); // cc - return this.period; - } - - public boolean hasPeriod() { - return this.period != null && !this.period.isEmpty(); - } - - /** - * @param value {@link #period} (The period of time this practitioner is performing some role within the episode of care.) - */ - public EpisodeOfCareCareTeamComponent setPeriod(Period value) { - this.period = value; - return this; - } - - /** - * @return {@link #member} (The practitioner (or Organization) within the team.) - */ - public Reference getMember() { - if (this.member == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create EpisodeOfCareCareTeamComponent.member"); - else if (Configuration.doAutoCreate()) - this.member = new Reference(); // cc - return this.member; - } - - public boolean hasMember() { - return this.member != null && !this.member.isEmpty(); - } - - /** - * @param value {@link #member} (The practitioner (or Organization) within the team.) - */ - public EpisodeOfCareCareTeamComponent setMember(Reference value) { - this.member = value; - return this; - } - - /** - * @return {@link #member} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner (or Organization) within the team.) - */ - public Resource getMemberTarget() { - return this.memberTarget; - } - - /** - * @param value {@link #member} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner (or Organization) within the team.) - */ - public EpisodeOfCareCareTeamComponent setMemberTarget(Resource value) { - this.memberTarget = value; - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("role", "CodeableConcept", "The role this team member is taking within this episode of care.", 0, java.lang.Integer.MAX_VALUE, role)); - childrenList.add(new Property("period", "Period", "The period of time this practitioner is performing some role within the episode of care.", 0, java.lang.Integer.MAX_VALUE, period)); - childrenList.add(new Property("member", "Reference(Practitioner|Organization)", "The practitioner (or Organization) within the team.", 0, java.lang.Integer.MAX_VALUE, member)); - } - - @Override - public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("role")) - this.getRole().add(castToCodeableConcept(value)); - else if (name.equals("period")) - this.period = castToPeriod(value); // Period - else if (name.equals("member")) - this.member = castToReference(value); // Reference - else - super.setProperty(name, value); - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("role")) { - return addRole(); - } - else if (name.equals("period")) { - this.period = new Period(); - return this.period; - } - else if (name.equals("member")) { - this.member = new Reference(); - return this.member; - } - else - return super.addChild(name); - } - - public EpisodeOfCareCareTeamComponent copy() { - EpisodeOfCareCareTeamComponent dst = new EpisodeOfCareCareTeamComponent(); - copyValues(dst); - if (role != null) { - dst.role = new ArrayList(); - for (CodeableConcept i : role) - dst.role.add(i.copy()); - }; - dst.period = period == null ? null : period.copy(); - dst.member = member == null ? null : member.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof EpisodeOfCareCareTeamComponent)) - return false; - EpisodeOfCareCareTeamComponent o = (EpisodeOfCareCareTeamComponent) other; - return compareDeep(role, o.role, true) && compareDeep(period, o.period, true) && compareDeep(member, o.member, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof EpisodeOfCareCareTeamComponent)) - return false; - EpisodeOfCareCareTeamComponent o = (EpisodeOfCareCareTeamComponent) other; - return true; - } - - public boolean isEmpty() { - return super.isEmpty() && (role == null || role.isEmpty()) && (period == null || period.isEmpty()) - && (member == null || member.isEmpty()); - } - - public String fhirType() { - return "EpisodeOfCare.careTeam"; - - } - } /** @@ -615,10 +391,10 @@ public class EpisodeOfCare extends DomainResource { protected List statusHistory; /** - * A classification of the type of encounter; e.g. specialist referral, disease management, type of funded care. + * A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care. */ @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Type/class - e.g. specialist referral, disease management", formalDefinition="A classification of the type of encounter; e.g. specialist referral, disease management, type of funded care." ) + @Description(shortDefinition="Type/class - e.g. specialist referral, disease management", formalDefinition="A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care." ) protected List type; /** @@ -691,11 +467,16 @@ public class EpisodeOfCare extends DomainResource { /** * The list of practitioners that may be facilitating this episode of care for specific purposes. */ - @Child(name = "careTeam", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "team", type = {CareTeam.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Other practitioners facilitating this episode of care", formalDefinition="The list of practitioners that may be facilitating this episode of care for specific purposes." ) - protected List careTeam; + protected List team; + /** + * The actual objects that are the target of the reference (The list of practitioners that may be facilitating this episode of care for specific purposes.) + */ + protected List teamTarget; - private static final long serialVersionUID = 1652653406L; + + private static final long serialVersionUID = 922419354L; /** * Constructor @@ -839,7 +620,7 @@ public class EpisodeOfCare extends DomainResource { } /** - * @return {@link #type} (A classification of the type of encounter; e.g. specialist referral, disease management, type of funded care.) + * @return {@link #type} (A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care.) */ public List getType() { if (this.type == null) @@ -857,7 +638,7 @@ public class EpisodeOfCare extends DomainResource { } /** - * @return {@link #type} (A classification of the type of encounter; e.g. specialist referral, disease management, type of funded care.) + * @return {@link #type} (A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care.) */ // syntactic sugar public CodeableConcept addType() { //3 @@ -1157,58 +938,79 @@ public class EpisodeOfCare extends DomainResource { } /** - * @return {@link #careTeam} (The list of practitioners that may be facilitating this episode of care for specific purposes.) + * @return {@link #team} (The list of practitioners that may be facilitating this episode of care for specific purposes.) */ - public List getCareTeam() { - if (this.careTeam == null) - this.careTeam = new ArrayList(); - return this.careTeam; + public List getTeam() { + if (this.team == null) + this.team = new ArrayList(); + return this.team; } - public boolean hasCareTeam() { - if (this.careTeam == null) + public boolean hasTeam() { + if (this.team == null) return false; - for (EpisodeOfCareCareTeamComponent item : this.careTeam) + for (Reference item : this.team) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #careTeam} (The list of practitioners that may be facilitating this episode of care for specific purposes.) + * @return {@link #team} (The list of practitioners that may be facilitating this episode of care for specific purposes.) */ // syntactic sugar - public EpisodeOfCareCareTeamComponent addCareTeam() { //3 - EpisodeOfCareCareTeamComponent t = new EpisodeOfCareCareTeamComponent(); - if (this.careTeam == null) - this.careTeam = new ArrayList(); - this.careTeam.add(t); + public Reference addTeam() { //3 + Reference t = new Reference(); + if (this.team == null) + this.team = new ArrayList(); + this.team.add(t); return t; } // syntactic sugar - public EpisodeOfCare addCareTeam(EpisodeOfCareCareTeamComponent t) { //3 + public EpisodeOfCare addTeam(Reference t) { //3 if (t == null) return this; - if (this.careTeam == null) - this.careTeam = new ArrayList(); - this.careTeam.add(t); + if (this.team == null) + this.team = new ArrayList(); + this.team.add(t); return this; } + /** + * @return {@link #team} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The list of practitioners that may be facilitating this episode of care for specific purposes.) + */ + public List getTeamTarget() { + if (this.teamTarget == null) + this.teamTarget = new ArrayList(); + return this.teamTarget; + } + + // syntactic sugar + /** + * @return {@link #team} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The list of practitioners that may be facilitating this episode of care for specific purposes.) + */ + public CareTeam addTeamTarget() { + CareTeam r = new CareTeam(); + if (this.teamTarget == null) + this.teamTarget = new ArrayList(); + this.teamTarget.add(r); + return r; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("identifier", "Identifier", "Identifier(s) by which this EpisodeOfCare is known.", 0, java.lang.Integer.MAX_VALUE, identifier)); childrenList.add(new Property("status", "code", "planned | waitlist | active | onhold | finished | cancelled.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("statusHistory", "", "The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).", 0, java.lang.Integer.MAX_VALUE, statusHistory)); - childrenList.add(new Property("type", "CodeableConcept", "A classification of the type of encounter; e.g. specialist referral, disease management, type of funded care.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("type", "CodeableConcept", "A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("condition", "Reference(Condition)", "A list of conditions/problems/diagnoses that this episode of care is intended to be providing care for.", 0, java.lang.Integer.MAX_VALUE, condition)); childrenList.add(new Property("patient", "Reference(Patient)", "The patient that this EpisodeOfCare applies to.", 0, java.lang.Integer.MAX_VALUE, patient)); childrenList.add(new Property("managingOrganization", "Reference(Organization)", "The organization that has assumed the specific responsibilities for the specified duration.", 0, java.lang.Integer.MAX_VALUE, managingOrganization)); childrenList.add(new Property("period", "Period", "The interval during which the managing organization assumes the defined responsibility.", 0, java.lang.Integer.MAX_VALUE, period)); childrenList.add(new Property("referralRequest", "Reference(ReferralRequest)", "Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.", 0, java.lang.Integer.MAX_VALUE, referralRequest)); childrenList.add(new Property("careManager", "Reference(Practitioner)", "The practitioner that is the care manager/care co-ordinator for this patient.", 0, java.lang.Integer.MAX_VALUE, careManager)); - childrenList.add(new Property("careTeam", "", "The list of practitioners that may be facilitating this episode of care for specific purposes.", 0, java.lang.Integer.MAX_VALUE, careTeam)); + childrenList.add(new Property("team", "Reference(CareTeam)", "The list of practitioners that may be facilitating this episode of care for specific purposes.", 0, java.lang.Integer.MAX_VALUE, team)); } @Override @@ -1233,8 +1035,8 @@ public class EpisodeOfCare extends DomainResource { this.getReferralRequest().add(castToReference(value)); else if (name.equals("careManager")) this.careManager = castToReference(value); // Reference - else if (name.equals("careTeam")) - this.getCareTeam().add((EpisodeOfCareCareTeamComponent) value); + else if (name.equals("team")) + this.getTeam().add(castToReference(value)); else super.setProperty(name, value); } @@ -1275,8 +1077,8 @@ public class EpisodeOfCare extends DomainResource { this.careManager = new Reference(); return this.careManager; } - else if (name.equals("careTeam")) { - return addCareTeam(); + else if (name.equals("team")) { + return addTeam(); } else return super.addChild(name); @@ -1320,10 +1122,10 @@ public class EpisodeOfCare extends DomainResource { dst.referralRequest.add(i.copy()); }; dst.careManager = careManager == null ? null : careManager.copy(); - if (careTeam != null) { - dst.careTeam = new ArrayList(); - for (EpisodeOfCareCareTeamComponent i : careTeam) - dst.careTeam.add(i.copy()); + if (team != null) { + dst.team = new ArrayList(); + for (Reference i : team) + dst.team.add(i.copy()); }; return dst; } @@ -1343,7 +1145,7 @@ public class EpisodeOfCare extends DomainResource { && compareDeep(type, o.type, true) && compareDeep(condition, o.condition, true) && compareDeep(patient, o.patient, true) && compareDeep(managingOrganization, o.managingOrganization, true) && compareDeep(period, o.period, true) && compareDeep(referralRequest, o.referralRequest, true) && compareDeep(careManager, o.careManager, true) - && compareDeep(careTeam, o.careTeam, true); + && compareDeep(team, o.team, true); } @Override @@ -1357,12 +1159,9 @@ public class EpisodeOfCare extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) - && (statusHistory == null || statusHistory.isEmpty()) && (type == null || type.isEmpty()) - && (condition == null || condition.isEmpty()) && (patient == null || patient.isEmpty()) && (managingOrganization == null || managingOrganization.isEmpty()) - && (period == null || period.isEmpty()) && (referralRequest == null || referralRequest.isEmpty()) - && (careManager == null || careManager.isEmpty()) && (careTeam == null || careTeam.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, statusHistory + , type, condition, patient, managingOrganization, period, referralRequest, careManager + , team); } @Override @@ -1470,7 +1269,7 @@ public class EpisodeOfCare extends DomainResource { * Path: EpisodeOfCare.patient
*

*/ - @SearchParamDefinition(name="patient", path="EpisodeOfCare.patient", description="Patient for this episode of care", type="reference" ) + @SearchParamDefinition(name="patient", path="EpisodeOfCare.patient", description="Patient for this episode of care", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient @@ -1514,32 +1313,6 @@ public class EpisodeOfCare extends DomainResource { */ public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("EpisodeOfCare:organization").toLocked(); - /** - * Search parameter: team-member - *

- * Description: A Practitioner or Organization allocated to the care team for this EpisodeOfCare
- * Type: reference
- * Path: EpisodeOfCare.careTeam.member
- *

- */ - @SearchParamDefinition(name="team-member", path="EpisodeOfCare.careTeam.member", description="A Practitioner or Organization allocated to the care team for this EpisodeOfCare", type="reference" ) - public static final String SP_TEAM_MEMBER = "team-member"; - /** - * Fluent Client search parameter constant for team-member - *

- * Description: A Practitioner or Organization allocated to the care team for this EpisodeOfCare
- * Type: reference
- * Path: EpisodeOfCare.careTeam.member
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam TEAM_MEMBER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_TEAM_MEMBER); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "EpisodeOfCare:team-member". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_TEAM_MEMBER = new ca.uhn.fhir.model.api.Include("EpisodeOfCare:team-member").toLocked(); - /** * Search parameter: type *

@@ -1568,7 +1341,7 @@ public class EpisodeOfCare extends DomainResource { * Path: EpisodeOfCare.careManager
*

*/ - @SearchParamDefinition(name="care-manager", path="EpisodeOfCare.careManager", description="Care manager/care co-ordinator for the patient", type="reference" ) + @SearchParamDefinition(name="care-manager", path="EpisodeOfCare.careManager", description="Care manager/care co-ordinator for the patient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_CARE_MANAGER = "care-manager"; /** * Fluent Client search parameter constant for care-manager diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ExpansionProfile.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ExpansionProfile.java index 01816286356..8da06e465d3 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ExpansionProfile.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ExpansionProfile.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Resource to define constraints on the Expansion of a FHIR ValueSet. */ @@ -225,8 +223,7 @@ public class ExpansionProfile extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); } public String fhirType() { @@ -368,8 +365,7 @@ public class ExpansionProfile extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (include == null || include.isEmpty()) && (exclude == null || exclude.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( include, exclude); } public String fhirType() { @@ -491,7 +487,7 @@ public class ExpansionProfile extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (codeSystem == null || codeSystem.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( codeSystem); } public String fhirType() { @@ -685,8 +681,7 @@ public class ExpansionProfile extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( system, version); } public String fhirType() { @@ -808,7 +803,7 @@ public class ExpansionProfile extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (codeSystem == null || codeSystem.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( codeSystem); } public String fhirType() { @@ -1002,8 +997,7 @@ public class ExpansionProfile extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( system, version); } public String fhirType() { @@ -1145,8 +1139,7 @@ public class ExpansionProfile extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (include == null || include.isEmpty()) && (exclude == null || exclude.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( include, exclude); } public String fhirType() { @@ -1268,7 +1261,7 @@ public class ExpansionProfile extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (designation == null || designation.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( designation); } public String fhirType() { @@ -1434,8 +1427,7 @@ public class ExpansionProfile extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (language == null || language.isEmpty()) && (use == null || use.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( language, use); } public String fhirType() { @@ -1557,7 +1549,7 @@ public class ExpansionProfile extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (designation == null || designation.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( designation); } public String fhirType() { @@ -1723,8 +1715,7 @@ public class ExpansionProfile extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (language == null || language.isEmpty()) && (use == null || use.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( language, use); } public String fhirType() { @@ -2964,16 +2955,10 @@ public class ExpansionProfile extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) - && (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty()) - && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty()) - && (codeSystem == null || codeSystem.isEmpty()) && (includeDesignations == null || includeDesignations.isEmpty()) - && (designation == null || designation.isEmpty()) && (includeDefinition == null || includeDefinition.isEmpty()) - && (includeInactive == null || includeInactive.isEmpty()) && (excludeNested == null || excludeNested.isEmpty()) - && (excludeNotForUI == null || excludeNotForUI.isEmpty()) && (excludePostCoordinated == null || excludePostCoordinated.isEmpty()) - && (displayLanguage == null || displayLanguage.isEmpty()) && (limitedExpansion == null || limitedExpansion.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, identifier, version, name + , status, experimental, publisher, contact, date, description, codeSystem, includeDesignations + , designation, includeDefinition, includeInactive, excludeNested, excludeNotForUI, excludePostCoordinated + , displayLanguage, limitedExpansion); } @Override diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ExplanationOfBenefit.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ExplanationOfBenefit.java index cd43aee2a20..4ec460140f0 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ExplanationOfBenefit.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ExplanationOfBenefit.java @@ -29,74 +29,251 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import java.math.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided. */ @ResourceDef(name="ExplanationOfBenefit", profile="http://hl7.org/fhir/Profile/ExplanationOfBenefit") public class ExplanationOfBenefit extends DomainResource { + @Block() + public static class RelatedClaimsComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Other claims which are related to this claim such as prior claim versions or for related services. + */ + @Child(name = "claim", type = {Identifier.class, Claim.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reference to the related claim", formalDefinition="Other claims which are related to this claim such as prior claim versions or for related services." ) + protected Type claim; + + /** + * For example prior or umbrella. + */ + @Child(name = "relationship", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="How the reference claim is related", formalDefinition="For example prior or umbrella." ) + protected Coding relationship; + + /** + * An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # . + */ + @Child(name = "reference", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Related file or case reference", formalDefinition="An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # ." ) + protected Identifier reference; + + private static final long serialVersionUID = -2033217402L; + + /** + * Constructor + */ + public RelatedClaimsComponent() { + super(); + } + + /** + * @return {@link #claim} (Other claims which are related to this claim such as prior claim versions or for related services.) + */ + public Type getClaim() { + return this.claim; + } + + /** + * @return {@link #claim} (Other claims which are related to this claim such as prior claim versions or for related services.) + */ + public Identifier getClaimIdentifier() throws FHIRException { + if (!(this.claim instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.claim.getClass().getName()+" was encountered"); + return (Identifier) this.claim; + } + + public boolean hasClaimIdentifier() { + return this.claim instanceof Identifier; + } + + /** + * @return {@link #claim} (Other claims which are related to this claim such as prior claim versions or for related services.) + */ + public Reference getClaimReference() throws FHIRException { + if (!(this.claim instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.claim.getClass().getName()+" was encountered"); + return (Reference) this.claim; + } + + public boolean hasClaimReference() { + return this.claim instanceof Reference; + } + + public boolean hasClaim() { + return this.claim != null && !this.claim.isEmpty(); + } + + /** + * @param value {@link #claim} (Other claims which are related to this claim such as prior claim versions or for related services.) + */ + public RelatedClaimsComponent setClaim(Type value) { + this.claim = value; + return this; + } + + /** + * @return {@link #relationship} (For example prior or umbrella.) + */ + public Coding getRelationship() { + if (this.relationship == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RelatedClaimsComponent.relationship"); + else if (Configuration.doAutoCreate()) + this.relationship = new Coding(); // cc + return this.relationship; + } + + public boolean hasRelationship() { + return this.relationship != null && !this.relationship.isEmpty(); + } + + /** + * @param value {@link #relationship} (For example prior or umbrella.) + */ + public RelatedClaimsComponent setRelationship(Coding value) { + this.relationship = value; + return this; + } + + /** + * @return {@link #reference} (An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # .) + */ + public Identifier getReference() { + if (this.reference == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create RelatedClaimsComponent.reference"); + else if (Configuration.doAutoCreate()) + this.reference = new Identifier(); // cc + return this.reference; + } + + public boolean hasReference() { + return this.reference != null && !this.reference.isEmpty(); + } + + /** + * @param value {@link #reference} (An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # .) + */ + public RelatedClaimsComponent setReference(Identifier value) { + this.reference = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("claim[x]", "Identifier|Reference(Claim)", "Other claims which are related to this claim such as prior claim versions or for related services.", 0, java.lang.Integer.MAX_VALUE, claim)); + childrenList.add(new Property("relationship", "Coding", "For example prior or umbrella.", 0, java.lang.Integer.MAX_VALUE, relationship)); + childrenList.add(new Property("reference", "Identifier", "An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # .", 0, java.lang.Integer.MAX_VALUE, reference)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("claim[x]")) + this.claim = (Type) value; // Type + else if (name.equals("relationship")) + this.relationship = castToCoding(value); // Coding + else if (name.equals("reference")) + this.reference = castToIdentifier(value); // Identifier + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("claimIdentifier")) { + this.claim = new Identifier(); + return this.claim; + } + else if (name.equals("claimReference")) { + this.claim = new Reference(); + return this.claim; + } + else if (name.equals("relationship")) { + this.relationship = new Coding(); + return this.relationship; + } + else if (name.equals("reference")) { + this.reference = new Identifier(); + return this.reference; + } + else + return super.addChild(name); + } + + public RelatedClaimsComponent copy() { + RelatedClaimsComponent dst = new RelatedClaimsComponent(); + copyValues(dst); + dst.claim = claim == null ? null : claim.copy(); + dst.relationship = relationship == null ? null : relationship.copy(); + dst.reference = reference == null ? null : reference.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof RelatedClaimsComponent)) + return false; + RelatedClaimsComponent o = (RelatedClaimsComponent) other; + return compareDeep(claim, o.claim, true) && compareDeep(relationship, o.relationship, true) && compareDeep(reference, o.reference, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof RelatedClaimsComponent)) + return false; + RelatedClaimsComponent o = (RelatedClaimsComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( claim, relationship, reference + ); + } + + public String fhirType() { + return "ExplanationOfBenefit.related"; + + } + + } + @Block() public static class PayeeComponent extends BackboneElement implements IBaseBackboneElement { /** - * Party to be reimbursed: Subscriber, provider, other. + * Type of Party to be reimbursed: Subscriber, provider, other. */ @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Party to be paid any benefits payable", formalDefinition="Party to be reimbursed: Subscriber, provider, other." ) + @Description(shortDefinition="Type of party: Subscriber, Provider, other", formalDefinition="Type of Party to be reimbursed: Subscriber, provider, other." ) protected Coding type; /** - * The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned). + * Party to be reimbursed: Subscriber, provider, other. */ - @Child(name = "provider", type = {Practitioner.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Provider who is the payee", formalDefinition="The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference provider; + @Child(name = "party", type = {Identifier.class, Practitioner.class, Organization.class, Patient.class, RelatedPerson.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Party to receive the payable", formalDefinition="Party to be reimbursed: Subscriber, provider, other." ) + protected Type party; - /** - * The actual object that is the target of the reference (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Practitioner providerTarget; - - /** - * The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name = "organization", type = {Organization.class}, order=3, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Organization who is the payee", formalDefinition="The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Organization organizationTarget; - - /** - * The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned). - */ - @Child(name = "person", type = {Patient.class}, order=4, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Other person who is the payee", formalDefinition="The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned)." ) - protected Reference person; - - /** - * The actual object that is the target of the reference (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - protected Patient personTarget; - - private static final long serialVersionUID = -503108488L; + private static final long serialVersionUID = 1304353420L; /** * Constructor @@ -106,7 +283,7 @@ public class ExplanationOfBenefit extends DomainResource { } /** - * @return {@link #type} (Party to be reimbursed: Subscriber, provider, other.) + * @return {@link #type} (Type of Party to be reimbursed: Subscriber, provider, other.) */ public Coding getType() { if (this.type == null) @@ -122,7 +299,7 @@ public class ExplanationOfBenefit extends DomainResource { } /** - * @param value {@link #type} (Party to be reimbursed: Subscriber, provider, other.) + * @param value {@link #type} (Type of Party to be reimbursed: Subscriber, provider, other.) */ public PayeeComponent setType(Coding value) { this.type = value; @@ -130,155 +307,62 @@ public class ExplanationOfBenefit extends DomainResource { } /** - * @return {@link #provider} (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + * @return {@link #party} (Party to be reimbursed: Subscriber, provider, other.) */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc - return this.provider; - } - - public boolean hasProvider() { - return this.provider != null && !this.provider.isEmpty(); + public Type getParty() { + return this.party; } /** - * @param value {@link #provider} (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + * @return {@link #party} (Party to be reimbursed: Subscriber, provider, other.) */ - public PayeeComponent setProvider(Reference value) { - this.provider = value; - return this; + public Identifier getPartyIdentifier() throws FHIRException { + if (!(this.party instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.party.getClass().getName()+" was encountered"); + return (Identifier) this.party; + } + + public boolean hasPartyIdentifier() { + return this.party instanceof Identifier; } /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + * @return {@link #party} (Party to be reimbursed: Subscriber, provider, other.) */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; + public Reference getPartyReference() throws FHIRException { + if (!(this.party instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.party.getClass().getName()+" was encountered"); + return (Reference) this.party; + } + + public boolean hasPartyReference() { + return this.party instanceof Reference; + } + + public boolean hasParty() { + return this.party != null && !this.party.isEmpty(); } /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).) + * @param value {@link #party} (Party to be reimbursed: Subscriber, provider, other.) */ - public PayeeComponent setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - - /** - * @return {@link #organization} (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc - return this.organization; - } - - public boolean hasOrganization() { - return this.organization != null && !this.organization.isEmpty(); - } - - /** - * @param value {@link #organization} (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setOrganization(Reference value) { - this.organization = value; - return this; - } - - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - - /** - * @return {@link #person} (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Reference getPerson() { - if (this.person == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.person"); - else if (Configuration.doAutoCreate()) - this.person = new Reference(); // cc - return this.person; - } - - public boolean hasPerson() { - return this.person != null && !this.person.isEmpty(); - } - - /** - * @param value {@link #person} (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setPerson(Reference value) { - this.person = value; - return this; - } - - /** - * @return {@link #person} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public Patient getPersonTarget() { - if (this.personTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PayeeComponent.person"); - else if (Configuration.doAutoCreate()) - this.personTarget = new Patient(); // aa - return this.personTarget; - } - - /** - * @param value {@link #person} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).) - */ - public PayeeComponent setPersonTarget(Patient value) { - this.personTarget = value; + public PayeeComponent setParty(Type value) { + this.party = value; return this; } protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("type", "Coding", "Party to be reimbursed: Subscriber, provider, other.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The provider who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("person", "Reference(Patient)", "The person other than the subscriber who is to be reimbursed for the claim (the party to whom any benefit is assigned).", 0, java.lang.Integer.MAX_VALUE, person)); + childrenList.add(new Property("type", "Coding", "Type of Party to be reimbursed: Subscriber, provider, other.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("party[x]", "Identifier|Reference(Practitioner|Organization|Patient|RelatedPerson)", "Party to be reimbursed: Subscriber, provider, other.", 0, java.lang.Integer.MAX_VALUE, party)); } @Override public void setProperty(String name, Base value) throws FHIRException { if (name.equals("type")) this.type = castToCoding(value); // Coding - else if (name.equals("provider")) - this.provider = castToReference(value); // Reference - else if (name.equals("organization")) - this.organization = castToReference(value); // Reference - else if (name.equals("person")) - this.person = castToReference(value); // Reference + else if (name.equals("party[x]")) + this.party = (Type) value; // Type else super.setProperty(name, value); } @@ -289,17 +373,13 @@ public class ExplanationOfBenefit extends DomainResource { this.type = new Coding(); return this.type; } - else if (name.equals("provider")) { - this.provider = new Reference(); - return this.provider; + else if (name.equals("partyIdentifier")) { + this.party = new Identifier(); + return this.party; } - else if (name.equals("organization")) { - this.organization = new Reference(); - return this.organization; - } - else if (name.equals("person")) { - this.person = new Reference(); - return this.person; + else if (name.equals("partyReference")) { + this.party = new Reference(); + return this.party; } else return super.addChild(name); @@ -309,9 +389,7 @@ public class ExplanationOfBenefit extends DomainResource { PayeeComponent dst = new PayeeComponent(); copyValues(dst); dst.type = type == null ? null : type.copy(); - dst.provider = provider == null ? null : provider.copy(); - dst.organization = organization == null ? null : organization.copy(); - dst.person = person == null ? null : person.copy(); + dst.party = party == null ? null : party.copy(); return dst; } @@ -322,8 +400,7 @@ public class ExplanationOfBenefit extends DomainResource { if (!(other instanceof PayeeComponent)) return false; PayeeComponent o = (PayeeComponent) other; - return compareDeep(type, o.type, true) && compareDeep(provider, o.provider, true) && compareDeep(organization, o.organization, true) - && compareDeep(person, o.person, true); + return compareDeep(type, o.type, true) && compareDeep(party, o.party, true); } @Override @@ -337,9 +414,7 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (provider == null || provider.isEmpty()) - && (organization == null || organization.isEmpty()) && (person == null || person.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, party); } public String fhirType() { @@ -355,7 +430,7 @@ public class ExplanationOfBenefit extends DomainResource { * Sequence of diagnosis which serves to order and provide a link. */ @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Sequence of diagnosis", formalDefinition="Sequence of diagnosis which serves to order and provide a link." ) + @Description(shortDefinition="Number to covey order of diagnosis", formalDefinition="Sequence of diagnosis which serves to order and provide a link." ) protected PositiveIntType sequence; /** @@ -510,8 +585,7 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (diagnosis == null || diagnosis.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequence, diagnosis); } public String fhirType() { @@ -519,6 +593,266 @@ public class ExplanationOfBenefit extends DomainResource { } + } + + @Block() + public static class ProcedureComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Sequence of procedures which serves to order and provide a link. + */ + @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Procedure sequence for reference", formalDefinition="Sequence of procedures which serves to order and provide a link." ) + protected PositiveIntType sequence; + + /** + * Date and optionally time the procedure was performed . + */ + @Child(name = "date", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the procedure was performed", formalDefinition="Date and optionally time the procedure was performed ." ) + protected DateTimeType date; + + /** + * The procedure code. + */ + @Child(name = "procedure", type = {Coding.class, Procedure.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Patient's list of procedures performed", formalDefinition="The procedure code." ) + protected Type procedure; + + private static final long serialVersionUID = 864307347L; + + /** + * Constructor + */ + public ProcedureComponent() { + super(); + } + + /** + * Constructor + */ + public ProcedureComponent(PositiveIntType sequence, Type procedure) { + super(); + this.sequence = sequence; + this.procedure = procedure; + } + + /** + * @return {@link #sequence} (Sequence of procedures which serves to order and provide a link.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public PositiveIntType getSequenceElement() { + if (this.sequence == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureComponent.sequence"); + else if (Configuration.doAutoCreate()) + this.sequence = new PositiveIntType(); // bb + return this.sequence; + } + + public boolean hasSequenceElement() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + public boolean hasSequence() { + return this.sequence != null && !this.sequence.isEmpty(); + } + + /** + * @param value {@link #sequence} (Sequence of procedures which serves to order and provide a link.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value + */ + public ProcedureComponent setSequenceElement(PositiveIntType value) { + this.sequence = value; + return this; + } + + /** + * @return Sequence of procedures which serves to order and provide a link. + */ + public int getSequence() { + return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); + } + + /** + * @param value Sequence of procedures which serves to order and provide a link. + */ + public ProcedureComponent setSequence(int value) { + if (this.sequence == null) + this.sequence = new PositiveIntType(); + this.sequence.setValue(value); + return this; + } + + /** + * @return {@link #date} (Date and optionally time the procedure was performed .). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ProcedureComponent.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (Date and optionally time the procedure was performed .). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public ProcedureComponent setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return Date and optionally time the procedure was performed . + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value Date and optionally time the procedure was performed . + */ + public ProcedureComponent setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #procedure} (The procedure code.) + */ + public Type getProcedure() { + return this.procedure; + } + + /** + * @return {@link #procedure} (The procedure code.) + */ + public Coding getProcedureCoding() throws FHIRException { + if (!(this.procedure instanceof Coding)) + throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.procedure.getClass().getName()+" was encountered"); + return (Coding) this.procedure; + } + + public boolean hasProcedureCoding() { + return this.procedure instanceof Coding; + } + + /** + * @return {@link #procedure} (The procedure code.) + */ + public Reference getProcedureReference() throws FHIRException { + if (!(this.procedure instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.procedure.getClass().getName()+" was encountered"); + return (Reference) this.procedure; + } + + public boolean hasProcedureReference() { + return this.procedure instanceof Reference; + } + + public boolean hasProcedure() { + return this.procedure != null && !this.procedure.isEmpty(); + } + + /** + * @param value {@link #procedure} (The procedure code.) + */ + public ProcedureComponent setProcedure(Type value) { + this.procedure = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("sequence", "positiveInt", "Sequence of procedures which serves to order and provide a link.", 0, java.lang.Integer.MAX_VALUE, sequence)); + childrenList.add(new Property("date", "dateTime", "Date and optionally time the procedure was performed .", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("procedure[x]", "Coding|Reference(Procedure)", "The procedure code.", 0, java.lang.Integer.MAX_VALUE, procedure)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("sequence")) + this.sequence = castToPositiveInt(value); // PositiveIntType + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("procedure[x]")) + this.procedure = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sequence")) { + throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.sequence"); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.date"); + } + else if (name.equals("procedureCoding")) { + this.procedure = new Coding(); + return this.procedure; + } + else if (name.equals("procedureReference")) { + this.procedure = new Reference(); + return this.procedure; + } + else + return super.addChild(name); + } + + public ProcedureComponent copy() { + ProcedureComponent dst = new ProcedureComponent(); + copyValues(dst); + dst.sequence = sequence == null ? null : sequence.copy(); + dst.date = date == null ? null : date.copy(); + dst.procedure = procedure == null ? null : procedure.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ProcedureComponent)) + return false; + ProcedureComponent o = (ProcedureComponent) other; + return compareDeep(sequence, o.sequence, true) && compareDeep(date, o.date, true) && compareDeep(procedure, o.procedure, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ProcedureComponent)) + return false; + ProcedureComponent o = (ProcedureComponent) other; + return compareValues(sequence, o.sequence, true) && compareValues(date, o.date, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequence, date, procedure); + } + + public String fhirType() { + return "ExplanationOfBenefit.procedure"; + + } + } @Block() @@ -526,30 +860,18 @@ public class ExplanationOfBenefit extends DomainResource { /** * Reference to the program or plan identification, underwriter or payor. */ - @Child(name = "coverage", type = {Coverage.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Child(name = "coverage", type = {Identifier.class, Coverage.class}, order=1, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Insurance information", formalDefinition="Reference to the program or plan identification, underwriter or payor." ) - protected Reference coverage; - - /** - * The actual object that is the target of the reference (Reference to the program or plan identification, underwriter or payor.) - */ - protected Coverage coverageTarget; - - /** - * The relationship of the patient to the subscriber. - */ - @Child(name = "relationship", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Patient relationship to subscriber", formalDefinition="The relationship of the patient to the subscriber." ) - protected Coding relationship; + protected Type coverage; /** * A list of references from the Insurer to which these services pertain. */ - @Child(name = "preAuthRef", type = {StringType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "preAuthRef", type = {StringType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Pre-Authorization/Determination Reference", formalDefinition="A list of references from the Insurer to which these services pertain." ) protected List preAuthRef; - private static final long serialVersionUID = -59672683L; + private static final long serialVersionUID = -21571213L; /** * Constructor @@ -561,24 +883,44 @@ public class ExplanationOfBenefit extends DomainResource { /** * Constructor */ - public CoverageComponent(Reference coverage, Coding relationship) { + public CoverageComponent(Type coverage) { super(); this.coverage = coverage; - this.relationship = relationship; } /** * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) */ - public Reference getCoverage() { - if (this.coverage == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.coverage"); - else if (Configuration.doAutoCreate()) - this.coverage = new Reference(); // cc + public Type getCoverage() { return this.coverage; } + /** + * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) + */ + public Identifier getCoverageIdentifier() throws FHIRException { + if (!(this.coverage instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.coverage.getClass().getName()+" was encountered"); + return (Identifier) this.coverage; + } + + public boolean hasCoverageIdentifier() { + return this.coverage instanceof Identifier; + } + + /** + * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) + */ + public Reference getCoverageReference() throws FHIRException { + if (!(this.coverage instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.coverage.getClass().getName()+" was encountered"); + return (Reference) this.coverage; + } + + public boolean hasCoverageReference() { + return this.coverage instanceof Reference; + } + public boolean hasCoverage() { return this.coverage != null && !this.coverage.isEmpty(); } @@ -586,55 +928,11 @@ public class ExplanationOfBenefit extends DomainResource { /** * @param value {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) */ - public CoverageComponent setCoverage(Reference value) { + public CoverageComponent setCoverage(Type value) { this.coverage = value; return this; } - /** - * @return {@link #coverage} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) - */ - public Coverage getCoverageTarget() { - if (this.coverageTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.coverage"); - else if (Configuration.doAutoCreate()) - this.coverageTarget = new Coverage(); // aa - return this.coverageTarget; - } - - /** - * @param value {@link #coverage} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the program or plan identification, underwriter or payor.) - */ - public CoverageComponent setCoverageTarget(Coverage value) { - this.coverageTarget = value; - return this; - } - - /** - * @return {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public Coding getRelationship() { - if (this.relationship == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create CoverageComponent.relationship"); - else if (Configuration.doAutoCreate()) - this.relationship = new Coding(); // cc - return this.relationship; - } - - public boolean hasRelationship() { - return this.relationship != null && !this.relationship.isEmpty(); - } - - /** - * @param value {@link #relationship} (The relationship of the patient to the subscriber.) - */ - public CoverageComponent setRelationship(Coding value) { - this.relationship = value; - return this; - } - /** * @return {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) */ @@ -691,17 +989,14 @@ public class ExplanationOfBenefit extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("coverage", "Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, coverage)); - childrenList.add(new Property("relationship", "Coding", "The relationship of the patient to the subscriber.", 0, java.lang.Integer.MAX_VALUE, relationship)); + childrenList.add(new Property("coverage[x]", "Identifier|Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, coverage)); childrenList.add(new Property("preAuthRef", "string", "A list of references from the Insurer to which these services pertain.", 0, java.lang.Integer.MAX_VALUE, preAuthRef)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("coverage")) - this.coverage = castToReference(value); // Reference - else if (name.equals("relationship")) - this.relationship = castToCoding(value); // Coding + if (name.equals("coverage[x]")) + this.coverage = (Type) value; // Type else if (name.equals("preAuthRef")) this.getPreAuthRef().add(castToString(value)); else @@ -710,13 +1005,13 @@ public class ExplanationOfBenefit extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("coverage")) { - this.coverage = new Reference(); + if (name.equals("coverageIdentifier")) { + this.coverage = new Identifier(); return this.coverage; } - else if (name.equals("relationship")) { - this.relationship = new Coding(); - return this.relationship; + else if (name.equals("coverageReference")) { + this.coverage = new Reference(); + return this.coverage; } else if (name.equals("preAuthRef")) { throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.preAuthRef"); @@ -729,7 +1024,6 @@ public class ExplanationOfBenefit extends DomainResource { CoverageComponent dst = new CoverageComponent(); copyValues(dst); dst.coverage = coverage == null ? null : coverage.copy(); - dst.relationship = relationship == null ? null : relationship.copy(); if (preAuthRef != null) { dst.preAuthRef = new ArrayList(); for (StringType i : preAuthRef) @@ -745,8 +1039,7 @@ public class ExplanationOfBenefit extends DomainResource { if (!(other instanceof CoverageComponent)) return false; CoverageComponent o = (CoverageComponent) other; - return compareDeep(coverage, o.coverage, true) && compareDeep(relationship, o.relationship, true) - && compareDeep(preAuthRef, o.preAuthRef, true); + return compareDeep(coverage, o.coverage, true) && compareDeep(preAuthRef, o.preAuthRef, true); } @Override @@ -760,8 +1053,7 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (coverage == null || coverage.isEmpty()) && (relationship == null || relationship.isEmpty()) - && (preAuthRef == null || preAuthRef.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( coverage, preAuthRef); } public String fhirType() { @@ -769,6 +1061,173 @@ public class ExplanationOfBenefit extends DomainResource { } + } + + @Block() + public static class OnsetComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The start or start and end dates for the treatable condition. + */ + @Child(name = "time", type = {DateType.class, Period.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Illness, injury or treatable condition date", formalDefinition="The start or start and end dates for the treatable condition." ) + protected Type time; + + /** + * Onset typifications eg. Start of pregnancy, start of illnes, etc. + */ + @Child(name = "type", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Onset of what", formalDefinition="Onset typifications eg. Start of pregnancy, start of illnes, etc." ) + protected Coding type; + + private static final long serialVersionUID = -560173231L; + + /** + * Constructor + */ + public OnsetComponent() { + super(); + } + + /** + * @return {@link #time} (The start or start and end dates for the treatable condition.) + */ + public Type getTime() { + return this.time; + } + + /** + * @return {@link #time} (The start or start and end dates for the treatable condition.) + */ + public DateType getTimeDateType() throws FHIRException { + if (!(this.time instanceof DateType)) + throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.time.getClass().getName()+" was encountered"); + return (DateType) this.time; + } + + public boolean hasTimeDateType() { + return this.time instanceof DateType; + } + + /** + * @return {@link #time} (The start or start and end dates for the treatable condition.) + */ + public Period getTimePeriod() throws FHIRException { + if (!(this.time instanceof Period)) + throw new FHIRException("Type mismatch: the type Period was expected, but "+this.time.getClass().getName()+" was encountered"); + return (Period) this.time; + } + + public boolean hasTimePeriod() { + return this.time instanceof Period; + } + + public boolean hasTime() { + return this.time != null && !this.time.isEmpty(); + } + + /** + * @param value {@link #time} (The start or start and end dates for the treatable condition.) + */ + public OnsetComponent setTime(Type value) { + this.time = value; + return this; + } + + /** + * @return {@link #type} (Onset typifications eg. Start of pregnancy, start of illnes, etc.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create OnsetComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Onset typifications eg. Start of pregnancy, start of illnes, etc.) + */ + public OnsetComponent setType(Coding value) { + this.type = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("time[x]", "date|Period", "The start or start and end dates for the treatable condition.", 0, java.lang.Integer.MAX_VALUE, time)); + childrenList.add(new Property("type", "Coding", "Onset typifications eg. Start of pregnancy, start of illnes, etc.", 0, java.lang.Integer.MAX_VALUE, type)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("time[x]")) + this.time = (Type) value; // Type + else if (name.equals("type")) + this.type = castToCoding(value); // Coding + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("timeDate")) { + this.time = new DateType(); + return this.time; + } + else if (name.equals("timePeriod")) { + this.time = new Period(); + return this.time; + } + else if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else + return super.addChild(name); + } + + public OnsetComponent copy() { + OnsetComponent dst = new OnsetComponent(); + copyValues(dst); + dst.time = time == null ? null : time.copy(); + dst.type = type == null ? null : type.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof OnsetComponent)) + return false; + OnsetComponent o = (OnsetComponent) other; + return compareDeep(time, o.time, true) && compareDeep(type, o.type, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof OnsetComponent)) + return false; + OnsetComponent o = (OnsetComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( time, type); + } + + public String fhirType() { + return "ExplanationOfBenefit.onset"; + + } + } @Block() @@ -790,135 +1249,163 @@ public class ExplanationOfBenefit extends DomainResource { /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name = "provider", type = {Practitioner.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "provider", type = {Identifier.class, Practitioner.class}, order=3, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference provider; + protected Type provider; /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) + * The practitioner who is supervising the work of the servicing provider(s). */ - protected Practitioner providerTarget; + @Child(name = "supervisor", type = {Identifier.class, Practitioner.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Supervising Practitioner", formalDefinition="The practitioner who is supervising the work of the servicing provider(s)." ) + protected Type supervisor; + + /** + * The qualification which is applicable for this service. + */ + @Child(name = "providerQualification", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type, classification or Specialization", formalDefinition="The qualification which is applicable for this service." ) + protected Coding providerQualification; /** * Diagnosis applicable for this service or product line. */ - @Child(name = "diagnosisLinkId", type = {PositiveIntType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Diagnosis Link", formalDefinition="Diagnosis applicable for this service or product line." ) + @Child(name = "diagnosisLinkId", type = {PositiveIntType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Applicable diagnoses", formalDefinition="Diagnosis applicable for this service or product line." ) protected List diagnosisLinkId; /** * If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied. */ - @Child(name = "service", type = {Coding.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Child(name = "service", type = {Coding.class}, order=7, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Item Code", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied." ) protected Coding service; + /** + * Unusual circumstances which may influence adjudication. + */ + @Child(name = "serviceModifier", type = {Coding.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Service/Product modifiers", formalDefinition="Unusual circumstances which may influence adjudication." ) + protected List serviceModifier; + + /** + * Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. + */ + @Child(name = "modifier", type = {Coding.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." ) + protected List modifier; + + /** + * For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program. + */ + @Child(name = "programCode", type = {Coding.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Program specific reason for item inclusion", formalDefinition="For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program." ) + protected List programCode; + /** * The date or dates when the enclosed suite of services were performed or completed. */ - @Child(name = "serviced", type = {DateType.class, Period.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "serviced", type = {DateType.class, Period.class}, order=11, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Date or dates of Service", formalDefinition="The date or dates when the enclosed suite of services were performed or completed." ) protected Type serviced; /** * Where the service was provided. */ - @Child(name = "place", type = {Coding.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "place", type = {Coding.class}, order=12, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Place of service", formalDefinition="Where the service was provided." ) protected Coding place; /** * The number of repetitions of a service or product. */ - @Child(name = "quantity", type = {SimpleQuantity.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "quantity", type = {SimpleQuantity.class}, order=13, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) protected SimpleQuantity quantity; /** * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. */ - @Child(name = "unitPrice", type = {Money.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Child(name = "unitPrice", type = {Money.class}, order=14, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) protected Money unitPrice; /** * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. */ - @Child(name = "factor", type = {DecimalType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Child(name = "factor", type = {DecimalType.class}, order=15, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) protected DecimalType factor; /** * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. */ - @Child(name = "points", type = {DecimalType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Child(name = "points", type = {DecimalType.class}, order=16, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) protected DecimalType points; /** * The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. */ - @Child(name = "net", type = {Money.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Child(name = "net", type = {Money.class}, order=17, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Total item cost", formalDefinition="The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) protected Money net; /** * List of Unique Device Identifiers associated with this line item. */ - @Child(name = "udi", type = {Coding.class}, order=13, min=0, max=1, modifier=false, summary=true) + @Child(name = "udi", type = {Device.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; + protected List udi; + /** + * The actual objects that are the target of the reference (List of Unique Device Identifiers associated with this line item.) + */ + protected List udiTarget; + /** * Physical service site on the patient (limb, tooth, etc). */ - @Child(name = "bodySite", type = {Coding.class}, order=14, min=0, max=1, modifier=false, summary=true) + @Child(name = "bodySite", type = {Coding.class}, order=19, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Service Location", formalDefinition="Physical service site on the patient (limb, tooth, etc)." ) protected Coding bodySite; /** * A region or surface of the site, eg. limb region or tooth surface(s). */ - @Child(name = "subSite", type = {Coding.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "subSite", type = {Coding.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Service Sub-location", formalDefinition="A region or surface of the site, eg. limb region or tooth surface(s)." ) protected List subSite; - /** - * Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. - */ - @Child(name = "modifier", type = {Coding.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." ) - protected List modifier; - /** * A list of note references to the notes provided below. */ - @Child(name = "noteNumber", type = {PositiveIntType.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "noteNumber", type = {PositiveIntType.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="List of note numbers which apply", formalDefinition="A list of note references to the notes provided below." ) protected List noteNumber; /** * The adjudications results. */ - @Child(name = "adjudication", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "adjudication", type = {}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Adjudication details", formalDefinition="The adjudications results." ) protected List adjudication; /** * Second tier of goods and services. */ - @Child(name = "detail", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "detail", type = {}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Additional items", formalDefinition="Second tier of goods and services." ) protected List detail; /** * The materials and placement date of prior fixed prosthesis. */ - @Child(name = "prosthesis", type = {}, order=20, min=0, max=1, modifier=false, summary=true) + @Child(name = "prosthesis", type = {}, order=24, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Prosthetic details", formalDefinition="The materials and placement date of prior fixed prosthesis." ) protected ProsthesisComponent prosthesis; - private static final long serialVersionUID = 1380825950L; + private static final long serialVersionUID = 2037926144L; /** * Constructor @@ -1009,15 +1496,36 @@ public class ExplanationOfBenefit extends DomainResource { /** * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc + public Type getProvider() { return this.provider; } + /** + * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Identifier getProviderIdentifier() throws FHIRException { + if (!(this.provider instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.provider.getClass().getName()+" was encountered"); + return (Identifier) this.provider; + } + + public boolean hasProviderIdentifier() { + return this.provider instanceof Identifier; + } + + /** + * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getProviderReference() throws FHIRException { + if (!(this.provider instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.provider.getClass().getName()+" was encountered"); + return (Reference) this.provider; + } + + public boolean hasProviderReference() { + return this.provider instanceof Reference; + } + public boolean hasProvider() { return this.provider != null && !this.provider.isEmpty(); } @@ -1025,28 +1533,77 @@ public class ExplanationOfBenefit extends DomainResource { /** * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) */ - public ItemsComponent setProvider(Reference value) { + public ItemsComponent setProvider(Type value) { this.provider = value; return this; } /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + * @return {@link #supervisor} (The practitioner who is supervising the work of the servicing provider(s).) */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; + public Type getSupervisor() { + return this.supervisor; } /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) + * @return {@link #supervisor} (The practitioner who is supervising the work of the servicing provider(s).) */ - public ItemsComponent setProviderTarget(Practitioner value) { - this.providerTarget = value; + public Identifier getSupervisorIdentifier() throws FHIRException { + if (!(this.supervisor instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.supervisor.getClass().getName()+" was encountered"); + return (Identifier) this.supervisor; + } + + public boolean hasSupervisorIdentifier() { + return this.supervisor instanceof Identifier; + } + + /** + * @return {@link #supervisor} (The practitioner who is supervising the work of the servicing provider(s).) + */ + public Reference getSupervisorReference() throws FHIRException { + if (!(this.supervisor instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.supervisor.getClass().getName()+" was encountered"); + return (Reference) this.supervisor; + } + + public boolean hasSupervisorReference() { + return this.supervisor instanceof Reference; + } + + public boolean hasSupervisor() { + return this.supervisor != null && !this.supervisor.isEmpty(); + } + + /** + * @param value {@link #supervisor} (The practitioner who is supervising the work of the servicing provider(s).) + */ + public ItemsComponent setSupervisor(Type value) { + this.supervisor = value; + return this; + } + + /** + * @return {@link #providerQualification} (The qualification which is applicable for this service.) + */ + public Coding getProviderQualification() { + if (this.providerQualification == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ItemsComponent.providerQualification"); + else if (Configuration.doAutoCreate()) + this.providerQualification = new Coding(); // cc + return this.providerQualification; + } + + public boolean hasProviderQualification() { + return this.providerQualification != null && !this.providerQualification.isEmpty(); + } + + /** + * @param value {@link #providerQualification} (The qualification which is applicable for this service.) + */ + public ItemsComponent setProviderQualification(Coding value) { + this.providerQualification = value; return this; } @@ -1128,6 +1685,126 @@ public class ExplanationOfBenefit extends DomainResource { return this; } + /** + * @return {@link #serviceModifier} (Unusual circumstances which may influence adjudication.) + */ + public List getServiceModifier() { + if (this.serviceModifier == null) + this.serviceModifier = new ArrayList(); + return this.serviceModifier; + } + + public boolean hasServiceModifier() { + if (this.serviceModifier == null) + return false; + for (Coding item : this.serviceModifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #serviceModifier} (Unusual circumstances which may influence adjudication.) + */ + // syntactic sugar + public Coding addServiceModifier() { //3 + Coding t = new Coding(); + if (this.serviceModifier == null) + this.serviceModifier = new ArrayList(); + this.serviceModifier.add(t); + return t; + } + + // syntactic sugar + public ItemsComponent addServiceModifier(Coding t) { //3 + if (t == null) + return this; + if (this.serviceModifier == null) + this.serviceModifier = new ArrayList(); + this.serviceModifier.add(t); + return this; + } + + /** + * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) + */ + public List getModifier() { + if (this.modifier == null) + this.modifier = new ArrayList(); + return this.modifier; + } + + public boolean hasModifier() { + if (this.modifier == null) + return false; + for (Coding item : this.modifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) + */ + // syntactic sugar + public Coding addModifier() { //3 + Coding t = new Coding(); + if (this.modifier == null) + this.modifier = new ArrayList(); + this.modifier.add(t); + return t; + } + + // syntactic sugar + public ItemsComponent addModifier(Coding t) { //3 + if (t == null) + return this; + if (this.modifier == null) + this.modifier = new ArrayList(); + this.modifier.add(t); + return this; + } + + /** + * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) + */ + public List getProgramCode() { + if (this.programCode == null) + this.programCode = new ArrayList(); + return this.programCode; + } + + public boolean hasProgramCode() { + if (this.programCode == null) + return false; + for (Coding item : this.programCode) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) + */ + // syntactic sugar + public Coding addProgramCode() { //3 + Coding t = new Coding(); + if (this.programCode == null) + this.programCode = new ArrayList(); + this.programCode.add(t); + return t; + } + + // syntactic sugar + public ItemsComponent addProgramCode(Coding t) { //3 + if (t == null) + return this; + if (this.programCode == null) + this.programCode = new ArrayList(); + this.programCode.add(t); + return this; + } + /** * @return {@link #serviced} (The date or dates when the enclosed suite of services were performed or completed.) */ @@ -1406,27 +2083,64 @@ public class ExplanationOfBenefit extends DomainResource { /** * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) */ - public Coding getUdi() { + public List getUdi() { if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ItemsComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc + this.udi = new ArrayList(); return this.udi; } public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); + if (this.udi == null) + return false; + for (Reference item : this.udi) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) + * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) */ - public ItemsComponent setUdi(Coding value) { - this.udi = value; + // syntactic sugar + public Reference addUdi() { //3 + Reference t = new Reference(); + if (this.udi == null) + this.udi = new ArrayList(); + this.udi.add(t); + return t; + } + + // syntactic sugar + public ItemsComponent addUdi(Reference t) { //3 + if (t == null) + return this; + if (this.udi == null) + this.udi = new ArrayList(); + this.udi.add(t); return this; } + /** + * @return {@link #udi} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) + */ + public List getUdiTarget() { + if (this.udiTarget == null) + this.udiTarget = new ArrayList(); + return this.udiTarget; + } + + // syntactic sugar + /** + * @return {@link #udi} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) + */ + public Device addUdiTarget() { + Device r = new Device(); + if (this.udiTarget == null) + this.udiTarget = new ArrayList(); + this.udiTarget.add(r); + return r; + } + /** * @return {@link #bodySite} (Physical service site on the patient (limb, tooth, etc).) */ @@ -1491,46 +2205,6 @@ public class ExplanationOfBenefit extends DomainResource { return this; } - /** - * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) - */ - public List getModifier() { - if (this.modifier == null) - this.modifier = new ArrayList(); - return this.modifier; - } - - public boolean hasModifier() { - if (this.modifier == null) - return false; - for (Coding item : this.modifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) - */ - // syntactic sugar - public Coding addModifier() { //3 - Coding t = new Coding(); - if (this.modifier == null) - this.modifier = new ArrayList(); - this.modifier.add(t); - return t; - } - - // syntactic sugar - public ItemsComponent addModifier(Coding t) { //3 - if (t == null) - return this; - if (this.modifier == null) - this.modifier = new ArrayList(); - this.modifier.add(t); - return this; - } - /** * @return {@link #noteNumber} (A list of note references to the notes provided below.) */ @@ -1693,9 +2367,14 @@ public class ExplanationOfBenefit extends DomainResource { super.listChildren(childrenList); childrenList.add(new Property("sequence", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); + childrenList.add(new Property("provider[x]", "Identifier|Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); + childrenList.add(new Property("supervisor[x]", "Identifier|Reference(Practitioner)", "The practitioner who is supervising the work of the servicing provider(s).", 0, java.lang.Integer.MAX_VALUE, supervisor)); + childrenList.add(new Property("providerQualification", "Coding", "The qualification which is applicable for this service.", 0, java.lang.Integer.MAX_VALUE, providerQualification)); childrenList.add(new Property("diagnosisLinkId", "positiveInt", "Diagnosis applicable for this service or product line.", 0, java.lang.Integer.MAX_VALUE, diagnosisLinkId)); childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); + childrenList.add(new Property("serviceModifier", "Coding", "Unusual circumstances which may influence adjudication.", 0, java.lang.Integer.MAX_VALUE, serviceModifier)); + childrenList.add(new Property("modifier", "Coding", "Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.", 0, java.lang.Integer.MAX_VALUE, modifier)); + childrenList.add(new Property("programCode", "Coding", "For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.", 0, java.lang.Integer.MAX_VALUE, programCode)); childrenList.add(new Property("serviced[x]", "date|Period", "The date or dates when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, serviced)); childrenList.add(new Property("place", "Coding", "Where the service was provided.", 0, java.lang.Integer.MAX_VALUE, place)); childrenList.add(new Property("quantity", "SimpleQuantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); @@ -1703,10 +2382,9 @@ public class ExplanationOfBenefit extends DomainResource { childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); childrenList.add(new Property("net", "Money", "The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); + childrenList.add(new Property("udi", "Reference(Device)", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); childrenList.add(new Property("bodySite", "Coding", "Physical service site on the patient (limb, tooth, etc).", 0, java.lang.Integer.MAX_VALUE, bodySite)); childrenList.add(new Property("subSite", "Coding", "A region or surface of the site, eg. limb region or tooth surface(s).", 0, java.lang.Integer.MAX_VALUE, subSite)); - childrenList.add(new Property("modifier", "Coding", "Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.", 0, java.lang.Integer.MAX_VALUE, modifier)); childrenList.add(new Property("noteNumber", "positiveInt", "A list of note references to the notes provided below.", 0, java.lang.Integer.MAX_VALUE, noteNumber)); childrenList.add(new Property("adjudication", "", "The adjudications results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); childrenList.add(new Property("detail", "", "Second tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, detail)); @@ -1719,12 +2397,22 @@ public class ExplanationOfBenefit extends DomainResource { this.sequence = castToPositiveInt(value); // PositiveIntType else if (name.equals("type")) this.type = castToCoding(value); // Coding - else if (name.equals("provider")) - this.provider = castToReference(value); // Reference + else if (name.equals("provider[x]")) + this.provider = (Type) value; // Type + else if (name.equals("supervisor[x]")) + this.supervisor = (Type) value; // Type + else if (name.equals("providerQualification")) + this.providerQualification = castToCoding(value); // Coding else if (name.equals("diagnosisLinkId")) this.getDiagnosisLinkId().add(castToPositiveInt(value)); else if (name.equals("service")) this.service = castToCoding(value); // Coding + else if (name.equals("serviceModifier")) + this.getServiceModifier().add(castToCoding(value)); + else if (name.equals("modifier")) + this.getModifier().add(castToCoding(value)); + else if (name.equals("programCode")) + this.getProgramCode().add(castToCoding(value)); else if (name.equals("serviced[x]")) this.serviced = (Type) value; // Type else if (name.equals("place")) @@ -1740,13 +2428,11 @@ public class ExplanationOfBenefit extends DomainResource { else if (name.equals("net")) this.net = castToMoney(value); // Money else if (name.equals("udi")) - this.udi = castToCoding(value); // Coding + this.getUdi().add(castToReference(value)); else if (name.equals("bodySite")) this.bodySite = castToCoding(value); // Coding else if (name.equals("subSite")) this.getSubSite().add(castToCoding(value)); - else if (name.equals("modifier")) - this.getModifier().add(castToCoding(value)); else if (name.equals("noteNumber")) this.getNoteNumber().add(castToPositiveInt(value)); else if (name.equals("adjudication")) @@ -1768,10 +2454,26 @@ public class ExplanationOfBenefit extends DomainResource { this.type = new Coding(); return this.type; } - else if (name.equals("provider")) { + else if (name.equals("providerIdentifier")) { + this.provider = new Identifier(); + return this.provider; + } + else if (name.equals("providerReference")) { this.provider = new Reference(); return this.provider; } + else if (name.equals("supervisorIdentifier")) { + this.supervisor = new Identifier(); + return this.supervisor; + } + else if (name.equals("supervisorReference")) { + this.supervisor = new Reference(); + return this.supervisor; + } + else if (name.equals("providerQualification")) { + this.providerQualification = new Coding(); + return this.providerQualification; + } else if (name.equals("diagnosisLinkId")) { throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.diagnosisLinkId"); } @@ -1779,6 +2481,15 @@ public class ExplanationOfBenefit extends DomainResource { this.service = new Coding(); return this.service; } + else if (name.equals("serviceModifier")) { + return addServiceModifier(); + } + else if (name.equals("modifier")) { + return addModifier(); + } + else if (name.equals("programCode")) { + return addProgramCode(); + } else if (name.equals("servicedDate")) { this.serviced = new DateType(); return this.serviced; @@ -1810,8 +2521,7 @@ public class ExplanationOfBenefit extends DomainResource { return this.net; } else if (name.equals("udi")) { - this.udi = new Coding(); - return this.udi; + return addUdi(); } else if (name.equals("bodySite")) { this.bodySite = new Coding(); @@ -1820,9 +2530,6 @@ public class ExplanationOfBenefit extends DomainResource { else if (name.equals("subSite")) { return addSubSite(); } - else if (name.equals("modifier")) { - return addModifier(); - } else if (name.equals("noteNumber")) { throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.noteNumber"); } @@ -1846,12 +2553,29 @@ public class ExplanationOfBenefit extends DomainResource { dst.sequence = sequence == null ? null : sequence.copy(); dst.type = type == null ? null : type.copy(); dst.provider = provider == null ? null : provider.copy(); + dst.supervisor = supervisor == null ? null : supervisor.copy(); + dst.providerQualification = providerQualification == null ? null : providerQualification.copy(); if (diagnosisLinkId != null) { dst.diagnosisLinkId = new ArrayList(); for (PositiveIntType i : diagnosisLinkId) dst.diagnosisLinkId.add(i.copy()); }; dst.service = service == null ? null : service.copy(); + if (serviceModifier != null) { + dst.serviceModifier = new ArrayList(); + for (Coding i : serviceModifier) + dst.serviceModifier.add(i.copy()); + }; + if (modifier != null) { + dst.modifier = new ArrayList(); + for (Coding i : modifier) + dst.modifier.add(i.copy()); + }; + if (programCode != null) { + dst.programCode = new ArrayList(); + for (Coding i : programCode) + dst.programCode.add(i.copy()); + }; dst.serviced = serviced == null ? null : serviced.copy(); dst.place = place == null ? null : place.copy(); dst.quantity = quantity == null ? null : quantity.copy(); @@ -1859,18 +2583,17 @@ public class ExplanationOfBenefit extends DomainResource { dst.factor = factor == null ? null : factor.copy(); dst.points = points == null ? null : points.copy(); dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); + if (udi != null) { + dst.udi = new ArrayList(); + for (Reference i : udi) + dst.udi.add(i.copy()); + }; dst.bodySite = bodySite == null ? null : bodySite.copy(); if (subSite != null) { dst.subSite = new ArrayList(); for (Coding i : subSite) dst.subSite.add(i.copy()); }; - if (modifier != null) { - dst.modifier = new ArrayList(); - for (Coding i : modifier) - dst.modifier.add(i.copy()); - }; if (noteNumber != null) { dst.noteNumber = new ArrayList(); for (PositiveIntType i : noteNumber) @@ -1898,11 +2621,13 @@ public class ExplanationOfBenefit extends DomainResource { return false; ItemsComponent o = (ItemsComponent) other; return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(provider, o.provider, true) + && compareDeep(supervisor, o.supervisor, true) && compareDeep(providerQualification, o.providerQualification, true) && compareDeep(diagnosisLinkId, o.diagnosisLinkId, true) && compareDeep(service, o.service, true) - && compareDeep(serviced, o.serviced, true) && compareDeep(place, o.place, true) && compareDeep(quantity, o.quantity, true) - && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) && compareDeep(points, o.points, true) - && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) && compareDeep(bodySite, o.bodySite, true) - && compareDeep(subSite, o.subSite, true) && compareDeep(modifier, o.modifier, true) && compareDeep(noteNumber, o.noteNumber, true) + && compareDeep(serviceModifier, o.serviceModifier, true) && compareDeep(modifier, o.modifier, true) + && compareDeep(programCode, o.programCode, true) && compareDeep(serviced, o.serviced, true) && compareDeep(place, o.place, true) + && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) + && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) + && compareDeep(bodySite, o.bodySite, true) && compareDeep(subSite, o.subSite, true) && compareDeep(noteNumber, o.noteNumber, true) && compareDeep(adjudication, o.adjudication, true) && compareDeep(detail, o.detail, true) && compareDeep(prosthesis, o.prosthesis, true) ; } @@ -1920,15 +2645,10 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (provider == null || provider.isEmpty()) && (diagnosisLinkId == null || diagnosisLinkId.isEmpty()) - && (service == null || service.isEmpty()) && (serviced == null || serviced.isEmpty()) && (place == null || place.isEmpty()) - && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()) && (bodySite == null || bodySite.isEmpty()) && (subSite == null || subSite.isEmpty()) - && (modifier == null || modifier.isEmpty()) && (noteNumber == null || noteNumber.isEmpty()) - && (adjudication == null || adjudication.isEmpty()) && (detail == null || detail.isEmpty()) - && (prosthesis == null || prosthesis.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequence, type, provider, supervisor + , providerQualification, diagnosisLinkId, service, serviceModifier, modifier, programCode + , serviced, place, quantity, unitPrice, factor, points, net, udi, bodySite, subSite + , noteNumber, adjudication, detail, prosthesis); } public String fhirType() { @@ -2199,8 +2919,8 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (category == null || category.isEmpty()) && (reason == null || reason.isEmpty()) - && (amount == null || amount.isEmpty()) && (value == null || value.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( category, reason, amount, value + ); } public String fhirType() { @@ -2233,63 +2953,75 @@ public class ExplanationOfBenefit extends DomainResource { @Description(shortDefinition="Additional item codes", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied." ) protected Coding service; + /** + * For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program. + */ + @Child(name = "programCode", type = {Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Program specific reason for item inclusion", formalDefinition="For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program." ) + protected List programCode; + /** * The number of repetitions of a service or product. */ - @Child(name = "quantity", type = {SimpleQuantity.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "quantity", type = {SimpleQuantity.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) protected SimpleQuantity quantity; /** * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. */ - @Child(name = "unitPrice", type = {Money.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "unitPrice", type = {Money.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) protected Money unitPrice; /** * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. */ - @Child(name = "factor", type = {DecimalType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "factor", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) protected DecimalType factor; /** * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. */ - @Child(name = "points", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "points", type = {DecimalType.class}, order=8, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) protected DecimalType points; /** * The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. */ - @Child(name = "net", type = {Money.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "net", type = {Money.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Total additional item cost", formalDefinition="The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) protected Money net; /** * List of Unique Device Identifiers associated with this line item. */ - @Child(name = "udi", type = {Coding.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Child(name = "udi", type = {Device.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; + protected List udi; + /** + * The actual objects that are the target of the reference (List of Unique Device Identifiers associated with this line item.) + */ + protected List udiTarget; + /** * The adjudications results. */ - @Child(name = "adjudication", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "adjudication", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Detail adjudication", formalDefinition="The adjudications results." ) protected List adjudication; /** * Third tier of goods and services. */ - @Child(name = "subDetail", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "subDetail", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Additional items", formalDefinition="Third tier of goods and services." ) protected List subDetail; - private static final long serialVersionUID = 157913723L; + private static final long serialVersionUID = -240637412L; /** * Constructor @@ -2401,6 +3133,46 @@ public class ExplanationOfBenefit extends DomainResource { return this; } + /** + * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) + */ + public List getProgramCode() { + if (this.programCode == null) + this.programCode = new ArrayList(); + return this.programCode; + } + + public boolean hasProgramCode() { + if (this.programCode == null) + return false; + for (Coding item : this.programCode) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) + */ + // syntactic sugar + public Coding addProgramCode() { //3 + Coding t = new Coding(); + if (this.programCode == null) + this.programCode = new ArrayList(); + this.programCode.add(t); + return t; + } + + // syntactic sugar + public DetailComponent addProgramCode(Coding t) { //3 + if (t == null) + return this; + if (this.programCode == null) + this.programCode = new ArrayList(); + this.programCode.add(t); + return this; + } + /** * @return {@link #quantity} (The number of repetitions of a service or product.) */ @@ -2610,27 +3382,64 @@ public class ExplanationOfBenefit extends DomainResource { /** * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) */ - public Coding getUdi() { + public List getUdi() { if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc + this.udi = new ArrayList(); return this.udi; } public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); + if (this.udi == null) + return false; + for (Reference item : this.udi) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) + * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) */ - public DetailComponent setUdi(Coding value) { - this.udi = value; + // syntactic sugar + public Reference addUdi() { //3 + Reference t = new Reference(); + if (this.udi == null) + this.udi = new ArrayList(); + this.udi.add(t); + return t; + } + + // syntactic sugar + public DetailComponent addUdi(Reference t) { //3 + if (t == null) + return this; + if (this.udi == null) + this.udi = new ArrayList(); + this.udi.add(t); return this; } + /** + * @return {@link #udi} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) + */ + public List getUdiTarget() { + if (this.udiTarget == null) + this.udiTarget = new ArrayList(); + return this.udiTarget; + } + + // syntactic sugar + /** + * @return {@link #udi} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) + */ + public Device addUdiTarget() { + Device r = new Device(); + if (this.udiTarget == null) + this.udiTarget = new ArrayList(); + this.udiTarget.add(r); + return r; + } + /** * @return {@link #adjudication} (The adjudications results.) */ @@ -2716,12 +3525,13 @@ public class ExplanationOfBenefit extends DomainResource { childrenList.add(new Property("sequence", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); + childrenList.add(new Property("programCode", "Coding", "For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.", 0, java.lang.Integer.MAX_VALUE, programCode)); childrenList.add(new Property("quantity", "SimpleQuantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); childrenList.add(new Property("unitPrice", "Money", "If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); childrenList.add(new Property("net", "Money", "The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); + childrenList.add(new Property("udi", "Reference(Device)", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); childrenList.add(new Property("adjudication", "", "The adjudications results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); childrenList.add(new Property("subDetail", "", "Third tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, subDetail)); } @@ -2734,6 +3544,8 @@ public class ExplanationOfBenefit extends DomainResource { this.type = castToCoding(value); // Coding else if (name.equals("service")) this.service = castToCoding(value); // Coding + else if (name.equals("programCode")) + this.getProgramCode().add(castToCoding(value)); else if (name.equals("quantity")) this.quantity = castToSimpleQuantity(value); // SimpleQuantity else if (name.equals("unitPrice")) @@ -2745,7 +3557,7 @@ public class ExplanationOfBenefit extends DomainResource { else if (name.equals("net")) this.net = castToMoney(value); // Money else if (name.equals("udi")) - this.udi = castToCoding(value); // Coding + this.getUdi().add(castToReference(value)); else if (name.equals("adjudication")) this.getAdjudication().add((DetailAdjudicationComponent) value); else if (name.equals("subDetail")) @@ -2767,6 +3579,9 @@ public class ExplanationOfBenefit extends DomainResource { this.service = new Coding(); return this.service; } + else if (name.equals("programCode")) { + return addProgramCode(); + } else if (name.equals("quantity")) { this.quantity = new SimpleQuantity(); return this.quantity; @@ -2786,8 +3601,7 @@ public class ExplanationOfBenefit extends DomainResource { return this.net; } else if (name.equals("udi")) { - this.udi = new Coding(); - return this.udi; + return addUdi(); } else if (name.equals("adjudication")) { return addAdjudication(); @@ -2805,12 +3619,21 @@ public class ExplanationOfBenefit extends DomainResource { dst.sequence = sequence == null ? null : sequence.copy(); dst.type = type == null ? null : type.copy(); dst.service = service == null ? null : service.copy(); + if (programCode != null) { + dst.programCode = new ArrayList(); + for (Coding i : programCode) + dst.programCode.add(i.copy()); + }; dst.quantity = quantity == null ? null : quantity.copy(); dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); dst.factor = factor == null ? null : factor.copy(); dst.points = points == null ? null : points.copy(); dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); + if (udi != null) { + dst.udi = new ArrayList(); + for (Reference i : udi) + dst.udi.add(i.copy()); + }; if (adjudication != null) { dst.adjudication = new ArrayList(); for (DetailAdjudicationComponent i : adjudication) @@ -2832,9 +3655,9 @@ public class ExplanationOfBenefit extends DomainResource { return false; DetailComponent o = (DetailComponent) other; return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(service, o.service, true) - && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) - && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) - && compareDeep(adjudication, o.adjudication, true) && compareDeep(subDetail, o.subDetail, true) + && compareDeep(programCode, o.programCode, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) + && compareDeep(factor, o.factor, true) && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) + && compareDeep(udi, o.udi, true) && compareDeep(adjudication, o.adjudication, true) && compareDeep(subDetail, o.subDetail, true) ; } @@ -2850,11 +3673,8 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (service == null || service.isEmpty()) && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()) && (adjudication == null || adjudication.isEmpty()) && (subDetail == null || subDetail.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequence, type, service, programCode + , quantity, unitPrice, factor, points, net, udi, adjudication, subDetail); } public String fhirType() { @@ -2869,9 +3689,9 @@ public class ExplanationOfBenefit extends DomainResource { /** * Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc. */ - @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Child(name = "category", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Adjudication category such as co-pay, eligible, benefit, etc.", formalDefinition="Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc." ) - protected Coding code; + protected Coding category; /** * Adjudication reason such as limit reached. @@ -2894,7 +3714,7 @@ public class ExplanationOfBenefit extends DomainResource { @Description(shortDefinition="Non-monitory value", formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above." ) protected DecimalType value; - private static final long serialVersionUID = 746807621L; + private static final long serialVersionUID = -1926987562L; /** * Constructor @@ -2906,32 +3726,32 @@ public class ExplanationOfBenefit extends DomainResource { /** * Constructor */ - public DetailAdjudicationComponent(Coding code) { + public DetailAdjudicationComponent(Coding category) { super(); - this.code = code; + this.category = category; } /** - * @return {@link #code} (Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.) + * @return {@link #category} (Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.) */ - public Coding getCode() { - if (this.code == null) + public Coding getCategory() { + if (this.category == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailAdjudicationComponent.code"); + throw new Error("Attempt to auto-create DetailAdjudicationComponent.category"); else if (Configuration.doAutoCreate()) - this.code = new Coding(); // cc - return this.code; + this.category = new Coding(); // cc + return this.category; } - public boolean hasCode() { - return this.code != null && !this.code.isEmpty(); + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); } /** - * @param value {@link #code} (Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.) + * @param value {@link #category} (Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.) */ - public DetailAdjudicationComponent setCode(Coding value) { - this.code = value; + public DetailAdjudicationComponent setCategory(Coding value) { + this.category = value; return this; } @@ -3052,7 +3872,7 @@ public class ExplanationOfBenefit extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("code", "Coding", "Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("category", "Coding", "Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, category)); childrenList.add(new Property("reason", "Coding", "Adjudication reason such as limit reached.", 0, java.lang.Integer.MAX_VALUE, reason)); childrenList.add(new Property("amount", "Money", "Monitory amount associated with the code.", 0, java.lang.Integer.MAX_VALUE, amount)); childrenList.add(new Property("value", "decimal", "A non-monetary value for example a percentage. Mutually exclusive to the amount element above.", 0, java.lang.Integer.MAX_VALUE, value)); @@ -3060,8 +3880,8 @@ public class ExplanationOfBenefit extends DomainResource { @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("code")) - this.code = castToCoding(value); // Coding + if (name.equals("category")) + this.category = castToCoding(value); // Coding else if (name.equals("reason")) this.reason = castToCoding(value); // Coding else if (name.equals("amount")) @@ -3074,9 +3894,9 @@ public class ExplanationOfBenefit extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("code")) { - this.code = new Coding(); - return this.code; + if (name.equals("category")) { + this.category = new Coding(); + return this.category; } else if (name.equals("reason")) { this.reason = new Coding(); @@ -3096,7 +3916,7 @@ public class ExplanationOfBenefit extends DomainResource { public DetailAdjudicationComponent copy() { DetailAdjudicationComponent dst = new DetailAdjudicationComponent(); copyValues(dst); - dst.code = code == null ? null : code.copy(); + dst.category = category == null ? null : category.copy(); dst.reason = reason == null ? null : reason.copy(); dst.amount = amount == null ? null : amount.copy(); dst.value = value == null ? null : value.copy(); @@ -3110,7 +3930,7 @@ public class ExplanationOfBenefit extends DomainResource { if (!(other instanceof DetailAdjudicationComponent)) return false; DetailAdjudicationComponent o = (DetailAdjudicationComponent) other; - return compareDeep(code, o.code, true) && compareDeep(reason, o.reason, true) && compareDeep(amount, o.amount, true) + return compareDeep(category, o.category, true) && compareDeep(reason, o.reason, true) && compareDeep(amount, o.amount, true) && compareDeep(value, o.value, true); } @@ -3125,8 +3945,8 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (reason == null || reason.isEmpty()) - && (amount == null || amount.isEmpty()) && (value == null || value.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( category, reason, amount, value + ); } public String fhirType() { @@ -3159,56 +3979,68 @@ public class ExplanationOfBenefit extends DomainResource { @Description(shortDefinition="Additional item codes", formalDefinition="The fee for an addittional service or product or charge." ) protected Coding service; + /** + * For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program. + */ + @Child(name = "programCode", type = {Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Program specific reason for item inclusion", formalDefinition="For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program." ) + protected List programCode; + /** * The number of repetitions of a service or product. */ - @Child(name = "quantity", type = {SimpleQuantity.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "quantity", type = {SimpleQuantity.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) protected SimpleQuantity quantity; /** * The fee for an addittional service or product or charge. */ - @Child(name = "unitPrice", type = {Money.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "unitPrice", type = {Money.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="The fee for an addittional service or product or charge." ) protected Money unitPrice; /** * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. */ - @Child(name = "factor", type = {DecimalType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "factor", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) protected DecimalType factor; /** * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. */ - @Child(name = "points", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "points", type = {DecimalType.class}, order=8, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) protected DecimalType points; /** * The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. */ - @Child(name = "net", type = {Money.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "net", type = {Money.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Net additional item cost", formalDefinition="The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) protected Money net; /** * List of Unique Device Identifiers associated with this line item. */ - @Child(name = "udi", type = {Coding.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Child(name = "udi", type = {Device.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) - protected Coding udi; + protected List udi; + /** + * The actual objects that are the target of the reference (List of Unique Device Identifiers associated with this line item.) + */ + protected List udiTarget; + /** * The adjudications results. */ - @Child(name = "adjudication", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "adjudication", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="SubDetail adjudication", formalDefinition="The adjudications results." ) protected List adjudication; - private static final long serialVersionUID = 465609870L; + private static final long serialVersionUID = -1690477905L; /** * Constructor @@ -3320,6 +4152,46 @@ public class ExplanationOfBenefit extends DomainResource { return this; } + /** + * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) + */ + public List getProgramCode() { + if (this.programCode == null) + this.programCode = new ArrayList(); + return this.programCode; + } + + public boolean hasProgramCode() { + if (this.programCode == null) + return false; + for (Coding item : this.programCode) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) + */ + // syntactic sugar + public Coding addProgramCode() { //3 + Coding t = new Coding(); + if (this.programCode == null) + this.programCode = new ArrayList(); + this.programCode.add(t); + return t; + } + + // syntactic sugar + public SubDetailComponent addProgramCode(Coding t) { //3 + if (t == null) + return this; + if (this.programCode == null) + this.programCode = new ArrayList(); + this.programCode.add(t); + return this; + } + /** * @return {@link #quantity} (The number of repetitions of a service or product.) */ @@ -3529,27 +4401,64 @@ public class ExplanationOfBenefit extends DomainResource { /** * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) */ - public Coding getUdi() { + public List getUdi() { if (this.udi == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailComponent.udi"); - else if (Configuration.doAutoCreate()) - this.udi = new Coding(); // cc + this.udi = new ArrayList(); return this.udi; } public boolean hasUdi() { - return this.udi != null && !this.udi.isEmpty(); + if (this.udi == null) + return false; + for (Reference item : this.udi) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #udi} (List of Unique Device Identifiers associated with this line item.) + * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) */ - public SubDetailComponent setUdi(Coding value) { - this.udi = value; + // syntactic sugar + public Reference addUdi() { //3 + Reference t = new Reference(); + if (this.udi == null) + this.udi = new ArrayList(); + this.udi.add(t); + return t; + } + + // syntactic sugar + public SubDetailComponent addUdi(Reference t) { //3 + if (t == null) + return this; + if (this.udi == null) + this.udi = new ArrayList(); + this.udi.add(t); return this; } + /** + * @return {@link #udi} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) + */ + public List getUdiTarget() { + if (this.udiTarget == null) + this.udiTarget = new ArrayList(); + return this.udiTarget; + } + + // syntactic sugar + /** + * @return {@link #udi} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) + */ + public Device addUdiTarget() { + Device r = new Device(); + if (this.udiTarget == null) + this.udiTarget = new ArrayList(); + this.udiTarget.add(r); + return r; + } + /** * @return {@link #adjudication} (The adjudications results.) */ @@ -3595,12 +4504,13 @@ public class ExplanationOfBenefit extends DomainResource { childrenList.add(new Property("sequence", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("service", "Coding", "The fee for an addittional service or product or charge.", 0, java.lang.Integer.MAX_VALUE, service)); + childrenList.add(new Property("programCode", "Coding", "For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.", 0, java.lang.Integer.MAX_VALUE, programCode)); childrenList.add(new Property("quantity", "SimpleQuantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); childrenList.add(new Property("unitPrice", "Money", "The fee for an addittional service or product or charge.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); childrenList.add(new Property("net", "Money", "The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); - childrenList.add(new Property("udi", "Coding", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); + childrenList.add(new Property("udi", "Reference(Device)", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); childrenList.add(new Property("adjudication", "", "The adjudications results.", 0, java.lang.Integer.MAX_VALUE, adjudication)); } @@ -3612,6 +4522,8 @@ public class ExplanationOfBenefit extends DomainResource { this.type = castToCoding(value); // Coding else if (name.equals("service")) this.service = castToCoding(value); // Coding + else if (name.equals("programCode")) + this.getProgramCode().add(castToCoding(value)); else if (name.equals("quantity")) this.quantity = castToSimpleQuantity(value); // SimpleQuantity else if (name.equals("unitPrice")) @@ -3623,7 +4535,7 @@ public class ExplanationOfBenefit extends DomainResource { else if (name.equals("net")) this.net = castToMoney(value); // Money else if (name.equals("udi")) - this.udi = castToCoding(value); // Coding + this.getUdi().add(castToReference(value)); else if (name.equals("adjudication")) this.getAdjudication().add((SubDetailAdjudicationComponent) value); else @@ -3643,6 +4555,9 @@ public class ExplanationOfBenefit extends DomainResource { this.service = new Coding(); return this.service; } + else if (name.equals("programCode")) { + return addProgramCode(); + } else if (name.equals("quantity")) { this.quantity = new SimpleQuantity(); return this.quantity; @@ -3662,8 +4577,7 @@ public class ExplanationOfBenefit extends DomainResource { return this.net; } else if (name.equals("udi")) { - this.udi = new Coding(); - return this.udi; + return addUdi(); } else if (name.equals("adjudication")) { return addAdjudication(); @@ -3678,12 +4592,21 @@ public class ExplanationOfBenefit extends DomainResource { dst.sequence = sequence == null ? null : sequence.copy(); dst.type = type == null ? null : type.copy(); dst.service = service == null ? null : service.copy(); + if (programCode != null) { + dst.programCode = new ArrayList(); + for (Coding i : programCode) + dst.programCode.add(i.copy()); + }; dst.quantity = quantity == null ? null : quantity.copy(); dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); dst.factor = factor == null ? null : factor.copy(); dst.points = points == null ? null : points.copy(); dst.net = net == null ? null : net.copy(); - dst.udi = udi == null ? null : udi.copy(); + if (udi != null) { + dst.udi = new ArrayList(); + for (Reference i : udi) + dst.udi.add(i.copy()); + }; if (adjudication != null) { dst.adjudication = new ArrayList(); for (SubDetailAdjudicationComponent i : adjudication) @@ -3700,9 +4623,9 @@ public class ExplanationOfBenefit extends DomainResource { return false; SubDetailComponent o = (SubDetailComponent) other; return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(service, o.service, true) - && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) - && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) - && compareDeep(adjudication, o.adjudication, true); + && compareDeep(programCode, o.programCode, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) + && compareDeep(factor, o.factor, true) && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) + && compareDeep(udi, o.udi, true) && compareDeep(adjudication, o.adjudication, true); } @Override @@ -3717,10 +4640,8 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) - && (service == null || service.isEmpty()) && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) - && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) - && (udi == null || udi.isEmpty()) && (adjudication == null || adjudication.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequence, type, service, programCode + , quantity, unitPrice, factor, points, net, udi, adjudication); } public String fhirType() { @@ -3735,9 +4656,9 @@ public class ExplanationOfBenefit extends DomainResource { /** * Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc. */ - @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Child(name = "category", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Adjudication category such as co-pay, eligible, benefit, etc.", formalDefinition="Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc." ) - protected Coding code; + protected Coding category; /** * Adjudication reason such as limit reached. @@ -3760,7 +4681,7 @@ public class ExplanationOfBenefit extends DomainResource { @Description(shortDefinition="Non-monitory value", formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above." ) protected DecimalType value; - private static final long serialVersionUID = 746807621L; + private static final long serialVersionUID = -1926987562L; /** * Constructor @@ -3772,32 +4693,32 @@ public class ExplanationOfBenefit extends DomainResource { /** * Constructor */ - public SubDetailAdjudicationComponent(Coding code) { + public SubDetailAdjudicationComponent(Coding category) { super(); - this.code = code; + this.category = category; } /** - * @return {@link #code} (Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.) + * @return {@link #category} (Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.) */ - public Coding getCode() { - if (this.code == null) + public Coding getCategory() { + if (this.category == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SubDetailAdjudicationComponent.code"); + throw new Error("Attempt to auto-create SubDetailAdjudicationComponent.category"); else if (Configuration.doAutoCreate()) - this.code = new Coding(); // cc - return this.code; + this.category = new Coding(); // cc + return this.category; } - public boolean hasCode() { - return this.code != null && !this.code.isEmpty(); + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); } /** - * @param value {@link #code} (Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.) + * @param value {@link #category} (Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.) */ - public SubDetailAdjudicationComponent setCode(Coding value) { - this.code = value; + public SubDetailAdjudicationComponent setCategory(Coding value) { + this.category = value; return this; } @@ -3918,7 +4839,7 @@ public class ExplanationOfBenefit extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("code", "Coding", "Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("category", "Coding", "Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, category)); childrenList.add(new Property("reason", "Coding", "Adjudication reason such as limit reached.", 0, java.lang.Integer.MAX_VALUE, reason)); childrenList.add(new Property("amount", "Money", "Monitory amount associated with the code.", 0, java.lang.Integer.MAX_VALUE, amount)); childrenList.add(new Property("value", "decimal", "A non-monetary value for example a percentage. Mutually exclusive to the amount element above.", 0, java.lang.Integer.MAX_VALUE, value)); @@ -3926,8 +4847,8 @@ public class ExplanationOfBenefit extends DomainResource { @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("code")) - this.code = castToCoding(value); // Coding + if (name.equals("category")) + this.category = castToCoding(value); // Coding else if (name.equals("reason")) this.reason = castToCoding(value); // Coding else if (name.equals("amount")) @@ -3940,9 +4861,9 @@ public class ExplanationOfBenefit extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("code")) { - this.code = new Coding(); - return this.code; + if (name.equals("category")) { + this.category = new Coding(); + return this.category; } else if (name.equals("reason")) { this.reason = new Coding(); @@ -3962,7 +4883,7 @@ public class ExplanationOfBenefit extends DomainResource { public SubDetailAdjudicationComponent copy() { SubDetailAdjudicationComponent dst = new SubDetailAdjudicationComponent(); copyValues(dst); - dst.code = code == null ? null : code.copy(); + dst.category = category == null ? null : category.copy(); dst.reason = reason == null ? null : reason.copy(); dst.amount = amount == null ? null : amount.copy(); dst.value = value == null ? null : value.copy(); @@ -3976,7 +4897,7 @@ public class ExplanationOfBenefit extends DomainResource { if (!(other instanceof SubDetailAdjudicationComponent)) return false; SubDetailAdjudicationComponent o = (SubDetailAdjudicationComponent) other; - return compareDeep(code, o.code, true) && compareDeep(reason, o.reason, true) && compareDeep(amount, o.amount, true) + return compareDeep(category, o.category, true) && compareDeep(reason, o.reason, true) && compareDeep(amount, o.amount, true) && compareDeep(value, o.value, true); } @@ -3991,8 +4912,8 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (reason == null || reason.isEmpty()) - && (amount == null || amount.isEmpty()) && (value == null || value.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( category, reason, amount, value + ); } public String fhirType() { @@ -4218,8 +5139,8 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (initial == null || initial.isEmpty()) && (priorDate == null || priorDate.isEmpty()) - && (priorMaterial == null || priorMaterial.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( initial, priorDate, priorMaterial + ); } public String fhirType() { @@ -4632,10 +5553,8 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()) && (service == null || service.isEmpty()) - && (fee == null || fee.isEmpty()) && (noteNumberLinkId == null || noteNumberLinkId.isEmpty()) - && (adjudication == null || adjudication.isEmpty()) && (detail == null || detail.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequenceLinkId, service, fee + , noteNumberLinkId, adjudication, detail); } public String fhirType() { @@ -4650,25 +5569,32 @@ public class ExplanationOfBenefit extends DomainResource { /** * Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc. */ - @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Child(name = "category", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Adjudication category such as co-pay, eligible, benefit, etc.", formalDefinition="Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc." ) - protected Coding code; + protected Coding category; + + /** + * Adjudication reason such as limit reached. + */ + @Child(name = "reason", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Adjudication reason", formalDefinition="Adjudication reason such as limit reached." ) + protected Coding reason; /** * Monitory amount associated with the code. */ - @Child(name = "amount", type = {Money.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Child(name = "amount", type = {Money.class}, order=3, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Monetary amount", formalDefinition="Monitory amount associated with the code." ) protected Money amount; /** * A non-monetary value for example a percentage. Mutually exclusive to the amount element above. */ - @Child(name = "value", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "value", type = {DecimalType.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Non-monitory value", formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above." ) protected DecimalType value; - private static final long serialVersionUID = -949880587L; + private static final long serialVersionUID = -1926987562L; /** * Constructor @@ -4680,32 +5606,56 @@ public class ExplanationOfBenefit extends DomainResource { /** * Constructor */ - public AddedItemAdjudicationComponent(Coding code) { + public AddedItemAdjudicationComponent(Coding category) { super(); - this.code = code; + this.category = category; } /** - * @return {@link #code} (Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.) + * @return {@link #category} (Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.) */ - public Coding getCode() { - if (this.code == null) + public Coding getCategory() { + if (this.category == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AddedItemAdjudicationComponent.code"); + throw new Error("Attempt to auto-create AddedItemAdjudicationComponent.category"); else if (Configuration.doAutoCreate()) - this.code = new Coding(); // cc - return this.code; + this.category = new Coding(); // cc + return this.category; } - public boolean hasCode() { - return this.code != null && !this.code.isEmpty(); + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); } /** - * @param value {@link #code} (Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.) + * @param value {@link #category} (Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.) */ - public AddedItemAdjudicationComponent setCode(Coding value) { - this.code = value; + public AddedItemAdjudicationComponent setCategory(Coding value) { + this.category = value; + return this; + } + + /** + * @return {@link #reason} (Adjudication reason such as limit reached.) + */ + public Coding getReason() { + if (this.reason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AddedItemAdjudicationComponent.reason"); + else if (Configuration.doAutoCreate()) + this.reason = new Coding(); // cc + return this.reason; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (Adjudication reason such as limit reached.) + */ + public AddedItemAdjudicationComponent setReason(Coding value) { + this.reason = value; return this; } @@ -4802,15 +5752,18 @@ public class ExplanationOfBenefit extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("code", "Coding", "Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("category", "Coding", "Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("reason", "Coding", "Adjudication reason such as limit reached.", 0, java.lang.Integer.MAX_VALUE, reason)); childrenList.add(new Property("amount", "Money", "Monitory amount associated with the code.", 0, java.lang.Integer.MAX_VALUE, amount)); childrenList.add(new Property("value", "decimal", "A non-monetary value for example a percentage. Mutually exclusive to the amount element above.", 0, java.lang.Integer.MAX_VALUE, value)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("code")) - this.code = castToCoding(value); // Coding + if (name.equals("category")) + this.category = castToCoding(value); // Coding + else if (name.equals("reason")) + this.reason = castToCoding(value); // Coding else if (name.equals("amount")) this.amount = castToMoney(value); // Money else if (name.equals("value")) @@ -4821,9 +5774,13 @@ public class ExplanationOfBenefit extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("code")) { - this.code = new Coding(); - return this.code; + if (name.equals("category")) { + this.category = new Coding(); + return this.category; + } + else if (name.equals("reason")) { + this.reason = new Coding(); + return this.reason; } else if (name.equals("amount")) { this.amount = new Money(); @@ -4839,7 +5796,8 @@ public class ExplanationOfBenefit extends DomainResource { public AddedItemAdjudicationComponent copy() { AddedItemAdjudicationComponent dst = new AddedItemAdjudicationComponent(); copyValues(dst); - dst.code = code == null ? null : code.copy(); + dst.category = category == null ? null : category.copy(); + dst.reason = reason == null ? null : reason.copy(); dst.amount = amount == null ? null : amount.copy(); dst.value = value == null ? null : value.copy(); return dst; @@ -4852,8 +5810,8 @@ public class ExplanationOfBenefit extends DomainResource { if (!(other instanceof AddedItemAdjudicationComponent)) return false; AddedItemAdjudicationComponent o = (AddedItemAdjudicationComponent) other; - return compareDeep(code, o.code, true) && compareDeep(amount, o.amount, true) && compareDeep(value, o.value, true) - ; + return compareDeep(category, o.category, true) && compareDeep(reason, o.reason, true) && compareDeep(amount, o.amount, true) + && compareDeep(value, o.value, true); } @Override @@ -4867,8 +5825,8 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (amount == null || amount.isEmpty()) - && (value == null || value.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( category, reason, amount, value + ); } public String fhirType() { @@ -5077,8 +6035,7 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (service == null || service.isEmpty()) && (fee == null || fee.isEmpty()) - && (adjudication == null || adjudication.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( service, fee, adjudication); } public String fhirType() { @@ -5093,25 +6050,32 @@ public class ExplanationOfBenefit extends DomainResource { /** * Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc. */ - @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Child(name = "category", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Adjudication category such as co-pay, eligible, benefit, etc.", formalDefinition="Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc." ) - protected Coding code; + protected Coding category; + + /** + * Adjudication reason such as limit reached. + */ + @Child(name = "reason", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Adjudication reason", formalDefinition="Adjudication reason such as limit reached." ) + protected Coding reason; /** * Monitory amount associated with the code. */ - @Child(name = "amount", type = {Money.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Child(name = "amount", type = {Money.class}, order=3, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Monetary amount", formalDefinition="Monitory amount associated with the code." ) protected Money amount; /** * A non-monetary value for example a percentage. Mutually exclusive to the amount element above. */ - @Child(name = "value", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "value", type = {DecimalType.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Non-monitory value", formalDefinition="A non-monetary value for example a percentage. Mutually exclusive to the amount element above." ) protected DecimalType value; - private static final long serialVersionUID = -949880587L; + private static final long serialVersionUID = -1926987562L; /** * Constructor @@ -5123,32 +6087,56 @@ public class ExplanationOfBenefit extends DomainResource { /** * Constructor */ - public AddedItemDetailAdjudicationComponent(Coding code) { + public AddedItemDetailAdjudicationComponent(Coding category) { super(); - this.code = code; + this.category = category; } /** - * @return {@link #code} (Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.) + * @return {@link #category} (Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.) */ - public Coding getCode() { - if (this.code == null) + public Coding getCategory() { + if (this.category == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create AddedItemDetailAdjudicationComponent.code"); + throw new Error("Attempt to auto-create AddedItemDetailAdjudicationComponent.category"); else if (Configuration.doAutoCreate()) - this.code = new Coding(); // cc - return this.code; + this.category = new Coding(); // cc + return this.category; } - public boolean hasCode() { - return this.code != null && !this.code.isEmpty(); + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); } /** - * @param value {@link #code} (Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.) + * @param value {@link #category} (Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.) */ - public AddedItemDetailAdjudicationComponent setCode(Coding value) { - this.code = value; + public AddedItemDetailAdjudicationComponent setCategory(Coding value) { + this.category = value; + return this; + } + + /** + * @return {@link #reason} (Adjudication reason such as limit reached.) + */ + public Coding getReason() { + if (this.reason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create AddedItemDetailAdjudicationComponent.reason"); + else if (Configuration.doAutoCreate()) + this.reason = new Coding(); // cc + return this.reason; + } + + public boolean hasReason() { + return this.reason != null && !this.reason.isEmpty(); + } + + /** + * @param value {@link #reason} (Adjudication reason such as limit reached.) + */ + public AddedItemDetailAdjudicationComponent setReason(Coding value) { + this.reason = value; return this; } @@ -5245,15 +6233,18 @@ public class ExplanationOfBenefit extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("code", "Coding", "Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("category", "Coding", "Code indicating: Co-Pay, deductable, elegible, benefit, tax, etc.", 0, java.lang.Integer.MAX_VALUE, category)); + childrenList.add(new Property("reason", "Coding", "Adjudication reason such as limit reached.", 0, java.lang.Integer.MAX_VALUE, reason)); childrenList.add(new Property("amount", "Money", "Monitory amount associated with the code.", 0, java.lang.Integer.MAX_VALUE, amount)); childrenList.add(new Property("value", "decimal", "A non-monetary value for example a percentage. Mutually exclusive to the amount element above.", 0, java.lang.Integer.MAX_VALUE, value)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("code")) - this.code = castToCoding(value); // Coding + if (name.equals("category")) + this.category = castToCoding(value); // Coding + else if (name.equals("reason")) + this.reason = castToCoding(value); // Coding else if (name.equals("amount")) this.amount = castToMoney(value); // Money else if (name.equals("value")) @@ -5264,9 +6255,13 @@ public class ExplanationOfBenefit extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("code")) { - this.code = new Coding(); - return this.code; + if (name.equals("category")) { + this.category = new Coding(); + return this.category; + } + else if (name.equals("reason")) { + this.reason = new Coding(); + return this.reason; } else if (name.equals("amount")) { this.amount = new Money(); @@ -5282,7 +6277,8 @@ public class ExplanationOfBenefit extends DomainResource { public AddedItemDetailAdjudicationComponent copy() { AddedItemDetailAdjudicationComponent dst = new AddedItemDetailAdjudicationComponent(); copyValues(dst); - dst.code = code == null ? null : code.copy(); + dst.category = category == null ? null : category.copy(); + dst.reason = reason == null ? null : reason.copy(); dst.amount = amount == null ? null : amount.copy(); dst.value = value == null ? null : value.copy(); return dst; @@ -5295,8 +6291,8 @@ public class ExplanationOfBenefit extends DomainResource { if (!(other instanceof AddedItemDetailAdjudicationComponent)) return false; AddedItemDetailAdjudicationComponent o = (AddedItemDetailAdjudicationComponent) other; - return compareDeep(code, o.code, true) && compareDeep(amount, o.amount, true) && compareDeep(value, o.value, true) - ; + return compareDeep(category, o.category, true) && compareDeep(reason, o.reason, true) && compareDeep(amount, o.amount, true) + && compareDeep(value, o.value, true); } @Override @@ -5310,8 +6306,8 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (amount == null || amount.isEmpty()) - && (value == null || value.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( category, reason, amount, value + ); } public String fhirType() { @@ -5525,8 +6521,8 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (tooth == null || tooth.isEmpty()) && (reason == null || reason.isEmpty()) - && (extractionDate == null || extractionDate.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( tooth, reason, extractionDate + ); } public String fhirType() { @@ -5752,8 +6748,7 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (number == null || number.isEmpty()) && (type == null || type.isEmpty()) - && (text == null || text.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( number, type, text); } public String fhirType() { @@ -6080,9 +7075,8 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (category == null || category.isEmpty()) && (subCategory == null || subCategory.isEmpty()) - && (network == null || network.isEmpty()) && (unit == null || unit.isEmpty()) && (term == null || term.isEmpty()) - && (financial == null || financial.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( category, subCategory, network + , unit, term, financial); } public String fhirType() { @@ -6322,8 +7316,7 @@ public class ExplanationOfBenefit extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (benefit == null || benefit.isEmpty()) - && (benefitUsed == null || benefitUsed.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, benefit, benefitUsed); } public String fhirType() { @@ -6343,362 +7336,333 @@ public class ExplanationOfBenefit extends DomainResource { /** * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. */ - @Child(name = "claim", type = {Claim.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Child(name = "claim", type = {Identifier.class, Claim.class}, order=1, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Claim reference", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) - protected Reference claim; - - /** - * The actual object that is the target of the reference (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) - */ - protected Claim claimTarget; + protected Type claim; /** * The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number. */ - @Child(name = "claimResponse", type = {ClaimResponse.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Child(name = "claimResponse", type = {Identifier.class, ClaimResponse.class}, order=2, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Claim response reference", formalDefinition="The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number." ) - protected Reference claimResponse; + protected Type claimResponse; /** - * The actual object that is the target of the reference (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) + * A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType. */ - protected ClaimResponse claimResponseTarget; + @Child(name = "subType", type = {Coding.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Finer grained claim type information", formalDefinition="A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType." ) + protected List subType; /** * The version of the specification on which this instance relies. */ - @Child(name = "ruleset", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "ruleset", type = {Coding.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) protected Coding ruleset; /** * The version of the specification from which the original instance was created. */ - @Child(name = "originalRuleset", type = {Coding.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "originalRuleset", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) protected Coding originalRuleset; /** * The date when the EOB was created. */ - @Child(name = "created", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "created", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Creation date", formalDefinition="The date when the EOB was created." ) protected DateTimeType created; /** * The billable period for which charges are being submitted. */ - @Child(name = "billablePeriod", type = {Period.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "billablePeriod", type = {Period.class}, order=7, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Period for charge submission", formalDefinition="The billable period for which charges are being submitted." ) protected Period billablePeriod; /** * A description of the status of the adjudication. */ - @Child(name = "disposition", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "disposition", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." ) protected StringType disposition; /** * The provider which is responsible for the claim. */ - @Child(name = "provider", type = {Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "provider", type = {Identifier.class, Practitioner.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible provider for the claim", formalDefinition="The provider which is responsible for the claim." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The provider which is responsible for the claim.) - */ - protected Practitioner providerTarget; + protected Type provider; /** * The provider which is responsible for the claim. */ - @Child(name = "organization", type = {Organization.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Child(name = "organization", type = {Identifier.class, Organization.class}, order=10, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible organization for the claim", formalDefinition="The provider which is responsible for the claim." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The provider which is responsible for the claim.) - */ - protected Organization organizationTarget; + protected Type organization; /** * Facility where the services were provided. */ - @Child(name = "facility", type = {Location.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Child(name = "facility", type = {Identifier.class, Location.class}, order=11, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) - protected Reference facility; - - /** - * The actual object that is the target of the reference (Facility where the services were provided.) - */ - protected Location facilityTarget; + protected Type facility; /** * Other claims which are related to this claim such as prior claim versions or for related services. */ - @Child(name = "relatedClaim", type = {Claim.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Related Claims", formalDefinition="Other claims which are related to this claim such as prior claim versions or for related services." ) - protected List relatedClaim; - /** - * The actual objects that are the target of the reference (Other claims which are related to this claim such as prior claim versions or for related services.) - */ - protected List relatedClaimTarget; - + @Child(name = "related", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Related Claims which may be revelant to processing this claimn", formalDefinition="Other claims which are related to this claim such as prior claim versions or for related services." ) + protected List related; /** * Prescription to support the dispensing of Pharmacy or Vision products. */ - @Child(name = "prescription", type = {MedicationOrder.class, VisionPrescription.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Child(name = "prescription", type = {Identifier.class, MedicationOrder.class, VisionPrescription.class}, order=13, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Prescription", formalDefinition="Prescription to support the dispensing of Pharmacy or Vision products." ) - protected Reference prescription; - - /** - * The actual object that is the target of the reference (Prescription to support the dispensing of Pharmacy or Vision products.) - */ - protected Resource prescriptionTarget; + protected Type prescription; /** * Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products. */ - @Child(name = "originalPrescription", type = {MedicationOrder.class}, order=13, min=0, max=1, modifier=false, summary=true) + @Child(name = "originalPrescription", type = {Identifier.class, MedicationOrder.class}, order=14, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Original Prescription", formalDefinition="Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products." ) - protected Reference originalPrescription; - - /** - * The actual object that is the target of the reference (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) - */ - protected MedicationOrder originalPrescriptionTarget; + protected Type originalPrescription; /** * The party to be reimbursed for the services. */ - @Child(name = "payee", type = {}, order=14, min=0, max=1, modifier=false, summary=true) + @Child(name = "payee", type = {}, order=15, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Payee", formalDefinition="The party to be reimbursed for the services." ) protected PayeeComponent payee; /** * The referral resource which lists the date, practitioner, reason and other supporting information. */ - @Child(name = "referral", type = {ReferralRequest.class}, order=15, min=0, max=1, modifier=false, summary=true) + @Child(name = "referral", type = {Identifier.class, ReferralRequest.class}, order=16, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) - protected Reference referral; + protected Type referral; /** - * The actual object that is the target of the reference (The referral resource which lists the date, practitioner, reason and other supporting information.) + * **Insert definition of Occurrence codes. */ - protected ReferralRequest referralTarget; + @Child(name = "occurrenceCode", type = {Coding.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Occurrence Codes", formalDefinition="**Insert definition of Occurrence codes." ) + protected List occurrenceCode; + + /** + * **Insert definition of Occurrence Span codes. + */ + @Child(name = "occurenceSpanCode", type = {Coding.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Occurrence Span Codes", formalDefinition="**Insert definition of Occurrence Span codes." ) + protected List occurenceSpanCode; + + /** + * **Insert definition of Value codes. + */ + @Child(name = "valueCode", type = {Coding.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Value Codes", formalDefinition="**Insert definition of Value codes." ) + protected List valueCode; /** * Ordered list of patient diagnosis for which care is sought. */ - @Child(name = "diagnosis", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "diagnosis", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) protected List diagnosis; + /** + * Ordered list of patient procedures performed to support the adjudication. + */ + @Child(name = "procedure", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Procedures performed", formalDefinition="Ordered list of patient procedures performed to support the adjudication." ) + protected List procedure; + /** * List of special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication. */ - @Child(name = "specialCondition", type = {Coding.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "specialCondition", type = {Coding.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="List of special Conditions", formalDefinition="List of special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication." ) protected List specialCondition; /** * Patient Resource. */ - @Child(name = "patient", type = {Patient.class}, order=18, min=1, max=1, modifier=false, summary=true) + @Child(name = "patient", type = {Identifier.class, Patient.class}, order=23, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) - protected Reference patient; - - /** - * The actual object that is the target of the reference (Patient Resource.) - */ - protected Patient patientTarget; + protected Type patient; /** * Precedence (primary, secondary, etc.). */ - @Child(name = "precedence", type = {PositiveIntType.class}, order=19, min=0, max=1, modifier=false, summary=true) + @Child(name = "precedence", type = {PositiveIntType.class}, order=24, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Precedence (primary, secondary, etc.)", formalDefinition="Precedence (primary, secondary, etc.)." ) protected PositiveIntType precedence; /** * Financial instrument by which payment information for health care. */ - @Child(name = "coverage", type = {}, order=20, min=1, max=1, modifier=false, summary=true) + @Child(name = "coverage", type = {}, order=25, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) protected CoverageComponent coverage; - /** - * Factors which may influence the applicability of coverage. - */ - @Child(name = "exception", type = {Coding.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Eligibility exceptions", formalDefinition="Factors which may influence the applicability of coverage." ) - protected List exception; - - /** - * Name of school for over-aged dependants. - */ - @Child(name = "school", type = {StringType.class}, order=22, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Name of School", formalDefinition="Name of school for over-aged dependants." ) - protected StringType school; - /** * Date of an accident which these services are addressing. */ - @Child(name = "accidentDate", type = {DateType.class}, order=23, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Accident Date", formalDefinition="Date of an accident which these services are addressing." ) + @Child(name = "accidentDate", type = {DateType.class}, order=26, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the accident occurred", formalDefinition="Date of an accident which these services are addressing." ) protected DateType accidentDate; /** * Type of accident: work, auto, etc. */ - @Child(name = "accidentType", type = {Coding.class}, order=24, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Accident Type", formalDefinition="Type of accident: work, auto, etc." ) + @Child(name = "accidentType", type = {Coding.class}, order=27, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The nature of the accident", formalDefinition="Type of accident: work, auto, etc." ) protected Coding accidentType; /** * Accident Place. */ - @Child(name = "accidentLocation", type = {StringType.class, Address.class, Location.class}, order=25, min=0, max=1, modifier=false, summary=true) + @Child(name = "accidentLocation", type = {Address.class, Location.class}, order=28, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Accident Place", formalDefinition="Accident Place." ) protected Type accidentLocation; /** * A list of intervention and exception codes which may influence the adjudication of the claim. */ - @Child(name = "interventionException", type = {Coding.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "interventionException", type = {Coding.class}, order=29, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) protected List interventionException; /** - * The start or start and end dates for the treatable condition. + * Period, start and last dates of aspects of the Condition or related services. */ - @Child(name = "onset", type = {DateType.class, Period.class}, order=27, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Illness, injury or treatable condition date", formalDefinition="The start or start and end dates for the treatable condition." ) - protected Type onset; + @Child(name = "onset", type = {}, order=30, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Condition related Onset related dates and codes", formalDefinition="Period, start and last dates of aspects of the Condition or related services." ) + protected List onset; /** * The start and optional end dates of when the patient was precluded from working due to the treatable condition(s). */ - @Child(name = "employmentImpacted", type = {Period.class}, order=28, min=0, max=1, modifier=false, summary=true) + @Child(name = "employmentImpacted", type = {Period.class}, order=31, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Period unable to work", formalDefinition="The start and optional end dates of when the patient was precluded from working due to the treatable condition(s)." ) protected Period employmentImpacted; /** * The start and optional end dates of when the patient was confined to a treatment center. */ - @Child(name = "hospitalization", type = {Period.class}, order=29, min=0, max=1, modifier=false, summary=true) + @Child(name = "hospitalization", type = {Period.class}, order=32, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Period in hospital", formalDefinition="The start and optional end dates of when the patient was confined to a treatment center." ) protected Period hospitalization; /** * First tier of goods and services. */ - @Child(name = "item", type = {}, order=30, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "item", type = {}, order=33, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) protected List item; /** * The first tier service adjudications for payor added services. */ - @Child(name = "addItem", type = {}, order=31, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "addItem", type = {}, order=34, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Insurer added line items", formalDefinition="The first tier service adjudications for payor added services." ) protected List addItem; - /** - * The total value of the claim. - */ - @Child(name = "claimTotal", type = {Money.class}, order=32, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Total claim cost", formalDefinition="The total value of the claim." ) - protected Money claimTotal; - /** * A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons. */ - @Child(name = "missingTeeth", type = {}, order=33, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "missingTeeth", type = {}, order=35, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Only if type = oral", formalDefinition="A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons." ) protected List missingTeeth; + /** + * The total cost of the services reported. + */ + @Child(name = "totalCost", type = {Money.class}, order=36, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Total Cost of service from the Claim", formalDefinition="The total cost of the services reported." ) + protected Money totalCost; + /** * The amount of deductable applied which was not allocated to any particular service line. */ - @Child(name = "unallocDeductable", type = {Money.class}, order=34, min=0, max=1, modifier=false, summary=true) + @Child(name = "unallocDeductable", type = {Money.class}, order=37, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Unallocated deductable", formalDefinition="The amount of deductable applied which was not allocated to any particular service line." ) protected Money unallocDeductable; /** * Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductable). */ - @Child(name = "totalBenefit", type = {Money.class}, order=35, min=0, max=1, modifier=false, summary=true) + @Child(name = "totalBenefit", type = {Money.class}, order=38, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Total benefit payable for the Claim", formalDefinition="Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductable)." ) protected Money totalBenefit; /** * Adjustment to the payment of this transaction which is not related to adjudication of this transaction. */ - @Child(name = "paymentAdjustment", type = {Money.class}, order=36, min=0, max=1, modifier=false, summary=true) + @Child(name = "paymentAdjustment", type = {Money.class}, order=39, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Payment adjustment for non-Claim issues", formalDefinition="Adjustment to the payment of this transaction which is not related to adjudication of this transaction." ) protected Money paymentAdjustment; /** * Reason for the payment adjustment. */ - @Child(name = "paymentAdjustmentReason", type = {Coding.class}, order=37, min=0, max=1, modifier=false, summary=true) + @Child(name = "paymentAdjustmentReason", type = {Coding.class}, order=40, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Reason for Payment adjustment", formalDefinition="Reason for the payment adjustment." ) protected Coding paymentAdjustmentReason; /** * Estimated payment data. */ - @Child(name = "paymentDate", type = {DateType.class}, order=38, min=0, max=1, modifier=false, summary=true) + @Child(name = "paymentDate", type = {DateType.class}, order=41, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Expected data of Payment", formalDefinition="Estimated payment data." ) protected DateType paymentDate; /** * Payable less any payment adjustment. */ - @Child(name = "paymentAmount", type = {Money.class}, order=39, min=0, max=1, modifier=false, summary=true) + @Child(name = "paymentAmount", type = {Money.class}, order=42, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Payment amount", formalDefinition="Payable less any payment adjustment." ) protected Money paymentAmount; /** * Payment identifer. */ - @Child(name = "paymentRef", type = {Identifier.class}, order=40, min=0, max=1, modifier=false, summary=true) + @Child(name = "paymentRef", type = {Identifier.class}, order=43, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Payment identifier", formalDefinition="Payment identifer." ) protected Identifier paymentRef; /** * Status of funds reservation (For provider, for Patient, None). */ - @Child(name = "reserved", type = {Coding.class}, order=41, min=0, max=1, modifier=false, summary=true) + @Child(name = "reserved", type = {Coding.class}, order=44, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Funds reserved status", formalDefinition="Status of funds reservation (For provider, for Patient, None)." ) protected Coding reserved; /** * The form to be used for printing the content. */ - @Child(name = "form", type = {Coding.class}, order=42, min=0, max=1, modifier=false, summary=true) + @Child(name = "form", type = {Coding.class}, order=45, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." ) protected Coding form; /** * Note text. */ - @Child(name = "note", type = {}, order=43, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "note", type = {}, order=46, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Processing notes", formalDefinition="Note text." ) protected List note; /** * Balance by Benefit Category. */ - @Child(name = "benefitBalance", type = {}, order=44, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "benefitBalance", type = {}, order=47, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Balance by Benefit Category", formalDefinition="Balance by Benefit Category." ) protected List benefitBalance; - private static final long serialVersionUID = -1647900445L; + private static final long serialVersionUID = 1781852561L; /** * Constructor @@ -6710,7 +7674,7 @@ public class ExplanationOfBenefit extends DomainResource { /** * Constructor */ - public ExplanationOfBenefit(Reference patient, CoverageComponent coverage) { + public ExplanationOfBenefit(Type patient, CoverageComponent coverage) { super(); this.patient = patient; this.coverage = coverage; @@ -6759,15 +7723,36 @@ public class ExplanationOfBenefit extends DomainResource { /** * @return {@link #claim} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) */ - public Reference getClaim() { - if (this.claim == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.claim"); - else if (Configuration.doAutoCreate()) - this.claim = new Reference(); // cc + public Type getClaim() { return this.claim; } + /** + * @return {@link #claim} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) + */ + public Identifier getClaimIdentifier() throws FHIRException { + if (!(this.claim instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.claim.getClass().getName()+" was encountered"); + return (Identifier) this.claim; + } + + public boolean hasClaimIdentifier() { + return this.claim instanceof Identifier; + } + + /** + * @return {@link #claim} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) + */ + public Reference getClaimReference() throws FHIRException { + if (!(this.claim instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.claim.getClass().getName()+" was encountered"); + return (Reference) this.claim; + } + + public boolean hasClaimReference() { + return this.claim instanceof Reference; + } + public boolean hasClaim() { return this.claim != null && !this.claim.isEmpty(); } @@ -6775,43 +7760,44 @@ public class ExplanationOfBenefit extends DomainResource { /** * @param value {@link #claim} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) */ - public ExplanationOfBenefit setClaim(Reference value) { + public ExplanationOfBenefit setClaim(Type value) { this.claim = value; return this; } - /** - * @return {@link #claim} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) - */ - public Claim getClaimTarget() { - if (this.claimTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.claim"); - else if (Configuration.doAutoCreate()) - this.claimTarget = new Claim(); // aa - return this.claimTarget; - } - - /** - * @param value {@link #claim} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) - */ - public ExplanationOfBenefit setClaimTarget(Claim value) { - this.claimTarget = value; - return this; - } - /** * @return {@link #claimResponse} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) */ - public Reference getClaimResponse() { - if (this.claimResponse == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.claimResponse"); - else if (Configuration.doAutoCreate()) - this.claimResponse = new Reference(); // cc + public Type getClaimResponse() { return this.claimResponse; } + /** + * @return {@link #claimResponse} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) + */ + public Identifier getClaimResponseIdentifier() throws FHIRException { + if (!(this.claimResponse instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.claimResponse.getClass().getName()+" was encountered"); + return (Identifier) this.claimResponse; + } + + public boolean hasClaimResponseIdentifier() { + return this.claimResponse instanceof Identifier; + } + + /** + * @return {@link #claimResponse} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) + */ + public Reference getClaimResponseReference() throws FHIRException { + if (!(this.claimResponse instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.claimResponse.getClass().getName()+" was encountered"); + return (Reference) this.claimResponse; + } + + public boolean hasClaimResponseReference() { + return this.claimResponse instanceof Reference; + } + public boolean hasClaimResponse() { return this.claimResponse != null && !this.claimResponse.isEmpty(); } @@ -6819,28 +7805,48 @@ public class ExplanationOfBenefit extends DomainResource { /** * @param value {@link #claimResponse} (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) */ - public ExplanationOfBenefit setClaimResponse(Reference value) { + public ExplanationOfBenefit setClaimResponse(Type value) { this.claimResponse = value; return this; } /** - * @return {@link #claimResponse} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) + * @return {@link #subType} (A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType.) */ - public ClaimResponse getClaimResponseTarget() { - if (this.claimResponseTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.claimResponse"); - else if (Configuration.doAutoCreate()) - this.claimResponseTarget = new ClaimResponse(); // aa - return this.claimResponseTarget; + public List getSubType() { + if (this.subType == null) + this.subType = new ArrayList(); + return this.subType; + } + + public boolean hasSubType() { + if (this.subType == null) + return false; + for (Coding item : this.subType) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #claimResponse} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.) + * @return {@link #subType} (A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType.) */ - public ExplanationOfBenefit setClaimResponseTarget(ClaimResponse value) { - this.claimResponseTarget = value; + // syntactic sugar + public Coding addSubType() { //3 + Coding t = new Coding(); + if (this.subType == null) + this.subType = new ArrayList(); + this.subType.add(t); + return t; + } + + // syntactic sugar + public ExplanationOfBenefit addSubType(Coding t) { //3 + if (t == null) + return this; + if (this.subType == null) + this.subType = new ArrayList(); + this.subType.add(t); return this; } @@ -7017,15 +8023,36 @@ public class ExplanationOfBenefit extends DomainResource { /** * @return {@link #provider} (The provider which is responsible for the claim.) */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc + public Type getProvider() { return this.provider; } + /** + * @return {@link #provider} (The provider which is responsible for the claim.) + */ + public Identifier getProviderIdentifier() throws FHIRException { + if (!(this.provider instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.provider.getClass().getName()+" was encountered"); + return (Identifier) this.provider; + } + + public boolean hasProviderIdentifier() { + return this.provider instanceof Identifier; + } + + /** + * @return {@link #provider} (The provider which is responsible for the claim.) + */ + public Reference getProviderReference() throws FHIRException { + if (!(this.provider instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.provider.getClass().getName()+" was encountered"); + return (Reference) this.provider; + } + + public boolean hasProviderReference() { + return this.provider instanceof Reference; + } + public boolean hasProvider() { return this.provider != null && !this.provider.isEmpty(); } @@ -7033,43 +8060,44 @@ public class ExplanationOfBenefit extends DomainResource { /** * @param value {@link #provider} (The provider which is responsible for the claim.) */ - public ExplanationOfBenefit setProvider(Reference value) { + public ExplanationOfBenefit setProvider(Type value) { this.provider = value; return this; } - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider which is responsible for the claim.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider which is responsible for the claim.) - */ - public ExplanationOfBenefit setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - /** * @return {@link #organization} (The provider which is responsible for the claim.) */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc + public Type getOrganization() { return this.organization; } + /** + * @return {@link #organization} (The provider which is responsible for the claim.) + */ + public Identifier getOrganizationIdentifier() throws FHIRException { + if (!(this.organization instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Identifier) this.organization; + } + + public boolean hasOrganizationIdentifier() { + return this.organization instanceof Identifier; + } + + /** + * @return {@link #organization} (The provider which is responsible for the claim.) + */ + public Reference getOrganizationReference() throws FHIRException { + if (!(this.organization instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Reference) this.organization; + } + + public boolean hasOrganizationReference() { + return this.organization instanceof Reference; + } + public boolean hasOrganization() { return this.organization != null && !this.organization.isEmpty(); } @@ -7077,43 +8105,44 @@ public class ExplanationOfBenefit extends DomainResource { /** * @param value {@link #organization} (The provider which is responsible for the claim.) */ - public ExplanationOfBenefit setOrganization(Reference value) { + public ExplanationOfBenefit setOrganization(Type value) { this.organization = value; return this; } - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The provider which is responsible for the claim.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The provider which is responsible for the claim.) - */ - public ExplanationOfBenefit setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - /** * @return {@link #facility} (Facility where the services were provided.) */ - public Reference getFacility() { - if (this.facility == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.facility"); - else if (Configuration.doAutoCreate()) - this.facility = new Reference(); // cc + public Type getFacility() { return this.facility; } + /** + * @return {@link #facility} (Facility where the services were provided.) + */ + public Identifier getFacilityIdentifier() throws FHIRException { + if (!(this.facility instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.facility.getClass().getName()+" was encountered"); + return (Identifier) this.facility; + } + + public boolean hasFacilityIdentifier() { + return this.facility instanceof Identifier; + } + + /** + * @return {@link #facility} (Facility where the services were provided.) + */ + public Reference getFacilityReference() throws FHIRException { + if (!(this.facility instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.facility.getClass().getName()+" was encountered"); + return (Reference) this.facility; + } + + public boolean hasFacilityReference() { + return this.facility instanceof Reference; + } + public boolean hasFacility() { return this.facility != null && !this.facility.isEmpty(); } @@ -7121,104 +8150,84 @@ public class ExplanationOfBenefit extends DomainResource { /** * @param value {@link #facility} (Facility where the services were provided.) */ - public ExplanationOfBenefit setFacility(Reference value) { + public ExplanationOfBenefit setFacility(Type value) { this.facility = value; return this; } /** - * @return {@link #facility} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Facility where the services were provided.) + * @return {@link #related} (Other claims which are related to this claim such as prior claim versions or for related services.) */ - public Location getFacilityTarget() { - if (this.facilityTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.facility"); - else if (Configuration.doAutoCreate()) - this.facilityTarget = new Location(); // aa - return this.facilityTarget; + public List getRelated() { + if (this.related == null) + this.related = new ArrayList(); + return this.related; } - /** - * @param value {@link #facility} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Facility where the services were provided.) - */ - public ExplanationOfBenefit setFacilityTarget(Location value) { - this.facilityTarget = value; - return this; - } - - /** - * @return {@link #relatedClaim} (Other claims which are related to this claim such as prior claim versions or for related services.) - */ - public List getRelatedClaim() { - if (this.relatedClaim == null) - this.relatedClaim = new ArrayList(); - return this.relatedClaim; - } - - public boolean hasRelatedClaim() { - if (this.relatedClaim == null) + public boolean hasRelated() { + if (this.related == null) return false; - for (Reference item : this.relatedClaim) + for (RelatedClaimsComponent item : this.related) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #relatedClaim} (Other claims which are related to this claim such as prior claim versions or for related services.) + * @return {@link #related} (Other claims which are related to this claim such as prior claim versions or for related services.) */ // syntactic sugar - public Reference addRelatedClaim() { //3 - Reference t = new Reference(); - if (this.relatedClaim == null) - this.relatedClaim = new ArrayList(); - this.relatedClaim.add(t); + public RelatedClaimsComponent addRelated() { //3 + RelatedClaimsComponent t = new RelatedClaimsComponent(); + if (this.related == null) + this.related = new ArrayList(); + this.related.add(t); return t; } // syntactic sugar - public ExplanationOfBenefit addRelatedClaim(Reference t) { //3 + public ExplanationOfBenefit addRelated(RelatedClaimsComponent t) { //3 if (t == null) return this; - if (this.relatedClaim == null) - this.relatedClaim = new ArrayList(); - this.relatedClaim.add(t); + if (this.related == null) + this.related = new ArrayList(); + this.related.add(t); return this; } - /** - * @return {@link #relatedClaim} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Other claims which are related to this claim such as prior claim versions or for related services.) - */ - public List getRelatedClaimTarget() { - if (this.relatedClaimTarget == null) - this.relatedClaimTarget = new ArrayList(); - return this.relatedClaimTarget; - } - - // syntactic sugar - /** - * @return {@link #relatedClaim} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Other claims which are related to this claim such as prior claim versions or for related services.) - */ - public Claim addRelatedClaimTarget() { - Claim r = new Claim(); - if (this.relatedClaimTarget == null) - this.relatedClaimTarget = new ArrayList(); - this.relatedClaimTarget.add(r); - return r; - } - /** * @return {@link #prescription} (Prescription to support the dispensing of Pharmacy or Vision products.) */ - public Reference getPrescription() { - if (this.prescription == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.prescription"); - else if (Configuration.doAutoCreate()) - this.prescription = new Reference(); // cc + public Type getPrescription() { return this.prescription; } + /** + * @return {@link #prescription} (Prescription to support the dispensing of Pharmacy or Vision products.) + */ + public Identifier getPrescriptionIdentifier() throws FHIRException { + if (!(this.prescription instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.prescription.getClass().getName()+" was encountered"); + return (Identifier) this.prescription; + } + + public boolean hasPrescriptionIdentifier() { + return this.prescription instanceof Identifier; + } + + /** + * @return {@link #prescription} (Prescription to support the dispensing of Pharmacy or Vision products.) + */ + public Reference getPrescriptionReference() throws FHIRException { + if (!(this.prescription instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.prescription.getClass().getName()+" was encountered"); + return (Reference) this.prescription; + } + + public boolean hasPrescriptionReference() { + return this.prescription instanceof Reference; + } + public boolean hasPrescription() { return this.prescription != null && !this.prescription.isEmpty(); } @@ -7226,38 +8235,44 @@ public class ExplanationOfBenefit extends DomainResource { /** * @param value {@link #prescription} (Prescription to support the dispensing of Pharmacy or Vision products.) */ - public ExplanationOfBenefit setPrescription(Reference value) { + public ExplanationOfBenefit setPrescription(Type value) { this.prescription = value; return this; } - /** - * @return {@link #prescription} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Prescription to support the dispensing of Pharmacy or Vision products.) - */ - public Resource getPrescriptionTarget() { - return this.prescriptionTarget; - } - - /** - * @param value {@link #prescription} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Prescription to support the dispensing of Pharmacy or Vision products.) - */ - public ExplanationOfBenefit setPrescriptionTarget(Resource value) { - this.prescriptionTarget = value; - return this; - } - /** * @return {@link #originalPrescription} (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) */ - public Reference getOriginalPrescription() { - if (this.originalPrescription == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.originalPrescription"); - else if (Configuration.doAutoCreate()) - this.originalPrescription = new Reference(); // cc + public Type getOriginalPrescription() { return this.originalPrescription; } + /** + * @return {@link #originalPrescription} (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) + */ + public Identifier getOriginalPrescriptionIdentifier() throws FHIRException { + if (!(this.originalPrescription instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.originalPrescription.getClass().getName()+" was encountered"); + return (Identifier) this.originalPrescription; + } + + public boolean hasOriginalPrescriptionIdentifier() { + return this.originalPrescription instanceof Identifier; + } + + /** + * @return {@link #originalPrescription} (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) + */ + public Reference getOriginalPrescriptionReference() throws FHIRException { + if (!(this.originalPrescription instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.originalPrescription.getClass().getName()+" was encountered"); + return (Reference) this.originalPrescription; + } + + public boolean hasOriginalPrescriptionReference() { + return this.originalPrescription instanceof Reference; + } + public boolean hasOriginalPrescription() { return this.originalPrescription != null && !this.originalPrescription.isEmpty(); } @@ -7265,31 +8280,11 @@ public class ExplanationOfBenefit extends DomainResource { /** * @param value {@link #originalPrescription} (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) */ - public ExplanationOfBenefit setOriginalPrescription(Reference value) { + public ExplanationOfBenefit setOriginalPrescription(Type value) { this.originalPrescription = value; return this; } - /** - * @return {@link #originalPrescription} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) - */ - public MedicationOrder getOriginalPrescriptionTarget() { - if (this.originalPrescriptionTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.originalPrescription"); - else if (Configuration.doAutoCreate()) - this.originalPrescriptionTarget = new MedicationOrder(); // aa - return this.originalPrescriptionTarget; - } - - /** - * @param value {@link #originalPrescription} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) - */ - public ExplanationOfBenefit setOriginalPrescriptionTarget(MedicationOrder value) { - this.originalPrescriptionTarget = value; - return this; - } - /** * @return {@link #payee} (The party to be reimbursed for the services.) */ @@ -7317,15 +8312,36 @@ public class ExplanationOfBenefit extends DomainResource { /** * @return {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) */ - public Reference getReferral() { - if (this.referral == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.referral"); - else if (Configuration.doAutoCreate()) - this.referral = new Reference(); // cc + public Type getReferral() { return this.referral; } + /** + * @return {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) + */ + public Identifier getReferralIdentifier() throws FHIRException { + if (!(this.referral instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.referral.getClass().getName()+" was encountered"); + return (Identifier) this.referral; + } + + public boolean hasReferralIdentifier() { + return this.referral instanceof Identifier; + } + + /** + * @return {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) + */ + public Reference getReferralReference() throws FHIRException { + if (!(this.referral instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.referral.getClass().getName()+" was encountered"); + return (Reference) this.referral; + } + + public boolean hasReferralReference() { + return this.referral instanceof Reference; + } + public boolean hasReferral() { return this.referral != null && !this.referral.isEmpty(); } @@ -7333,28 +8349,128 @@ public class ExplanationOfBenefit extends DomainResource { /** * @param value {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) */ - public ExplanationOfBenefit setReferral(Reference value) { + public ExplanationOfBenefit setReferral(Type value) { this.referral = value; return this; } /** - * @return {@link #referral} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The referral resource which lists the date, practitioner, reason and other supporting information.) + * @return {@link #occurrenceCode} (**Insert definition of Occurrence codes.) */ - public ReferralRequest getReferralTarget() { - if (this.referralTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.referral"); - else if (Configuration.doAutoCreate()) - this.referralTarget = new ReferralRequest(); // aa - return this.referralTarget; + public List getOccurrenceCode() { + if (this.occurrenceCode == null) + this.occurrenceCode = new ArrayList(); + return this.occurrenceCode; + } + + public boolean hasOccurrenceCode() { + if (this.occurrenceCode == null) + return false; + for (Coding item : this.occurrenceCode) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #referral} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The referral resource which lists the date, practitioner, reason and other supporting information.) + * @return {@link #occurrenceCode} (**Insert definition of Occurrence codes.) */ - public ExplanationOfBenefit setReferralTarget(ReferralRequest value) { - this.referralTarget = value; + // syntactic sugar + public Coding addOccurrenceCode() { //3 + Coding t = new Coding(); + if (this.occurrenceCode == null) + this.occurrenceCode = new ArrayList(); + this.occurrenceCode.add(t); + return t; + } + + // syntactic sugar + public ExplanationOfBenefit addOccurrenceCode(Coding t) { //3 + if (t == null) + return this; + if (this.occurrenceCode == null) + this.occurrenceCode = new ArrayList(); + this.occurrenceCode.add(t); + return this; + } + + /** + * @return {@link #occurenceSpanCode} (**Insert definition of Occurrence Span codes.) + */ + public List getOccurenceSpanCode() { + if (this.occurenceSpanCode == null) + this.occurenceSpanCode = new ArrayList(); + return this.occurenceSpanCode; + } + + public boolean hasOccurenceSpanCode() { + if (this.occurenceSpanCode == null) + return false; + for (Coding item : this.occurenceSpanCode) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #occurenceSpanCode} (**Insert definition of Occurrence Span codes.) + */ + // syntactic sugar + public Coding addOccurenceSpanCode() { //3 + Coding t = new Coding(); + if (this.occurenceSpanCode == null) + this.occurenceSpanCode = new ArrayList(); + this.occurenceSpanCode.add(t); + return t; + } + + // syntactic sugar + public ExplanationOfBenefit addOccurenceSpanCode(Coding t) { //3 + if (t == null) + return this; + if (this.occurenceSpanCode == null) + this.occurenceSpanCode = new ArrayList(); + this.occurenceSpanCode.add(t); + return this; + } + + /** + * @return {@link #valueCode} (**Insert definition of Value codes.) + */ + public List getValueCode() { + if (this.valueCode == null) + this.valueCode = new ArrayList(); + return this.valueCode; + } + + public boolean hasValueCode() { + if (this.valueCode == null) + return false; + for (Coding item : this.valueCode) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #valueCode} (**Insert definition of Value codes.) + */ + // syntactic sugar + public Coding addValueCode() { //3 + Coding t = new Coding(); + if (this.valueCode == null) + this.valueCode = new ArrayList(); + this.valueCode.add(t); + return t; + } + + // syntactic sugar + public ExplanationOfBenefit addValueCode(Coding t) { //3 + if (t == null) + return this; + if (this.valueCode == null) + this.valueCode = new ArrayList(); + this.valueCode.add(t); return this; } @@ -7398,6 +8514,46 @@ public class ExplanationOfBenefit extends DomainResource { return this; } + /** + * @return {@link #procedure} (Ordered list of patient procedures performed to support the adjudication.) + */ + public List getProcedure() { + if (this.procedure == null) + this.procedure = new ArrayList(); + return this.procedure; + } + + public boolean hasProcedure() { + if (this.procedure == null) + return false; + for (ProcedureComponent item : this.procedure) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #procedure} (Ordered list of patient procedures performed to support the adjudication.) + */ + // syntactic sugar + public ProcedureComponent addProcedure() { //3 + ProcedureComponent t = new ProcedureComponent(); + if (this.procedure == null) + this.procedure = new ArrayList(); + this.procedure.add(t); + return t; + } + + // syntactic sugar + public ExplanationOfBenefit addProcedure(ProcedureComponent t) { //3 + if (t == null) + return this; + if (this.procedure == null) + this.procedure = new ArrayList(); + this.procedure.add(t); + return this; + } + /** * @return {@link #specialCondition} (List of special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication.) */ @@ -7441,15 +8597,36 @@ public class ExplanationOfBenefit extends DomainResource { /** * @return {@link #patient} (Patient Resource.) */ - public Reference getPatient() { - if (this.patient == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.patient"); - else if (Configuration.doAutoCreate()) - this.patient = new Reference(); // cc + public Type getPatient() { return this.patient; } + /** + * @return {@link #patient} (Patient Resource.) + */ + public Identifier getPatientIdentifier() throws FHIRException { + if (!(this.patient instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.patient.getClass().getName()+" was encountered"); + return (Identifier) this.patient; + } + + public boolean hasPatientIdentifier() { + return this.patient instanceof Identifier; + } + + /** + * @return {@link #patient} (Patient Resource.) + */ + public Reference getPatientReference() throws FHIRException { + if (!(this.patient instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.patient.getClass().getName()+" was encountered"); + return (Reference) this.patient; + } + + public boolean hasPatientReference() { + return this.patient instanceof Reference; + } + public boolean hasPatient() { return this.patient != null && !this.patient.isEmpty(); } @@ -7457,31 +8634,11 @@ public class ExplanationOfBenefit extends DomainResource { /** * @param value {@link #patient} (Patient Resource.) */ - public ExplanationOfBenefit setPatient(Reference value) { + public ExplanationOfBenefit setPatient(Type value) { this.patient = value; return this; } - /** - * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Patient Resource.) - */ - public Patient getPatientTarget() { - if (this.patientTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.patient"); - else if (Configuration.doAutoCreate()) - this.patientTarget = new Patient(); // aa - return this.patientTarget; - } - - /** - * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Patient Resource.) - */ - public ExplanationOfBenefit setPatientTarget(Patient value) { - this.patientTarget = value; - return this; - } - /** * @return {@link #precedence} (Precedence (primary, secondary, etc.).). This is the underlying object with id, value and extensions. The accessor "getPrecedence" gives direct access to the value */ @@ -7551,95 +8708,6 @@ public class ExplanationOfBenefit extends DomainResource { return this; } - /** - * @return {@link #exception} (Factors which may influence the applicability of coverage.) - */ - public List getException() { - if (this.exception == null) - this.exception = new ArrayList(); - return this.exception; - } - - public boolean hasException() { - if (this.exception == null) - return false; - for (Coding item : this.exception) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #exception} (Factors which may influence the applicability of coverage.) - */ - // syntactic sugar - public Coding addException() { //3 - Coding t = new Coding(); - if (this.exception == null) - this.exception = new ArrayList(); - this.exception.add(t); - return t; - } - - // syntactic sugar - public ExplanationOfBenefit addException(Coding t) { //3 - if (t == null) - return this; - if (this.exception == null) - this.exception = new ArrayList(); - this.exception.add(t); - return this; - } - - /** - * @return {@link #school} (Name of school for over-aged dependants.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value - */ - public StringType getSchoolElement() { - if (this.school == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.school"); - else if (Configuration.doAutoCreate()) - this.school = new StringType(); // bb - return this.school; - } - - public boolean hasSchoolElement() { - return this.school != null && !this.school.isEmpty(); - } - - public boolean hasSchool() { - return this.school != null && !this.school.isEmpty(); - } - - /** - * @param value {@link #school} (Name of school for over-aged dependants.). This is the underlying object with id, value and extensions. The accessor "getSchool" gives direct access to the value - */ - public ExplanationOfBenefit setSchoolElement(StringType value) { - this.school = value; - return this; - } - - /** - * @return Name of school for over-aged dependants. - */ - public String getSchool() { - return this.school == null ? null : this.school.getValue(); - } - - /** - * @param value Name of school for over-aged dependants. - */ - public ExplanationOfBenefit setSchool(String value) { - if (Utilities.noString(value)) - this.school = null; - else { - if (this.school == null) - this.school = new StringType(); - this.school.setValue(value); - } - return this; - } - /** * @return {@link #accidentDate} (Date of an accident which these services are addressing.). This is the underlying object with id, value and extensions. The accessor "getAccidentDate" gives direct access to the value */ @@ -7720,19 +8788,6 @@ public class ExplanationOfBenefit extends DomainResource { return this.accidentLocation; } - /** - * @return {@link #accidentLocation} (Accident Place.) - */ - public StringType getAccidentLocationStringType() throws FHIRException { - if (!(this.accidentLocation instanceof StringType)) - throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.accidentLocation.getClass().getName()+" was encountered"); - return (StringType) this.accidentLocation; - } - - public boolean hasAccidentLocationStringType() { - return this.accidentLocation instanceof StringType; - } - /** * @return {@link #accidentLocation} (Accident Place.) */ @@ -7812,47 +8867,42 @@ public class ExplanationOfBenefit extends DomainResource { } /** - * @return {@link #onset} (The start or start and end dates for the treatable condition.) + * @return {@link #onset} (Period, start and last dates of aspects of the Condition or related services.) */ - public Type getOnset() { + public List getOnset() { + if (this.onset == null) + this.onset = new ArrayList(); return this.onset; } - /** - * @return {@link #onset} (The start or start and end dates for the treatable condition.) - */ - public DateType getOnsetDateType() throws FHIRException { - if (!(this.onset instanceof DateType)) - throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.onset.getClass().getName()+" was encountered"); - return (DateType) this.onset; - } - - public boolean hasOnsetDateType() { - return this.onset instanceof DateType; - } - - /** - * @return {@link #onset} (The start or start and end dates for the treatable condition.) - */ - public Period getOnsetPeriod() throws FHIRException { - if (!(this.onset instanceof Period)) - throw new FHIRException("Type mismatch: the type Period was expected, but "+this.onset.getClass().getName()+" was encountered"); - return (Period) this.onset; - } - - public boolean hasOnsetPeriod() { - return this.onset instanceof Period; - } - public boolean hasOnset() { - return this.onset != null && !this.onset.isEmpty(); + if (this.onset == null) + return false; + for (OnsetComponent item : this.onset) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #onset} (The start or start and end dates for the treatable condition.) + * @return {@link #onset} (Period, start and last dates of aspects of the Condition or related services.) */ - public ExplanationOfBenefit setOnset(Type value) { - this.onset = value; + // syntactic sugar + public OnsetComponent addOnset() { //3 + OnsetComponent t = new OnsetComponent(); + if (this.onset == null) + this.onset = new ArrayList(); + this.onset.add(t); + return t; + } + + // syntactic sugar + public ExplanationOfBenefit addOnset(OnsetComponent t) { //3 + if (t == null) + return this; + if (this.onset == null) + this.onset = new ArrayList(); + this.onset.add(t); return this; } @@ -7984,30 +9034,6 @@ public class ExplanationOfBenefit extends DomainResource { return this; } - /** - * @return {@link #claimTotal} (The total value of the claim.) - */ - public Money getClaimTotal() { - if (this.claimTotal == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ExplanationOfBenefit.claimTotal"); - else if (Configuration.doAutoCreate()) - this.claimTotal = new Money(); // cc - return this.claimTotal; - } - - public boolean hasClaimTotal() { - return this.claimTotal != null && !this.claimTotal.isEmpty(); - } - - /** - * @param value {@link #claimTotal} (The total value of the claim.) - */ - public ExplanationOfBenefit setClaimTotal(Money value) { - this.claimTotal = value; - return this; - } - /** * @return {@link #missingTeeth} (A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.) */ @@ -8048,6 +9074,30 @@ public class ExplanationOfBenefit extends DomainResource { return this; } + /** + * @return {@link #totalCost} (The total cost of the services reported.) + */ + public Money getTotalCost() { + if (this.totalCost == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ExplanationOfBenefit.totalCost"); + else if (Configuration.doAutoCreate()) + this.totalCost = new Money(); // cc + return this.totalCost; + } + + public boolean hasTotalCost() { + return this.totalCost != null && !this.totalCost.isEmpty(); + } + + /** + * @param value {@link #totalCost} (The total cost of the services reported.) + */ + public ExplanationOfBenefit setTotalCost(Money value) { + this.totalCost = value; + return this; + } + /** * @return {@link #unallocDeductable} (The amount of deductable applied which was not allocated to any particular service line.) */ @@ -8372,39 +9422,42 @@ public class ExplanationOfBenefit extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("identifier", "Identifier", "The Response Business Identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("claim", "Reference(Claim)", "The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.", 0, java.lang.Integer.MAX_VALUE, claim)); - childrenList.add(new Property("claimResponse", "Reference(ClaimResponse)", "The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.", 0, java.lang.Integer.MAX_VALUE, claimResponse)); + childrenList.add(new Property("claim[x]", "Identifier|Reference(Claim)", "The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.", 0, java.lang.Integer.MAX_VALUE, claim)); + childrenList.add(new Property("claimResponse[x]", "Identifier|Reference(ClaimResponse)", "The business identifier for the instance: invoice number, claim number, pre-determination or pre-authorization number.", 0, java.lang.Integer.MAX_VALUE, claimResponse)); + childrenList.add(new Property("subType", "Coding", "A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType.", 0, java.lang.Integer.MAX_VALUE, subType)); childrenList.add(new Property("ruleset", "Coding", "The version of the specification on which this instance relies.", 0, java.lang.Integer.MAX_VALUE, ruleset)); childrenList.add(new Property("originalRuleset", "Coding", "The version of the specification from which the original instance was created.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); childrenList.add(new Property("created", "dateTime", "The date when the EOB was created.", 0, java.lang.Integer.MAX_VALUE, created)); childrenList.add(new Property("billablePeriod", "Period", "The billable period for which charges are being submitted.", 0, java.lang.Integer.MAX_VALUE, billablePeriod)); childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, java.lang.Integer.MAX_VALUE, disposition)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The provider which is responsible for the claim.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The provider which is responsible for the claim.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("facility", "Reference(Location)", "Facility where the services were provided.", 0, java.lang.Integer.MAX_VALUE, facility)); - childrenList.add(new Property("relatedClaim", "Reference(Claim)", "Other claims which are related to this claim such as prior claim versions or for related services.", 0, java.lang.Integer.MAX_VALUE, relatedClaim)); - childrenList.add(new Property("prescription", "Reference(MedicationOrder|VisionPrescription)", "Prescription to support the dispensing of Pharmacy or Vision products.", 0, java.lang.Integer.MAX_VALUE, prescription)); - childrenList.add(new Property("originalPrescription", "Reference(MedicationOrder)", "Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.", 0, java.lang.Integer.MAX_VALUE, originalPrescription)); + childrenList.add(new Property("provider[x]", "Identifier|Reference(Practitioner)", "The provider which is responsible for the claim.", 0, java.lang.Integer.MAX_VALUE, provider)); + childrenList.add(new Property("organization[x]", "Identifier|Reference(Organization)", "The provider which is responsible for the claim.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("facility[x]", "Identifier|Reference(Location)", "Facility where the services were provided.", 0, java.lang.Integer.MAX_VALUE, facility)); + childrenList.add(new Property("related", "", "Other claims which are related to this claim such as prior claim versions or for related services.", 0, java.lang.Integer.MAX_VALUE, related)); + childrenList.add(new Property("prescription[x]", "Identifier|Reference(MedicationOrder|VisionPrescription)", "Prescription to support the dispensing of Pharmacy or Vision products.", 0, java.lang.Integer.MAX_VALUE, prescription)); + childrenList.add(new Property("originalPrescription[x]", "Identifier|Reference(MedicationOrder)", "Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.", 0, java.lang.Integer.MAX_VALUE, originalPrescription)); childrenList.add(new Property("payee", "", "The party to be reimbursed for the services.", 0, java.lang.Integer.MAX_VALUE, payee)); - childrenList.add(new Property("referral", "Reference(ReferralRequest)", "The referral resource which lists the date, practitioner, reason and other supporting information.", 0, java.lang.Integer.MAX_VALUE, referral)); + childrenList.add(new Property("referral[x]", "Identifier|Reference(ReferralRequest)", "The referral resource which lists the date, practitioner, reason and other supporting information.", 0, java.lang.Integer.MAX_VALUE, referral)); + childrenList.add(new Property("occurrenceCode", "Coding", "**Insert definition of Occurrence codes.", 0, java.lang.Integer.MAX_VALUE, occurrenceCode)); + childrenList.add(new Property("occurenceSpanCode", "Coding", "**Insert definition of Occurrence Span codes.", 0, java.lang.Integer.MAX_VALUE, occurenceSpanCode)); + childrenList.add(new Property("valueCode", "Coding", "**Insert definition of Value codes.", 0, java.lang.Integer.MAX_VALUE, valueCode)); childrenList.add(new Property("diagnosis", "", "Ordered list of patient diagnosis for which care is sought.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); + childrenList.add(new Property("procedure", "", "Ordered list of patient procedures performed to support the adjudication.", 0, java.lang.Integer.MAX_VALUE, procedure)); childrenList.add(new Property("specialCondition", "Coding", "List of special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication.", 0, java.lang.Integer.MAX_VALUE, specialCondition)); - childrenList.add(new Property("patient", "Reference(Patient)", "Patient Resource.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("patient[x]", "Identifier|Reference(Patient)", "Patient Resource.", 0, java.lang.Integer.MAX_VALUE, patient)); childrenList.add(new Property("precedence", "positiveInt", "Precedence (primary, secondary, etc.).", 0, java.lang.Integer.MAX_VALUE, precedence)); childrenList.add(new Property("coverage", "", "Financial instrument by which payment information for health care.", 0, java.lang.Integer.MAX_VALUE, coverage)); - childrenList.add(new Property("exception", "Coding", "Factors which may influence the applicability of coverage.", 0, java.lang.Integer.MAX_VALUE, exception)); - childrenList.add(new Property("school", "string", "Name of school for over-aged dependants.", 0, java.lang.Integer.MAX_VALUE, school)); childrenList.add(new Property("accidentDate", "date", "Date of an accident which these services are addressing.", 0, java.lang.Integer.MAX_VALUE, accidentDate)); childrenList.add(new Property("accidentType", "Coding", "Type of accident: work, auto, etc.", 0, java.lang.Integer.MAX_VALUE, accidentType)); - childrenList.add(new Property("accidentLocation[x]", "string|Address|Reference(Location)", "Accident Place.", 0, java.lang.Integer.MAX_VALUE, accidentLocation)); + childrenList.add(new Property("accidentLocation[x]", "Address|Reference(Location)", "Accident Place.", 0, java.lang.Integer.MAX_VALUE, accidentLocation)); childrenList.add(new Property("interventionException", "Coding", "A list of intervention and exception codes which may influence the adjudication of the claim.", 0, java.lang.Integer.MAX_VALUE, interventionException)); - childrenList.add(new Property("onset[x]", "date|Period", "The start or start and end dates for the treatable condition.", 0, java.lang.Integer.MAX_VALUE, onset)); + childrenList.add(new Property("onset", "", "Period, start and last dates of aspects of the Condition or related services.", 0, java.lang.Integer.MAX_VALUE, onset)); childrenList.add(new Property("employmentImpacted", "Period", "The start and optional end dates of when the patient was precluded from working due to the treatable condition(s).", 0, java.lang.Integer.MAX_VALUE, employmentImpacted)); childrenList.add(new Property("hospitalization", "Period", "The start and optional end dates of when the patient was confined to a treatment center.", 0, java.lang.Integer.MAX_VALUE, hospitalization)); childrenList.add(new Property("item", "", "First tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, item)); childrenList.add(new Property("addItem", "", "The first tier service adjudications for payor added services.", 0, java.lang.Integer.MAX_VALUE, addItem)); - childrenList.add(new Property("claimTotal", "Money", "The total value of the claim.", 0, java.lang.Integer.MAX_VALUE, claimTotal)); childrenList.add(new Property("missingTeeth", "", "A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.", 0, java.lang.Integer.MAX_VALUE, missingTeeth)); + childrenList.add(new Property("totalCost", "Money", "The total cost of the services reported.", 0, java.lang.Integer.MAX_VALUE, totalCost)); childrenList.add(new Property("unallocDeductable", "Money", "The amount of deductable applied which was not allocated to any particular service line.", 0, java.lang.Integer.MAX_VALUE, unallocDeductable)); childrenList.add(new Property("totalBenefit", "Money", "Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductable).", 0, java.lang.Integer.MAX_VALUE, totalBenefit)); childrenList.add(new Property("paymentAdjustment", "Money", "Adjustment to the payment of this transaction which is not related to adjudication of this transaction.", 0, java.lang.Integer.MAX_VALUE, paymentAdjustment)); @@ -8422,10 +9475,12 @@ public class ExplanationOfBenefit extends DomainResource { public void setProperty(String name, Base value) throws FHIRException { if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); - else if (name.equals("claim")) - this.claim = castToReference(value); // Reference - else if (name.equals("claimResponse")) - this.claimResponse = castToReference(value); // Reference + else if (name.equals("claim[x]")) + this.claim = (Type) value; // Type + else if (name.equals("claimResponse[x]")) + this.claimResponse = (Type) value; // Type + else if (name.equals("subType")) + this.getSubType().add(castToCoding(value)); else if (name.equals("ruleset")) this.ruleset = castToCoding(value); // Coding else if (name.equals("originalRuleset")) @@ -8436,36 +9491,40 @@ public class ExplanationOfBenefit extends DomainResource { this.billablePeriod = castToPeriod(value); // Period else if (name.equals("disposition")) this.disposition = castToString(value); // StringType - else if (name.equals("provider")) - this.provider = castToReference(value); // Reference - else if (name.equals("organization")) - this.organization = castToReference(value); // Reference - else if (name.equals("facility")) - this.facility = castToReference(value); // Reference - else if (name.equals("relatedClaim")) - this.getRelatedClaim().add(castToReference(value)); - else if (name.equals("prescription")) - this.prescription = castToReference(value); // Reference - else if (name.equals("originalPrescription")) - this.originalPrescription = castToReference(value); // Reference + else if (name.equals("provider[x]")) + this.provider = (Type) value; // Type + else if (name.equals("organization[x]")) + this.organization = (Type) value; // Type + else if (name.equals("facility[x]")) + this.facility = (Type) value; // Type + else if (name.equals("related")) + this.getRelated().add((RelatedClaimsComponent) value); + else if (name.equals("prescription[x]")) + this.prescription = (Type) value; // Type + else if (name.equals("originalPrescription[x]")) + this.originalPrescription = (Type) value; // Type else if (name.equals("payee")) this.payee = (PayeeComponent) value; // PayeeComponent - else if (name.equals("referral")) - this.referral = castToReference(value); // Reference + else if (name.equals("referral[x]")) + this.referral = (Type) value; // Type + else if (name.equals("occurrenceCode")) + this.getOccurrenceCode().add(castToCoding(value)); + else if (name.equals("occurenceSpanCode")) + this.getOccurenceSpanCode().add(castToCoding(value)); + else if (name.equals("valueCode")) + this.getValueCode().add(castToCoding(value)); else if (name.equals("diagnosis")) this.getDiagnosis().add((DiagnosisComponent) value); + else if (name.equals("procedure")) + this.getProcedure().add((ProcedureComponent) value); else if (name.equals("specialCondition")) this.getSpecialCondition().add(castToCoding(value)); - else if (name.equals("patient")) - this.patient = castToReference(value); // Reference + else if (name.equals("patient[x]")) + this.patient = (Type) value; // Type else if (name.equals("precedence")) this.precedence = castToPositiveInt(value); // PositiveIntType else if (name.equals("coverage")) this.coverage = (CoverageComponent) value; // CoverageComponent - else if (name.equals("exception")) - this.getException().add(castToCoding(value)); - else if (name.equals("school")) - this.school = castToString(value); // StringType else if (name.equals("accidentDate")) this.accidentDate = castToDate(value); // DateType else if (name.equals("accidentType")) @@ -8474,8 +9533,8 @@ public class ExplanationOfBenefit extends DomainResource { this.accidentLocation = (Type) value; // Type else if (name.equals("interventionException")) this.getInterventionException().add(castToCoding(value)); - else if (name.equals("onset[x]")) - this.onset = (Type) value; // Type + else if (name.equals("onset")) + this.getOnset().add((OnsetComponent) value); else if (name.equals("employmentImpacted")) this.employmentImpacted = castToPeriod(value); // Period else if (name.equals("hospitalization")) @@ -8484,10 +9543,10 @@ public class ExplanationOfBenefit extends DomainResource { this.getItem().add((ItemsComponent) value); else if (name.equals("addItem")) this.getAddItem().add((AddedItemComponent) value); - else if (name.equals("claimTotal")) - this.claimTotal = castToMoney(value); // Money else if (name.equals("missingTeeth")) this.getMissingTeeth().add((MissingTeethComponent) value); + else if (name.equals("totalCost")) + this.totalCost = castToMoney(value); // Money else if (name.equals("unallocDeductable")) this.unallocDeductable = castToMoney(value); // Money else if (name.equals("totalBenefit")) @@ -8519,14 +9578,25 @@ public class ExplanationOfBenefit extends DomainResource { if (name.equals("identifier")) { return addIdentifier(); } - else if (name.equals("claim")) { + else if (name.equals("claimIdentifier")) { + this.claim = new Identifier(); + return this.claim; + } + else if (name.equals("claimReference")) { this.claim = new Reference(); return this.claim; } - else if (name.equals("claimResponse")) { + else if (name.equals("claimResponseIdentifier")) { + this.claimResponse = new Identifier(); + return this.claimResponse; + } + else if (name.equals("claimResponseReference")) { this.claimResponse = new Reference(); return this.claimResponse; } + else if (name.equals("subType")) { + return addSubType(); + } else if (name.equals("ruleset")) { this.ruleset = new Coding(); return this.ruleset; @@ -8545,26 +9615,46 @@ public class ExplanationOfBenefit extends DomainResource { else if (name.equals("disposition")) { throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.disposition"); } - else if (name.equals("provider")) { + else if (name.equals("providerIdentifier")) { + this.provider = new Identifier(); + return this.provider; + } + else if (name.equals("providerReference")) { this.provider = new Reference(); return this.provider; } - else if (name.equals("organization")) { + else if (name.equals("organizationIdentifier")) { + this.organization = new Identifier(); + return this.organization; + } + else if (name.equals("organizationReference")) { this.organization = new Reference(); return this.organization; } - else if (name.equals("facility")) { + else if (name.equals("facilityIdentifier")) { + this.facility = new Identifier(); + return this.facility; + } + else if (name.equals("facilityReference")) { this.facility = new Reference(); return this.facility; } - else if (name.equals("relatedClaim")) { - return addRelatedClaim(); + else if (name.equals("related")) { + return addRelated(); } - else if (name.equals("prescription")) { + else if (name.equals("prescriptionIdentifier")) { + this.prescription = new Identifier(); + return this.prescription; + } + else if (name.equals("prescriptionReference")) { this.prescription = new Reference(); return this.prescription; } - else if (name.equals("originalPrescription")) { + else if (name.equals("originalPrescriptionIdentifier")) { + this.originalPrescription = new Identifier(); + return this.originalPrescription; + } + else if (name.equals("originalPrescriptionReference")) { this.originalPrescription = new Reference(); return this.originalPrescription; } @@ -8572,17 +9662,37 @@ public class ExplanationOfBenefit extends DomainResource { this.payee = new PayeeComponent(); return this.payee; } - else if (name.equals("referral")) { + else if (name.equals("referralIdentifier")) { + this.referral = new Identifier(); + return this.referral; + } + else if (name.equals("referralReference")) { this.referral = new Reference(); return this.referral; } + else if (name.equals("occurrenceCode")) { + return addOccurrenceCode(); + } + else if (name.equals("occurenceSpanCode")) { + return addOccurenceSpanCode(); + } + else if (name.equals("valueCode")) { + return addValueCode(); + } else if (name.equals("diagnosis")) { return addDiagnosis(); } + else if (name.equals("procedure")) { + return addProcedure(); + } else if (name.equals("specialCondition")) { return addSpecialCondition(); } - else if (name.equals("patient")) { + else if (name.equals("patientIdentifier")) { + this.patient = new Identifier(); + return this.patient; + } + else if (name.equals("patientReference")) { this.patient = new Reference(); return this.patient; } @@ -8593,12 +9703,6 @@ public class ExplanationOfBenefit extends DomainResource { this.coverage = new CoverageComponent(); return this.coverage; } - else if (name.equals("exception")) { - return addException(); - } - else if (name.equals("school")) { - throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.school"); - } else if (name.equals("accidentDate")) { throw new FHIRException("Cannot call addChild on a primitive type ExplanationOfBenefit.accidentDate"); } @@ -8606,10 +9710,6 @@ public class ExplanationOfBenefit extends DomainResource { this.accidentType = new Coding(); return this.accidentType; } - else if (name.equals("accidentLocationString")) { - this.accidentLocation = new StringType(); - return this.accidentLocation; - } else if (name.equals("accidentLocationAddress")) { this.accidentLocation = new Address(); return this.accidentLocation; @@ -8621,13 +9721,8 @@ public class ExplanationOfBenefit extends DomainResource { else if (name.equals("interventionException")) { return addInterventionException(); } - else if (name.equals("onsetDate")) { - this.onset = new DateType(); - return this.onset; - } - else if (name.equals("onsetPeriod")) { - this.onset = new Period(); - return this.onset; + else if (name.equals("onset")) { + return addOnset(); } else if (name.equals("employmentImpacted")) { this.employmentImpacted = new Period(); @@ -8643,13 +9738,13 @@ public class ExplanationOfBenefit extends DomainResource { else if (name.equals("addItem")) { return addAddItem(); } - else if (name.equals("claimTotal")) { - this.claimTotal = new Money(); - return this.claimTotal; - } else if (name.equals("missingTeeth")) { return addMissingTeeth(); } + else if (name.equals("totalCost")) { + this.totalCost = new Money(); + return this.totalCost; + } else if (name.equals("unallocDeductable")) { this.unallocDeductable = new Money(); return this.unallocDeductable; @@ -8710,6 +9805,11 @@ public class ExplanationOfBenefit extends DomainResource { }; dst.claim = claim == null ? null : claim.copy(); dst.claimResponse = claimResponse == null ? null : claimResponse.copy(); + if (subType != null) { + dst.subType = new ArrayList(); + for (Coding i : subType) + dst.subType.add(i.copy()); + }; dst.ruleset = ruleset == null ? null : ruleset.copy(); dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); dst.created = created == null ? null : created.copy(); @@ -8718,20 +9818,40 @@ public class ExplanationOfBenefit extends DomainResource { dst.provider = provider == null ? null : provider.copy(); dst.organization = organization == null ? null : organization.copy(); dst.facility = facility == null ? null : facility.copy(); - if (relatedClaim != null) { - dst.relatedClaim = new ArrayList(); - for (Reference i : relatedClaim) - dst.relatedClaim.add(i.copy()); + if (related != null) { + dst.related = new ArrayList(); + for (RelatedClaimsComponent i : related) + dst.related.add(i.copy()); }; dst.prescription = prescription == null ? null : prescription.copy(); dst.originalPrescription = originalPrescription == null ? null : originalPrescription.copy(); dst.payee = payee == null ? null : payee.copy(); dst.referral = referral == null ? null : referral.copy(); + if (occurrenceCode != null) { + dst.occurrenceCode = new ArrayList(); + for (Coding i : occurrenceCode) + dst.occurrenceCode.add(i.copy()); + }; + if (occurenceSpanCode != null) { + dst.occurenceSpanCode = new ArrayList(); + for (Coding i : occurenceSpanCode) + dst.occurenceSpanCode.add(i.copy()); + }; + if (valueCode != null) { + dst.valueCode = new ArrayList(); + for (Coding i : valueCode) + dst.valueCode.add(i.copy()); + }; if (diagnosis != null) { dst.diagnosis = new ArrayList(); for (DiagnosisComponent i : diagnosis) dst.diagnosis.add(i.copy()); }; + if (procedure != null) { + dst.procedure = new ArrayList(); + for (ProcedureComponent i : procedure) + dst.procedure.add(i.copy()); + }; if (specialCondition != null) { dst.specialCondition = new ArrayList(); for (Coding i : specialCondition) @@ -8740,12 +9860,6 @@ public class ExplanationOfBenefit extends DomainResource { dst.patient = patient == null ? null : patient.copy(); dst.precedence = precedence == null ? null : precedence.copy(); dst.coverage = coverage == null ? null : coverage.copy(); - if (exception != null) { - dst.exception = new ArrayList(); - for (Coding i : exception) - dst.exception.add(i.copy()); - }; - dst.school = school == null ? null : school.copy(); dst.accidentDate = accidentDate == null ? null : accidentDate.copy(); dst.accidentType = accidentType == null ? null : accidentType.copy(); dst.accidentLocation = accidentLocation == null ? null : accidentLocation.copy(); @@ -8754,7 +9868,11 @@ public class ExplanationOfBenefit extends DomainResource { for (Coding i : interventionException) dst.interventionException.add(i.copy()); }; - dst.onset = onset == null ? null : onset.copy(); + if (onset != null) { + dst.onset = new ArrayList(); + for (OnsetComponent i : onset) + dst.onset.add(i.copy()); + }; dst.employmentImpacted = employmentImpacted == null ? null : employmentImpacted.copy(); dst.hospitalization = hospitalization == null ? null : hospitalization.copy(); if (item != null) { @@ -8767,12 +9885,12 @@ public class ExplanationOfBenefit extends DomainResource { for (AddedItemComponent i : addItem) dst.addItem.add(i.copy()); }; - dst.claimTotal = claimTotal == null ? null : claimTotal.copy(); if (missingTeeth != null) { dst.missingTeeth = new ArrayList(); for (MissingTeethComponent i : missingTeeth) dst.missingTeeth.add(i.copy()); }; + dst.totalCost = totalCost == null ? null : totalCost.copy(); dst.unallocDeductable = unallocDeductable == null ? null : unallocDeductable.copy(); dst.totalBenefit = totalBenefit == null ? null : totalBenefit.copy(); dst.paymentAdjustment = paymentAdjustment == null ? null : paymentAdjustment.copy(); @@ -8807,24 +9925,25 @@ public class ExplanationOfBenefit extends DomainResource { return false; ExplanationOfBenefit o = (ExplanationOfBenefit) other; return compareDeep(identifier, o.identifier, true) && compareDeep(claim, o.claim, true) && compareDeep(claimResponse, o.claimResponse, true) - && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) + && compareDeep(subType, o.subType, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) && compareDeep(created, o.created, true) && compareDeep(billablePeriod, o.billablePeriod, true) && compareDeep(disposition, o.disposition, true) && compareDeep(provider, o.provider, true) && compareDeep(organization, o.organization, true) - && compareDeep(facility, o.facility, true) && compareDeep(relatedClaim, o.relatedClaim, true) && compareDeep(prescription, o.prescription, true) + && compareDeep(facility, o.facility, true) && compareDeep(related, o.related, true) && compareDeep(prescription, o.prescription, true) && compareDeep(originalPrescription, o.originalPrescription, true) && compareDeep(payee, o.payee, true) - && compareDeep(referral, o.referral, true) && compareDeep(diagnosis, o.diagnosis, true) && compareDeep(specialCondition, o.specialCondition, true) + && compareDeep(referral, o.referral, true) && compareDeep(occurrenceCode, o.occurrenceCode, true) + && compareDeep(occurenceSpanCode, o.occurenceSpanCode, true) && compareDeep(valueCode, o.valueCode, true) + && compareDeep(diagnosis, o.diagnosis, true) && compareDeep(procedure, o.procedure, true) && compareDeep(specialCondition, o.specialCondition, true) && compareDeep(patient, o.patient, true) && compareDeep(precedence, o.precedence, true) && compareDeep(coverage, o.coverage, true) - && compareDeep(exception, o.exception, true) && compareDeep(school, o.school, true) && compareDeep(accidentDate, o.accidentDate, true) - && compareDeep(accidentType, o.accidentType, true) && compareDeep(accidentLocation, o.accidentLocation, true) - && compareDeep(interventionException, o.interventionException, true) && compareDeep(onset, o.onset, true) - && compareDeep(employmentImpacted, o.employmentImpacted, true) && compareDeep(hospitalization, o.hospitalization, true) - && compareDeep(item, o.item, true) && compareDeep(addItem, o.addItem, true) && compareDeep(claimTotal, o.claimTotal, true) - && compareDeep(missingTeeth, o.missingTeeth, true) && compareDeep(unallocDeductable, o.unallocDeductable, true) - && compareDeep(totalBenefit, o.totalBenefit, true) && compareDeep(paymentAdjustment, o.paymentAdjustment, true) - && compareDeep(paymentAdjustmentReason, o.paymentAdjustmentReason, true) && compareDeep(paymentDate, o.paymentDate, true) - && compareDeep(paymentAmount, o.paymentAmount, true) && compareDeep(paymentRef, o.paymentRef, true) - && compareDeep(reserved, o.reserved, true) && compareDeep(form, o.form, true) && compareDeep(note, o.note, true) - && compareDeep(benefitBalance, o.benefitBalance, true); + && compareDeep(accidentDate, o.accidentDate, true) && compareDeep(accidentType, o.accidentType, true) + && compareDeep(accidentLocation, o.accidentLocation, true) && compareDeep(interventionException, o.interventionException, true) + && compareDeep(onset, o.onset, true) && compareDeep(employmentImpacted, o.employmentImpacted, true) + && compareDeep(hospitalization, o.hospitalization, true) && compareDeep(item, o.item, true) && compareDeep(addItem, o.addItem, true) + && compareDeep(missingTeeth, o.missingTeeth, true) && compareDeep(totalCost, o.totalCost, true) + && compareDeep(unallocDeductable, o.unallocDeductable, true) && compareDeep(totalBenefit, o.totalBenefit, true) + && compareDeep(paymentAdjustment, o.paymentAdjustment, true) && compareDeep(paymentAdjustmentReason, o.paymentAdjustmentReason, true) + && compareDeep(paymentDate, o.paymentDate, true) && compareDeep(paymentAmount, o.paymentAmount, true) + && compareDeep(paymentRef, o.paymentRef, true) && compareDeep(reserved, o.reserved, true) && compareDeep(form, o.form, true) + && compareDeep(note, o.note, true) && compareDeep(benefitBalance, o.benefitBalance, true); } @Override @@ -8835,32 +9954,19 @@ public class ExplanationOfBenefit extends DomainResource { return false; ExplanationOfBenefit o = (ExplanationOfBenefit) other; return compareValues(created, o.created, true) && compareValues(disposition, o.disposition, true) && compareValues(precedence, o.precedence, true) - && compareValues(school, o.school, true) && compareValues(accidentDate, o.accidentDate, true) && compareValues(paymentDate, o.paymentDate, true) + && compareValues(accidentDate, o.accidentDate, true) && compareValues(paymentDate, o.paymentDate, true) ; } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (claim == null || claim.isEmpty()) - && (claimResponse == null || claimResponse.isEmpty()) && (ruleset == null || ruleset.isEmpty()) - && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) - && (billablePeriod == null || billablePeriod.isEmpty()) && (disposition == null || disposition.isEmpty()) - && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) - && (facility == null || facility.isEmpty()) && (relatedClaim == null || relatedClaim.isEmpty()) - && (prescription == null || prescription.isEmpty()) && (originalPrescription == null || originalPrescription.isEmpty()) - && (payee == null || payee.isEmpty()) && (referral == null || referral.isEmpty()) && (diagnosis == null || diagnosis.isEmpty()) - && (specialCondition == null || specialCondition.isEmpty()) && (patient == null || patient.isEmpty()) - && (precedence == null || precedence.isEmpty()) && (coverage == null || coverage.isEmpty()) - && (exception == null || exception.isEmpty()) && (school == null || school.isEmpty()) && (accidentDate == null || accidentDate.isEmpty()) - && (accidentType == null || accidentType.isEmpty()) && (accidentLocation == null || accidentLocation.isEmpty()) - && (interventionException == null || interventionException.isEmpty()) && (onset == null || onset.isEmpty()) - && (employmentImpacted == null || employmentImpacted.isEmpty()) && (hospitalization == null || hospitalization.isEmpty()) - && (item == null || item.isEmpty()) && (addItem == null || addItem.isEmpty()) && (claimTotal == null || claimTotal.isEmpty()) - && (missingTeeth == null || missingTeeth.isEmpty()) && (unallocDeductable == null || unallocDeductable.isEmpty()) - && (totalBenefit == null || totalBenefit.isEmpty()) && (paymentAdjustment == null || paymentAdjustment.isEmpty()) - && (paymentAdjustmentReason == null || paymentAdjustmentReason.isEmpty()) && (paymentDate == null || paymentDate.isEmpty()) - && (paymentAmount == null || paymentAmount.isEmpty()) && (paymentRef == null || paymentRef.isEmpty()) - && (reserved == null || reserved.isEmpty()) && (form == null || form.isEmpty()) && (note == null || note.isEmpty()) - && (benefitBalance == null || benefitBalance.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, claim, claimResponse + , subType, ruleset, originalRuleset, created, billablePeriod, disposition, provider, organization + , facility, related, prescription, originalPrescription, payee, referral, occurrenceCode + , occurenceSpanCode, valueCode, diagnosis, procedure, specialCondition, patient, precedence + , coverage, accidentDate, accidentType, accidentLocation, interventionException, onset + , employmentImpacted, hospitalization, item, addItem, missingTeeth, totalCost, unallocDeductable + , totalBenefit, paymentAdjustment, paymentAdjustmentReason, paymentDate, paymentAmount + , paymentRef, reserved, form, note, benefitBalance); } @Override @@ -8889,76 +9995,70 @@ public class ExplanationOfBenefit extends DomainResource { public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); /** - * Search parameter: disposition + * Search parameter: patientidentifier *

- * Description: The contents of the disposition message
- * Type: string
- * Path: ExplanationOfBenefit.disposition
+ * Description: The reference to the patient
+ * Type: token
+ * Path: ExplanationOfBenefit.patientIdentifier
*

*/ - @SearchParamDefinition(name="disposition", path="ExplanationOfBenefit.disposition", description="The contents of the disposition message", type="string" ) - public static final String SP_DISPOSITION = "disposition"; + @SearchParamDefinition(name="patientidentifier", path="ExplanationOfBenefit.patientIdentifier", description="The reference to the patient", type="token" ) + public static final String SP_PATIENTIDENTIFIER = "patientidentifier"; /** - * Fluent Client search parameter constant for disposition + * Fluent Client search parameter constant for patientidentifier *

- * Description: The contents of the disposition message
- * Type: string
- * Path: ExplanationOfBenefit.disposition
+ * Description: The reference to the patient
+ * Type: token
+ * Path: ExplanationOfBenefit.patientIdentifier
*

*/ - public static final ca.uhn.fhir.rest.gclient.StringClientParam DISPOSITION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DISPOSITION); + public static final ca.uhn.fhir.rest.gclient.TokenClientParam PATIENTIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PATIENTIDENTIFIER); /** - * Search parameter: provider + * Search parameter: organizationidentifier *

- * Description: The reference to the provider
- * Type: reference
- * Path: ExplanationOfBenefit.provider
+ * Description: The reference to the providing organization
+ * Type: token
+ * Path: ExplanationOfBenefit.organizationIdentifier
*

*/ - @SearchParamDefinition(name="provider", path="ExplanationOfBenefit.provider", description="The reference to the provider", type="reference" ) - public static final String SP_PROVIDER = "provider"; + @SearchParamDefinition(name="organizationidentifier", path="ExplanationOfBenefit.organizationIdentifier", description="The reference to the providing organization", type="token" ) + public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier"; /** - * Fluent Client search parameter constant for provider + * Fluent Client search parameter constant for organizationidentifier *

- * Description: The reference to the provider
- * Type: reference
- * Path: ExplanationOfBenefit.provider
+ * Description: The reference to the providing organization
+ * Type: token
+ * Path: ExplanationOfBenefit.organizationIdentifier
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDER); + public static final ca.uhn.fhir.rest.gclient.TokenClientParam ORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ORGANIZATIONIDENTIFIER); + + /** + * Search parameter: claimreference + *

+ * Description: The reference to the claim
+ * Type: reference
+ * Path: ExplanationOfBenefit.claimReference
+ *

+ */ + @SearchParamDefinition(name="claimreference", path="ExplanationOfBenefit.claimReference", description="The reference to the claim", type="reference" ) + public static final String SP_CLAIMREFERENCE = "claimreference"; + /** + * Fluent Client search parameter constant for claimreference + *

+ * Description: The reference to the claim
+ * Type: reference
+ * Path: ExplanationOfBenefit.claimReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CLAIMREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CLAIMREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ExplanationOfBenefit:provider". + * the path value of "ExplanationOfBenefit:claimreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDER = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:provider").toLocked(); - - /** - * Search parameter: patient - *

- * Description: The reference to the patient
- * Type: reference
- * Path: ExplanationOfBenefit.patient
- *

- */ - @SearchParamDefinition(name="patient", path="ExplanationOfBenefit.patient", description="The reference to the patient", type="reference" ) - public static final String SP_PATIENT = "patient"; - /** - * Fluent Client search parameter constant for patient - *

- * Description: The reference to the patient
- * Type: reference
- * Path: ExplanationOfBenefit.patient
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ExplanationOfBenefit:patient". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:patient").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_CLAIMREFERENCE = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:claimreference").toLocked(); /** * Search parameter: created @@ -8981,82 +10081,188 @@ public class ExplanationOfBenefit extends DomainResource { public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED); /** - * Search parameter: organization + * Search parameter: patientreference + *

+ * Description: The reference to the patient
+ * Type: reference
+ * Path: ExplanationOfBenefit.patientReference
+ *

+ */ + @SearchParamDefinition(name="patientreference", path="ExplanationOfBenefit.patientReference", description="The reference to the patient", type="reference" ) + public static final String SP_PATIENTREFERENCE = "patientreference"; + /** + * Fluent Client search parameter constant for patientreference + *

+ * Description: The reference to the patient
+ * Type: reference
+ * Path: ExplanationOfBenefit.patientReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENTREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENTREFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "ExplanationOfBenefit:patientreference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENTREFERENCE = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:patientreference").toLocked(); + + /** + * Search parameter: providerreference + *

+ * Description: The reference to the provider
+ * Type: reference
+ * Path: ExplanationOfBenefit.providerReference
+ *

+ */ + @SearchParamDefinition(name="providerreference", path="ExplanationOfBenefit.providerReference", description="The reference to the provider", type="reference" ) + public static final String SP_PROVIDERREFERENCE = "providerreference"; + /** + * Fluent Client search parameter constant for providerreference + *

+ * Description: The reference to the provider
+ * Type: reference
+ * Path: ExplanationOfBenefit.providerReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDERREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDERREFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "ExplanationOfBenefit:providerreference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDERREFERENCE = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:providerreference").toLocked(); + + /** + * Search parameter: organizationreference *

* Description: The reference to the providing organization
* Type: reference
- * Path: ExplanationOfBenefit.organization
+ * Path: ExplanationOfBenefit.organizationReference
*

*/ - @SearchParamDefinition(name="organization", path="ExplanationOfBenefit.organization", description="The reference to the providing organization", type="reference" ) - public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="organizationreference", path="ExplanationOfBenefit.organizationReference", description="The reference to the providing organization", type="reference" ) + public static final String SP_ORGANIZATIONREFERENCE = "organizationreference"; /** - * Fluent Client search parameter constant for organization + * Fluent Client search parameter constant for organizationreference *

* Description: The reference to the providing organization
* Type: reference
- * Path: ExplanationOfBenefit.organization
+ * Path: ExplanationOfBenefit.organizationReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATIONREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ExplanationOfBenefit:organization". + * the path value of "ExplanationOfBenefit:organizationreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:organization").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:organizationreference").toLocked(); /** - * Search parameter: claim + * Search parameter: provideridentifier *

- * Description: The reference to the claim
- * Type: reference
- * Path: ExplanationOfBenefit.claim
+ * Description: The reference to the provider
+ * Type: token
+ * Path: ExplanationOfBenefit.providerIdentifier
*

*/ - @SearchParamDefinition(name="claim", path="ExplanationOfBenefit.claim", description="The reference to the claim", type="reference" ) - public static final String SP_CLAIM = "claim"; + @SearchParamDefinition(name="provideridentifier", path="ExplanationOfBenefit.providerIdentifier", description="The reference to the provider", type="token" ) + public static final String SP_PROVIDERIDENTIFIER = "provideridentifier"; /** - * Fluent Client search parameter constant for claim + * Fluent Client search parameter constant for provideridentifier *

- * Description: The reference to the claim
- * Type: reference
- * Path: ExplanationOfBenefit.claim
+ * Description: The reference to the provider
+ * Type: token
+ * Path: ExplanationOfBenefit.providerIdentifier
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CLAIM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CLAIM); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ExplanationOfBenefit:claim". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_CLAIM = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:claim").toLocked(); + public static final ca.uhn.fhir.rest.gclient.TokenClientParam PROVIDERIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PROVIDERIDENTIFIER); /** - * Search parameter: facility + * Search parameter: disposition + *

+ * Description: The contents of the disposition message
+ * Type: string
+ * Path: ExplanationOfBenefit.disposition
+ *

+ */ + @SearchParamDefinition(name="disposition", path="ExplanationOfBenefit.disposition", description="The contents of the disposition message", type="string" ) + public static final String SP_DISPOSITION = "disposition"; + /** + * Fluent Client search parameter constant for disposition + *

+ * Description: The contents of the disposition message
+ * Type: string
+ * Path: ExplanationOfBenefit.disposition
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam DISPOSITION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DISPOSITION); + + /** + * Search parameter: facilityreference *

* Description: Facility responsible for the goods and services
* Type: reference
- * Path: ExplanationOfBenefit.facility
+ * Path: ExplanationOfBenefit.facilityReference
*

*/ - @SearchParamDefinition(name="facility", path="ExplanationOfBenefit.facility", description="Facility responsible for the goods and services", type="reference" ) - public static final String SP_FACILITY = "facility"; + @SearchParamDefinition(name="facilityreference", path="ExplanationOfBenefit.facilityReference", description="Facility responsible for the goods and services", type="reference" ) + public static final String SP_FACILITYREFERENCE = "facilityreference"; /** - * Fluent Client search parameter constant for facility + * Fluent Client search parameter constant for facilityreference *

* Description: Facility responsible for the goods and services
* Type: reference
- * Path: ExplanationOfBenefit.facility
+ * Path: ExplanationOfBenefit.facilityReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FACILITY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FACILITY); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FACILITYREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FACILITYREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ExplanationOfBenefit:facility". + * the path value of "ExplanationOfBenefit:facilityreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_FACILITY = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:facility").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_FACILITYREFERENCE = new ca.uhn.fhir.model.api.Include("ExplanationOfBenefit:facilityreference").toLocked(); + + /** + * Search parameter: claimindentifier + *

+ * Description: The reference to the claim
+ * Type: token
+ * Path: ExplanationOfBenefit.claimIdentifier
+ *

+ */ + @SearchParamDefinition(name="claimindentifier", path="ExplanationOfBenefit.claimIdentifier", description="The reference to the claim", type="token" ) + public static final String SP_CLAIMINDENTIFIER = "claimindentifier"; + /** + * Fluent Client search parameter constant for claimindentifier + *

+ * Description: The reference to the claim
+ * Type: token
+ * Path: ExplanationOfBenefit.claimIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam CLAIMINDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CLAIMINDENTIFIER); + + /** + * Search parameter: facilityidentifier + *

+ * Description: Facility responsible for the goods and services
+ * Type: token
+ * Path: ExplanationOfBenefit.facilityIdentifier
+ *

+ */ + @SearchParamDefinition(name="facilityidentifier", path="ExplanationOfBenefit.facilityIdentifier", description="Facility responsible for the goods and services", type="token" ) + public static final String SP_FACILITYIDENTIFIER = "facilityidentifier"; + /** + * Fluent Client search parameter constant for facilityidentifier + *

+ * Description: Facility responsible for the goods and services
+ * Type: token
+ * Path: ExplanationOfBenefit.facilityIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam FACILITYIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FACILITYIDENTIFIER); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ExpressionNode.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ExpressionNode.java index 1b51a61e69b..633ed567944 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ExpressionNode.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ExpressionNode.java @@ -37,82 +37,105 @@ public class ExpressionNode { } } public enum Function { - Empty, Item, Where, All, Any, First, Last, Tail, Count, AsInteger, StartsWith, Length, Matches, Substring, Contains, Distinct, Not, Resolve, Extension, Log; - + Empty, Not, Exists, SubsetOf, SupersetOf, IsDistinct, Distinct, Count, Where, Select, All, Repeat, Item /*implicit from name[]*/, As, Is, Single, + First, Last, Tail, Skip, Take, Iif, ToInteger, ToDecimal, ToString, Substring, StartsWith, EndsWith, Matches, ReplaceMatches, Contains, Replace, Length, + Children, Descendents, MemberOf, Trace, Today, Now, Resolve, Extension; public static Function fromCode(String name) { - if (name.equals("empty")) - return Function.Empty; - if (name.equals("item")) - return Function.Item; - if (name.equals("where")) - return Function.Where; - if (name.equals("all")) - return Function.All; - if (name.equals("any")) - return Function.Any; - if (name.equals("first")) - return Function.First; - if (name.equals("last")) - return Function.Last; - if (name.equals("tail")) - return Function.Tail; - if (name.equals("count")) - return Function.Count; - if (name.equals("asInteger")) - return Function.AsInteger; - if (name.equals("startsWith")) - return Function.StartsWith; - if (name.equals("length")) - return Function.Length; - if (name.equals("matches")) - return Function.Matches; - if (name.equals("contains")) - return Function.Contains; - if (name.equals("substring")) - return Function.Substring; - if (name.equals("distinct")) - return Function.Distinct; - if (name.equals("not")) - return Function.Not; - if (name.equals("resolve")) - return Function.Resolve; - if (name.equals("extension")) - return Function.Extension; - if (name.equals("log")) - return Function.Log; - + if (name.equals("empty")) return Function.Empty; + if (name.equals("not")) return Function.Not; + if (name.equals("exists")) return Function.Exists; + if (name.equals("subsetOf")) return Function.SubsetOf; + if (name.equals("supersetOf")) return Function.SupersetOf; + if (name.equals("isDistinct")) return Function.IsDistinct; + if (name.equals("distinct")) return Function.Distinct; + if (name.equals("count")) return Function.Count; + if (name.equals("where")) return Function.Where; + if (name.equals("select")) return Function.Select; + if (name.equals("all")) return Function.All; + if (name.equals("repeat")) return Function.Repeat; + if (name.equals("item")) return Function.Item; + if (name.equals("as")) return Function.As; + if (name.equals("is")) return Function.Is; + if (name.equals("single")) return Function.Single; + if (name.equals("first")) return Function.First; + if (name.equals("last")) return Function.Last; + if (name.equals("tail")) return Function.Tail; + if (name.equals("skip")) return Function.Skip; + if (name.equals("take")) return Function.Take; + if (name.equals("iif")) return Function.Iif; + if (name.equals("toInteger")) return Function.ToInteger; + if (name.equals("toDecimal")) return Function.ToDecimal; + if (name.equals("toString")) return Function.ToString; + if (name.equals("substring")) return Function.Substring; + if (name.equals("startsWith")) return Function.StartsWith; + if (name.equals("endsWith")) return Function.EndsWith; + if (name.equals("matches")) return Function.Matches; + if (name.equals("replaceMatches")) return Function.ReplaceMatches; + if (name.equals("contains")) return Function.Contains; + if (name.equals("replace")) return Function.Replace; + if (name.equals("length")) return Function.Length; + if (name.equals("children")) return Function.Children; + if (name.equals("descendents")) return Function.Descendents; + if (name.equals("memberOf")) return Function.MemberOf; + if (name.equals("trace")) return Function.Trace; + if (name.equals("today")) return Function.Today; + if (name.equals("now")) return Function.Now; + if (name.equals("resolve")) return Function.Resolve; + if (name.equals("extension")) return Function.Extension; return null; } public String toCode() { switch (this) { case Empty : return "empty"; - case Item : return "item"; + case Not : return "not"; + case Exists : return "exists"; + case SubsetOf : return "subsetOf"; + case SupersetOf : return "supersetOf"; + case IsDistinct : return "isDistinct"; + case Distinct : return "distinct"; + case Count : return "count"; case Where : return "where"; + case Select : return "select"; case All : return "all"; - case Any : return "any"; + case Repeat : return "repeat"; + case Item : return "item"; + case As : return "as"; + case Is : return "is"; + case Single : return "single"; case First : return "first"; case Last : return "last"; case Tail : return "tail"; - case Count : return "count"; - case AsInteger : return "asInteger"; + case Skip : return "skip"; + case Take : return "take"; + case Iif : return "iif"; + case ToInteger : return "toInteger"; + case ToDecimal : return "toDecimal"; + case ToString : return "toString"; + case Substring : return "substring"; case StartsWith : return "startsWith"; - case Length : return "length"; + case EndsWith : return "endsWith"; case Matches : return "matches"; + case ReplaceMatches : return "replaceMatches"; case Contains : return "contains"; - case Substring : return "substring"; - case Distinct : return "distinct"; - case Not : return "not"; + case Replace : return "replace"; + case Length : return "length"; + case Children : return "children"; + case Descendents : return "descendents"; + case MemberOf : return "memberOf"; + case Trace : return "trace"; + case Today : return "today"; + case Now : return "now"; case Resolve : return "resolve"; case Extension : return "extension"; - case Log : return "log"; default: return "??"; } } } public enum Operation { - Equals, Equivalent, NotEquals, NotEquivalent, LessThen, Greater, LessOrEqual, GreaterOrEqual, Union, In, Or, And, Xor, Implies, Plus, Minus, Concatenate; + Equals, Equivalent, NotEquals, NotEquivalent, LessThen, Greater, LessOrEqual, GreaterOrEqual, Is, As, Union, Or, And, Xor, Implies, + Times, DivideBy, Plus, Minus, Div, Mod, In; public static Operation fromCode(String name) { if (Utilities.noString(name)) @@ -135,22 +158,32 @@ public class ExpressionNode { return Operation.LessOrEqual; if (name.equals("|")) return Operation.Union; - if (name.equals("in")) - return Operation.In; if (name.equals("or")) return Operation.Or; if (name.equals("and")) return Operation.And; if (name.equals("xor")) return Operation.Xor; + if (name.equals("is")) + return Operation.Is; + if (name.equals("as")) + return Operation.As; + if (name.equals("*")) + return Operation.Times; + if (name.equals("/")) + return Operation.DivideBy; if (name.equals("+")) return Operation.Plus; if (name.equals("-")) return Operation.Minus; - if (name.equals("&")) - return Operation.Concatenate; if (name.equals("implies")) return Operation.Implies; + if (name.equals("div")) + return Operation.Div; + if (name.equals("mod")) + return Operation.Mod; + if (name.equals("in")) + return Operation.In; return null; } @@ -165,14 +198,19 @@ public class ExpressionNode { case GreaterOrEqual : return ">="; case LessOrEqual : return "<="; case Union : return "|"; - case In : return "in"; case Or : return "or"; case And : return "and"; case Xor : return "xor"; + case Times : return "*"; + case DivideBy : return "/"; case Plus : return "+"; case Minus : return "-"; - case Concatenate : return "&"; case Implies : return "implies"; + case Is : return "is"; + case As : return "as"; + case Div : return "div"; + case Mod : return "mod"; + case In : return "in"; default: return "??"; } } @@ -451,5 +489,4 @@ public class ExpressionNode { this.opTypes = opTypes; } - } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Extension.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Extension.java index 6598ebb5cb2..01faf0414aa 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Extension.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Extension.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -38,9 +38,8 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Optional Extensions Element - found in all resources. */ @@ -61,7 +60,7 @@ public class Extension extends BaseExtension implements IBaseExtensionFamilyMemberHistory.patient
*

*/ - @SearchParamDefinition(name="patient", path="FamilyMemberHistory.patient", description="The identity of a subject to list family member history items for", type="reference" ) + @SearchParamDefinition(name="patient", path="FamilyMemberHistory.patient", description="The identity of a subject to list family member history items for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Flag.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Flag.java index dbcf286143b..ef14e96266b 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Flag.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Flag.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Prospective warnings of potential issues when providing care to the patient. */ @@ -640,10 +639,8 @@ public class Flag extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (category == null || category.isEmpty()) - && (status == null || status.isEmpty()) && (period == null || period.isEmpty()) && (subject == null || subject.isEmpty()) - && (encounter == null || encounter.isEmpty()) && (author == null || author.isEmpty()) && (code == null || code.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, category, status + , period, subject, encounter, author, code); } @Override @@ -705,7 +702,7 @@ public class Flag extends DomainResource { * Path: Flag.subject
*

*/ - @SearchParamDefinition(name="patient", path="Flag.subject", description="The identity of a subject to list flags for", type="reference" ) + @SearchParamDefinition(name="patient", path="Flag.subject", description="The identity of a subject to list flags for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient @@ -731,7 +728,7 @@ public class Flag extends DomainResource { * Path: Flag.author
*

*/ - @SearchParamDefinition(name="author", path="Flag.author", description="Flag creator", type="reference" ) + @SearchParamDefinition(name="author", path="Flag.author", description="Flag creator", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_AUTHOR = "author"; /** * Fluent Client search parameter constant for author diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Goal.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Goal.java index 19f93666912..7fa01218e66 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Goal.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Goal.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc. */ @@ -365,7 +364,7 @@ public class Goal extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (result == null || result.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( result); } public String fhirType() { @@ -1259,12 +1258,9 @@ public class Goal extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (subject == null || subject.isEmpty()) - && (start == null || start.isEmpty()) && (target == null || target.isEmpty()) && (category == null || category.isEmpty()) - && (description == null || description.isEmpty()) && (status == null || status.isEmpty()) - && (statusDate == null || statusDate.isEmpty()) && (statusReason == null || statusReason.isEmpty()) - && (author == null || author.isEmpty()) && (priority == null || priority.isEmpty()) && (addresses == null || addresses.isEmpty()) - && (note == null || note.isEmpty()) && (outcome == null || outcome.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, subject, start, target + , category, description, status, statusDate, statusReason, author, priority, addresses + , note, outcome); } @Override @@ -1300,7 +1296,7 @@ public class Goal extends DomainResource { * Path: Goal.subject
*

*/ - @SearchParamDefinition(name="patient", path="Goal.subject", description="Who this goal is intended for", type="reference" ) + @SearchParamDefinition(name="patient", path="Goal.subject", description="Who this goal is intended for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Group.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Group.java index 94ac7adf767..bb44f73f26c 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Group.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Group.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization. */ @@ -499,8 +498,8 @@ public class Group extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (value == null || value.isEmpty()) - && (exclude == null || exclude.isEmpty()) && (period == null || period.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, value, exclude, period + ); } public String fhirType() { @@ -730,8 +729,7 @@ public class Group extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (entity == null || entity.isEmpty()) && (period == null || period.isEmpty()) - && (inactive == null || inactive.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( entity, period, inactive); } public String fhirType() { @@ -1327,10 +1325,8 @@ public class Group extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (type == null || type.isEmpty()) - && (actual == null || actual.isEmpty()) && (active == null || active.isEmpty()) && (code == null || code.isEmpty()) - && (name == null || name.isEmpty()) && (quantity == null || quantity.isEmpty()) && (characteristic == null || characteristic.isEmpty()) - && (member == null || member.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, type, actual, active + , code, name, quantity, characteristic, member); } @Override @@ -1426,7 +1422,7 @@ public class Group extends DomainResource { * Path: Group.member.entity
*

*/ - @SearchParamDefinition(name="member", path="Group.member.entity", description="Reference to the group member", type="reference" ) + @SearchParamDefinition(name="member", path="Group.member.entity", description="Reference to the group member", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_MEMBER = "member"; /** * Fluent Client search parameter constant for member diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/GuidanceResponse.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/GuidanceResponse.java index b4b0c582e48..8539beef93b 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/GuidanceResponse.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/GuidanceResponse.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,11 +39,10 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** - * A guidance response is the formal response to a previous guidance request. It is a derivative of the knowledge response that provides additional information relevant specifically to clinical decision support such as a description of any proposed actions to be taken. + * A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken. */ @ResourceDef(name="GuidanceResponse", profile="http://hl7.org/fhir/Profile/GuidanceResponse") public class GuidanceResponse extends DomainResource { @@ -183,160 +182,76 @@ public class GuidanceResponse extends DomainResource { } } - public enum GuidanceResponseActionType { - /** - * The action is to create a new resource - */ - CREATE, - /** - * The action is to update an existing resource - */ - UPDATE, - /** - * The action is to remove an existing resource - */ - REMOVE, - /** - * The action is to fire a specific event - */ - FIREEVENT, - /** - * added to help the parsers - */ - NULL; - public static GuidanceResponseActionType fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("create".equals(codeString)) - return CREATE; - if ("update".equals(codeString)) - return UPDATE; - if ("remove".equals(codeString)) - return REMOVE; - if ("fire-event".equals(codeString)) - return FIREEVENT; - throw new FHIRException("Unknown GuidanceResponseActionType code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case CREATE: return "create"; - case UPDATE: return "update"; - case REMOVE: return "remove"; - case FIREEVENT: return "fire-event"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case CREATE: return "http://hl7.org/fhir/guidance-response-action-type"; - case UPDATE: return "http://hl7.org/fhir/guidance-response-action-type"; - case REMOVE: return "http://hl7.org/fhir/guidance-response-action-type"; - case FIREEVENT: return "http://hl7.org/fhir/guidance-response-action-type"; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case CREATE: return "The action is to create a new resource"; - case UPDATE: return "The action is to update an existing resource"; - case REMOVE: return "The action is to remove an existing resource"; - case FIREEVENT: return "The action is to fire a specific event"; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case CREATE: return "Create"; - case UPDATE: return "Update"; - case REMOVE: return "Remove"; - case FIREEVENT: return "Fire Event"; - default: return "?"; - } - } - } - - public static class GuidanceResponseActionTypeEnumFactory implements EnumFactory { - public GuidanceResponseActionType fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("create".equals(codeString)) - return GuidanceResponseActionType.CREATE; - if ("update".equals(codeString)) - return GuidanceResponseActionType.UPDATE; - if ("remove".equals(codeString)) - return GuidanceResponseActionType.REMOVE; - if ("fire-event".equals(codeString)) - return GuidanceResponseActionType.FIREEVENT; - throw new IllegalArgumentException("Unknown GuidanceResponseActionType code '"+codeString+"'"); - } - public Enumeration fromType(Base code) throws FHIRException { - if (code == null || code.isEmpty()) - return null; - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return null; - if ("create".equals(codeString)) - return new Enumeration(this, GuidanceResponseActionType.CREATE); - if ("update".equals(codeString)) - return new Enumeration(this, GuidanceResponseActionType.UPDATE); - if ("remove".equals(codeString)) - return new Enumeration(this, GuidanceResponseActionType.REMOVE); - if ("fire-event".equals(codeString)) - return new Enumeration(this, GuidanceResponseActionType.FIREEVENT); - throw new FHIRException("Unknown GuidanceResponseActionType code '"+codeString+"'"); - } - public String toCode(GuidanceResponseActionType code) { - if (code == GuidanceResponseActionType.CREATE) - return "create"; - if (code == GuidanceResponseActionType.UPDATE) - return "update"; - if (code == GuidanceResponseActionType.REMOVE) - return "remove"; - if (code == GuidanceResponseActionType.FIREEVENT) - return "fire-event"; - return "?"; - } - public String toSystem(GuidanceResponseActionType code) { - return code.getSystem(); - } - } - @Block() public static class GuidanceResponseActionComponent extends BackboneElement implements IBaseBackboneElement { /** - * A unique identifier for the action. + * A unique identifier for the action. The identifier SHALL be unique within the container in which it appears, and MAY be universally unique. */ @Child(name = "actionIdentifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="A unique identifier for the action." ) + @Description(shortDefinition="Unique identifier", formalDefinition="A unique identifier for the action. The identifier SHALL be unique within the container in which it appears, and MAY be universally unique." ) protected Identifier actionIdentifier; /** - * A user-visible number for the action. + * A user-visible label for the action. */ - @Child(name = "number", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="A user-visible number for the action." ) - protected StringType number; + @Child(name = "label", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="User-visible label for the action (e.g. 1. or A.)", formalDefinition="A user-visible label for the action." ) + protected StringType label; /** - * Supporting evidence for the action. + * The title of the action displayed to a user. */ - @Child(name = "supportingEvidence", type = {Attachment.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Supporting evidence for the action." ) + @Child(name = "title", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="User-visible title", formalDefinition="The title of the action displayed to a user." ) + protected StringType title; + + /** + * A short description of the action used to provide a summary to display to the user. + */ + @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Short description of the action", formalDefinition="A short description of the action used to provide a summary to display to the user." ) + protected StringType description; + + /** + * A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically. + */ + @Child(name = "textEquivalent", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Static text equivalent of the action, used if the dynamic aspects cannot be interpreted by the receiving system", formalDefinition="A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically." ) + protected StringType textEquivalent; + + /** + * The concept represented by this action or its sub-actions. + */ + @Child(name = "concept", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The meaning of the action or its sub-actions", formalDefinition="The concept represented by this action or its sub-actions." ) + protected List concept; + + /** + * The evidence grade and the sources of evidence for this action. + */ + @Child(name = "supportingEvidence", type = {Attachment.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Evidence that supports taking the action", formalDefinition="The evidence grade and the sources of evidence for this action." ) protected List supportingEvidence; /** - * Supporting documentation for the action. + * A relationship to another action such as "before" or "30-60 minutes after start of". */ - @Child(name = "documentation", type = {Attachment.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Supporting documentation for the action." ) + @Child(name = "relatedAction", type = {}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Relationship to another action", formalDefinition="A relationship to another action such as \"before\" or \"30-60 minutes after start of\"." ) + protected GuidanceResponseActionRelatedActionComponent relatedAction; + + /** + * Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources. + */ + @Child(name = "documentation", type = {Attachment.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Supporting documentation for the intended performer of the action", formalDefinition="Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources." ) protected List documentation; /** * The participant in the action. */ - @Child(name = "participant", type = {Patient.class, Person.class, Practitioner.class, RelatedPerson.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The participant in the action." ) + @Child(name = "participant", type = {Patient.class, Person.class, Practitioner.class, RelatedPerson.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Participant", formalDefinition="The participant in the action." ) protected List participant; /** * The actual objects that are the target of the reference (The participant in the action.) @@ -344,46 +259,25 @@ public class GuidanceResponse extends DomainResource { protected List participantTarget; - /** - * The title of the action. - */ - @Child(name = "title", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The title of the action." ) - protected StringType title; - - /** - * A short description of the action. - */ - @Child(name = "description", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="A short description of the action." ) - protected StringType description; - - /** - * A text equivalent of the action to be performed. - */ - @Child(name = "textEquivalent", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="A text equivalent of the action to be performed." ) - protected StringType textEquivalent; - - /** - * Concepts associated with the action. - */ - @Child(name = "concept", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Concepts associated with the action." ) - protected List concept; - /** * The type of action to perform (create, update, remove). */ - @Child(name = "type", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Child(name = "type", type = {CodeType.class}, order=11, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="create | update | remove | fire-event", formalDefinition="The type of action to perform (create, update, remove)." ) - protected Enumeration type; + protected CodeType type; + + /** + * A behavior associated with the action. Behaviors define how the action is to be presented and/or executed within the receiving environment. + */ + @Child(name = "behavior", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Defines behaviors such as selection and grouping", formalDefinition="A behavior associated with the action. Behaviors define how the action is to be presented and/or executed within the receiving environment." ) + protected List behavior; /** * The resource that is the target of the action (e.g. CommunicationRequest). */ - @Child(name = "resource", type = {}, order=11, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The resource that is the target of the action (e.g. CommunicationRequest)." ) + @Child(name = "resource", type = {}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The target of the action", formalDefinition="The resource that is the target of the action (e.g. CommunicationRequest)." ) protected Reference resource; /** @@ -394,11 +288,11 @@ public class GuidanceResponse extends DomainResource { /** * Sub actions. */ - @Child(name = "actions", type = {GuidanceResponseActionComponent.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Sub actions." ) - protected List actions; + @Child(name = "action", type = {GuidanceResponseActionComponent.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Sub action", formalDefinition="Sub actions." ) + protected List action; - private static final long serialVersionUID = 1245922408L; + private static final long serialVersionUID = -1602697381L; /** * Constructor @@ -408,7 +302,7 @@ public class GuidanceResponse extends DomainResource { } /** - * @return {@link #actionIdentifier} (A unique identifier for the action.) + * @return {@link #actionIdentifier} (A unique identifier for the action. The identifier SHALL be unique within the container in which it appears, and MAY be universally unique.) */ public Identifier getActionIdentifier() { if (this.actionIdentifier == null) @@ -424,7 +318,7 @@ public class GuidanceResponse extends DomainResource { } /** - * @param value {@link #actionIdentifier} (A unique identifier for the action.) + * @param value {@link #actionIdentifier} (A unique identifier for the action. The identifier SHALL be unique within the container in which it appears, and MAY be universally unique.) */ public GuidanceResponseActionComponent setActionIdentifier(Identifier value) { this.actionIdentifier = value; @@ -432,56 +326,243 @@ public class GuidanceResponse extends DomainResource { } /** - * @return {@link #number} (A user-visible number for the action.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + * @return {@link #label} (A user-visible label for the action.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value */ - public StringType getNumberElement() { - if (this.number == null) + public StringType getLabelElement() { + if (this.label == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create GuidanceResponseActionComponent.number"); + throw new Error("Attempt to auto-create GuidanceResponseActionComponent.label"); else if (Configuration.doAutoCreate()) - this.number = new StringType(); // bb - return this.number; + this.label = new StringType(); // bb + return this.label; } - public boolean hasNumberElement() { - return this.number != null && !this.number.isEmpty(); + public boolean hasLabelElement() { + return this.label != null && !this.label.isEmpty(); } - public boolean hasNumber() { - return this.number != null && !this.number.isEmpty(); + public boolean hasLabel() { + return this.label != null && !this.label.isEmpty(); } /** - * @param value {@link #number} (A user-visible number for the action.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + * @param value {@link #label} (A user-visible label for the action.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value */ - public GuidanceResponseActionComponent setNumberElement(StringType value) { - this.number = value; + public GuidanceResponseActionComponent setLabelElement(StringType value) { + this.label = value; return this; } /** - * @return A user-visible number for the action. + * @return A user-visible label for the action. */ - public String getNumber() { - return this.number == null ? null : this.number.getValue(); + public String getLabel() { + return this.label == null ? null : this.label.getValue(); } /** - * @param value A user-visible number for the action. + * @param value A user-visible label for the action. */ - public GuidanceResponseActionComponent setNumber(String value) { + public GuidanceResponseActionComponent setLabel(String value) { if (Utilities.noString(value)) - this.number = null; + this.label = null; else { - if (this.number == null) - this.number = new StringType(); - this.number.setValue(value); + if (this.label == null) + this.label = new StringType(); + this.label.setValue(value); } return this; } /** - * @return {@link #supportingEvidence} (Supporting evidence for the action.) + * @return {@link #title} (The title of the action displayed to a user.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public StringType getTitleElement() { + if (this.title == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponseActionComponent.title"); + else if (Configuration.doAutoCreate()) + this.title = new StringType(); // bb + return this.title; + } + + public boolean hasTitleElement() { + return this.title != null && !this.title.isEmpty(); + } + + public boolean hasTitle() { + return this.title != null && !this.title.isEmpty(); + } + + /** + * @param value {@link #title} (The title of the action displayed to a user.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public GuidanceResponseActionComponent setTitleElement(StringType value) { + this.title = value; + return this; + } + + /** + * @return The title of the action displayed to a user. + */ + public String getTitle() { + return this.title == null ? null : this.title.getValue(); + } + + /** + * @param value The title of the action displayed to a user. + */ + public GuidanceResponseActionComponent setTitle(String value) { + if (Utilities.noString(value)) + this.title = null; + else { + if (this.title == null) + this.title = new StringType(); + this.title.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A short description of the action used to provide a summary to display to the user.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponseActionComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A short description of the action used to provide a summary to display to the user.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public GuidanceResponseActionComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A short description of the action used to provide a summary to display to the user. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A short description of the action used to provide a summary to display to the user. + */ + public GuidanceResponseActionComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #textEquivalent} (A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value + */ + public StringType getTextEquivalentElement() { + if (this.textEquivalent == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponseActionComponent.textEquivalent"); + else if (Configuration.doAutoCreate()) + this.textEquivalent = new StringType(); // bb + return this.textEquivalent; + } + + public boolean hasTextEquivalentElement() { + return this.textEquivalent != null && !this.textEquivalent.isEmpty(); + } + + public boolean hasTextEquivalent() { + return this.textEquivalent != null && !this.textEquivalent.isEmpty(); + } + + /** + * @param value {@link #textEquivalent} (A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value + */ + public GuidanceResponseActionComponent setTextEquivalentElement(StringType value) { + this.textEquivalent = value; + return this; + } + + /** + * @return A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically. + */ + public String getTextEquivalent() { + return this.textEquivalent == null ? null : this.textEquivalent.getValue(); + } + + /** + * @param value A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically. + */ + public GuidanceResponseActionComponent setTextEquivalent(String value) { + if (Utilities.noString(value)) + this.textEquivalent = null; + else { + if (this.textEquivalent == null) + this.textEquivalent = new StringType(); + this.textEquivalent.setValue(value); + } + return this; + } + + /** + * @return {@link #concept} (The concept represented by this action or its sub-actions.) + */ + public List getConcept() { + if (this.concept == null) + this.concept = new ArrayList(); + return this.concept; + } + + public boolean hasConcept() { + if (this.concept == null) + return false; + for (CodeableConcept item : this.concept) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #concept} (The concept represented by this action or its sub-actions.) + */ + // syntactic sugar + public CodeableConcept addConcept() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return t; + } + + // syntactic sugar + public GuidanceResponseActionComponent addConcept(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.concept == null) + this.concept = new ArrayList(); + this.concept.add(t); + return this; + } + + /** + * @return {@link #supportingEvidence} (The evidence grade and the sources of evidence for this action.) */ public List getSupportingEvidence() { if (this.supportingEvidence == null) @@ -499,7 +580,7 @@ public class GuidanceResponse extends DomainResource { } /** - * @return {@link #supportingEvidence} (Supporting evidence for the action.) + * @return {@link #supportingEvidence} (The evidence grade and the sources of evidence for this action.) */ // syntactic sugar public Attachment addSupportingEvidence() { //3 @@ -521,7 +602,31 @@ public class GuidanceResponse extends DomainResource { } /** - * @return {@link #documentation} (Supporting documentation for the action.) + * @return {@link #relatedAction} (A relationship to another action such as "before" or "30-60 minutes after start of".) + */ + public GuidanceResponseActionRelatedActionComponent getRelatedAction() { + if (this.relatedAction == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponseActionComponent.relatedAction"); + else if (Configuration.doAutoCreate()) + this.relatedAction = new GuidanceResponseActionRelatedActionComponent(); // cc + return this.relatedAction; + } + + public boolean hasRelatedAction() { + return this.relatedAction != null && !this.relatedAction.isEmpty(); + } + + /** + * @param value {@link #relatedAction} (A relationship to another action such as "before" or "30-60 minutes after start of".) + */ + public GuidanceResponseActionComponent setRelatedAction(GuidanceResponseActionRelatedActionComponent value) { + this.relatedAction = value; + return this; + } + + /** + * @return {@link #documentation} (Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.) */ public List getDocumentation() { if (this.documentation == null) @@ -539,7 +644,7 @@ public class GuidanceResponse extends DomainResource { } /** - * @return {@link #documentation} (Supporting documentation for the action.) + * @return {@link #documentation} (Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.) */ // syntactic sugar public Attachment addDocumentation() { //3 @@ -609,202 +714,15 @@ public class GuidanceResponse extends DomainResource { return this.participantTarget; } - /** - * @return {@link #title} (The title of the action.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value - */ - public StringType getTitleElement() { - if (this.title == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create GuidanceResponseActionComponent.title"); - else if (Configuration.doAutoCreate()) - this.title = new StringType(); // bb - return this.title; - } - - public boolean hasTitleElement() { - return this.title != null && !this.title.isEmpty(); - } - - public boolean hasTitle() { - return this.title != null && !this.title.isEmpty(); - } - - /** - * @param value {@link #title} (The title of the action.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value - */ - public GuidanceResponseActionComponent setTitleElement(StringType value) { - this.title = value; - return this; - } - - /** - * @return The title of the action. - */ - public String getTitle() { - return this.title == null ? null : this.title.getValue(); - } - - /** - * @param value The title of the action. - */ - public GuidanceResponseActionComponent setTitle(String value) { - if (Utilities.noString(value)) - this.title = null; - else { - if (this.title == null) - this.title = new StringType(); - this.title.setValue(value); - } - return this; - } - - /** - * @return {@link #description} (A short description of the action.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public StringType getDescriptionElement() { - if (this.description == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create GuidanceResponseActionComponent.description"); - else if (Configuration.doAutoCreate()) - this.description = new StringType(); // bb - return this.description; - } - - public boolean hasDescriptionElement() { - return this.description != null && !this.description.isEmpty(); - } - - public boolean hasDescription() { - return this.description != null && !this.description.isEmpty(); - } - - /** - * @param value {@link #description} (A short description of the action.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public GuidanceResponseActionComponent setDescriptionElement(StringType value) { - this.description = value; - return this; - } - - /** - * @return A short description of the action. - */ - public String getDescription() { - return this.description == null ? null : this.description.getValue(); - } - - /** - * @param value A short description of the action. - */ - public GuidanceResponseActionComponent setDescription(String value) { - if (Utilities.noString(value)) - this.description = null; - else { - if (this.description == null) - this.description = new StringType(); - this.description.setValue(value); - } - return this; - } - - /** - * @return {@link #textEquivalent} (A text equivalent of the action to be performed.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value - */ - public StringType getTextEquivalentElement() { - if (this.textEquivalent == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create GuidanceResponseActionComponent.textEquivalent"); - else if (Configuration.doAutoCreate()) - this.textEquivalent = new StringType(); // bb - return this.textEquivalent; - } - - public boolean hasTextEquivalentElement() { - return this.textEquivalent != null && !this.textEquivalent.isEmpty(); - } - - public boolean hasTextEquivalent() { - return this.textEquivalent != null && !this.textEquivalent.isEmpty(); - } - - /** - * @param value {@link #textEquivalent} (A text equivalent of the action to be performed.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value - */ - public GuidanceResponseActionComponent setTextEquivalentElement(StringType value) { - this.textEquivalent = value; - return this; - } - - /** - * @return A text equivalent of the action to be performed. - */ - public String getTextEquivalent() { - return this.textEquivalent == null ? null : this.textEquivalent.getValue(); - } - - /** - * @param value A text equivalent of the action to be performed. - */ - public GuidanceResponseActionComponent setTextEquivalent(String value) { - if (Utilities.noString(value)) - this.textEquivalent = null; - else { - if (this.textEquivalent == null) - this.textEquivalent = new StringType(); - this.textEquivalent.setValue(value); - } - return this; - } - - /** - * @return {@link #concept} (Concepts associated with the action.) - */ - public List getConcept() { - if (this.concept == null) - this.concept = new ArrayList(); - return this.concept; - } - - public boolean hasConcept() { - if (this.concept == null) - return false; - for (CodeableConcept item : this.concept) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #concept} (Concepts associated with the action.) - */ - // syntactic sugar - public CodeableConcept addConcept() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.concept == null) - this.concept = new ArrayList(); - this.concept.add(t); - return t; - } - - // syntactic sugar - public GuidanceResponseActionComponent addConcept(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.concept == null) - this.concept = new ArrayList(); - this.concept.add(t); - return this; - } - /** * @return {@link #type} (The type of action to perform (create, update, remove).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value */ - public Enumeration getTypeElement() { + public CodeType getTypeElement() { if (this.type == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create GuidanceResponseActionComponent.type"); else if (Configuration.doAutoCreate()) - this.type = new Enumeration(new GuidanceResponseActionTypeEnumFactory()); // bb + this.type = new CodeType(); // bb return this.type; } @@ -819,7 +737,7 @@ public class GuidanceResponse extends DomainResource { /** * @param value {@link #type} (The type of action to perform (create, update, remove).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value */ - public GuidanceResponseActionComponent setTypeElement(Enumeration value) { + public GuidanceResponseActionComponent setTypeElement(CodeType value) { this.type = value; return this; } @@ -827,24 +745,64 @@ public class GuidanceResponse extends DomainResource { /** * @return The type of action to perform (create, update, remove). */ - public GuidanceResponseActionType getType() { + public String getType() { return this.type == null ? null : this.type.getValue(); } /** * @param value The type of action to perform (create, update, remove). */ - public GuidanceResponseActionComponent setType(GuidanceResponseActionType value) { - if (value == null) + public GuidanceResponseActionComponent setType(String value) { + if (Utilities.noString(value)) this.type = null; else { if (this.type == null) - this.type = new Enumeration(new GuidanceResponseActionTypeEnumFactory()); + this.type = new CodeType(); this.type.setValue(value); } return this; } + /** + * @return {@link #behavior} (A behavior associated with the action. Behaviors define how the action is to be presented and/or executed within the receiving environment.) + */ + public List getBehavior() { + if (this.behavior == null) + this.behavior = new ArrayList(); + return this.behavior; + } + + public boolean hasBehavior() { + if (this.behavior == null) + return false; + for (GuidanceResponseActionBehaviorComponent item : this.behavior) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #behavior} (A behavior associated with the action. Behaviors define how the action is to be presented and/or executed within the receiving environment.) + */ + // syntactic sugar + public GuidanceResponseActionBehaviorComponent addBehavior() { //3 + GuidanceResponseActionBehaviorComponent t = new GuidanceResponseActionBehaviorComponent(); + if (this.behavior == null) + this.behavior = new ArrayList(); + this.behavior.add(t); + return t; + } + + // syntactic sugar + public GuidanceResponseActionComponent addBehavior(GuidanceResponseActionBehaviorComponent t) { //3 + if (t == null) + return this; + if (this.behavior == null) + this.behavior = new ArrayList(); + this.behavior.add(t); + return this; + } + /** * @return {@link #resource} (The resource that is the target of the action (e.g. CommunicationRequest).) */ @@ -885,73 +843,69 @@ public class GuidanceResponse extends DomainResource { } /** - * @return {@link #actions} (Sub actions.) + * @return {@link #action} (Sub actions.) */ - public List getActions() { - if (this.actions == null) - this.actions = new ArrayList(); - return this.actions; + public List getAction() { + if (this.action == null) + this.action = new ArrayList(); + return this.action; } - public boolean hasActions() { - if (this.actions == null) + public boolean hasAction() { + if (this.action == null) return false; - for (GuidanceResponseActionComponent item : this.actions) + for (GuidanceResponseActionComponent item : this.action) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #actions} (Sub actions.) + * @return {@link #action} (Sub actions.) */ // syntactic sugar - public GuidanceResponseActionComponent addActions() { //3 + public GuidanceResponseActionComponent addAction() { //3 GuidanceResponseActionComponent t = new GuidanceResponseActionComponent(); - if (this.actions == null) - this.actions = new ArrayList(); - this.actions.add(t); + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); return t; } // syntactic sugar - public GuidanceResponseActionComponent addActions(GuidanceResponseActionComponent t) { //3 + public GuidanceResponseActionComponent addAction(GuidanceResponseActionComponent t) { //3 if (t == null) return this; - if (this.actions == null) - this.actions = new ArrayList(); - this.actions.add(t); + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); return this; } protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("actionIdentifier", "Identifier", "A unique identifier for the action.", 0, java.lang.Integer.MAX_VALUE, actionIdentifier)); - childrenList.add(new Property("number", "string", "A user-visible number for the action.", 0, java.lang.Integer.MAX_VALUE, number)); - childrenList.add(new Property("supportingEvidence", "Attachment", "Supporting evidence for the action.", 0, java.lang.Integer.MAX_VALUE, supportingEvidence)); - childrenList.add(new Property("documentation", "Attachment", "Supporting documentation for the action.", 0, java.lang.Integer.MAX_VALUE, documentation)); + childrenList.add(new Property("actionIdentifier", "Identifier", "A unique identifier for the action. The identifier SHALL be unique within the container in which it appears, and MAY be universally unique.", 0, java.lang.Integer.MAX_VALUE, actionIdentifier)); + childrenList.add(new Property("label", "string", "A user-visible label for the action.", 0, java.lang.Integer.MAX_VALUE, label)); + childrenList.add(new Property("title", "string", "The title of the action displayed to a user.", 0, java.lang.Integer.MAX_VALUE, title)); + childrenList.add(new Property("description", "string", "A short description of the action used to provide a summary to display to the user.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("textEquivalent", "string", "A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.", 0, java.lang.Integer.MAX_VALUE, textEquivalent)); + childrenList.add(new Property("concept", "CodeableConcept", "The concept represented by this action or its sub-actions.", 0, java.lang.Integer.MAX_VALUE, concept)); + childrenList.add(new Property("supportingEvidence", "Attachment", "The evidence grade and the sources of evidence for this action.", 0, java.lang.Integer.MAX_VALUE, supportingEvidence)); + childrenList.add(new Property("relatedAction", "", "A relationship to another action such as \"before\" or \"30-60 minutes after start of\".", 0, java.lang.Integer.MAX_VALUE, relatedAction)); + childrenList.add(new Property("documentation", "Attachment", "Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.", 0, java.lang.Integer.MAX_VALUE, documentation)); childrenList.add(new Property("participant", "Reference(Patient|Person|Practitioner|RelatedPerson)", "The participant in the action.", 0, java.lang.Integer.MAX_VALUE, participant)); - childrenList.add(new Property("title", "string", "The title of the action.", 0, java.lang.Integer.MAX_VALUE, title)); - childrenList.add(new Property("description", "string", "A short description of the action.", 0, java.lang.Integer.MAX_VALUE, description)); - childrenList.add(new Property("textEquivalent", "string", "A text equivalent of the action to be performed.", 0, java.lang.Integer.MAX_VALUE, textEquivalent)); - childrenList.add(new Property("concept", "CodeableConcept", "Concepts associated with the action.", 0, java.lang.Integer.MAX_VALUE, concept)); childrenList.add(new Property("type", "code", "The type of action to perform (create, update, remove).", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("behavior", "", "A behavior associated with the action. Behaviors define how the action is to be presented and/or executed within the receiving environment.", 0, java.lang.Integer.MAX_VALUE, behavior)); childrenList.add(new Property("resource", "Reference(Any)", "The resource that is the target of the action (e.g. CommunicationRequest).", 0, java.lang.Integer.MAX_VALUE, resource)); - childrenList.add(new Property("actions", "@GuidanceResponse.action", "Sub actions.", 0, java.lang.Integer.MAX_VALUE, actions)); + childrenList.add(new Property("action", "@GuidanceResponse.action", "Sub actions.", 0, java.lang.Integer.MAX_VALUE, action)); } @Override public void setProperty(String name, Base value) throws FHIRException { if (name.equals("actionIdentifier")) this.actionIdentifier = castToIdentifier(value); // Identifier - else if (name.equals("number")) - this.number = castToString(value); // StringType - else if (name.equals("supportingEvidence")) - this.getSupportingEvidence().add(castToAttachment(value)); - else if (name.equals("documentation")) - this.getDocumentation().add(castToAttachment(value)); - else if (name.equals("participant")) - this.getParticipant().add(castToReference(value)); + else if (name.equals("label")) + this.label = castToString(value); // StringType else if (name.equals("title")) this.title = castToString(value); // StringType else if (name.equals("description")) @@ -960,12 +914,22 @@ public class GuidanceResponse extends DomainResource { this.textEquivalent = castToString(value); // StringType else if (name.equals("concept")) this.getConcept().add(castToCodeableConcept(value)); + else if (name.equals("supportingEvidence")) + this.getSupportingEvidence().add(castToAttachment(value)); + else if (name.equals("relatedAction")) + this.relatedAction = (GuidanceResponseActionRelatedActionComponent) value; // GuidanceResponseActionRelatedActionComponent + else if (name.equals("documentation")) + this.getDocumentation().add(castToAttachment(value)); + else if (name.equals("participant")) + this.getParticipant().add(castToReference(value)); else if (name.equals("type")) - this.type = new GuidanceResponseActionTypeEnumFactory().fromType(value); // Enumeration + this.type = castToCode(value); // CodeType + else if (name.equals("behavior")) + this.getBehavior().add((GuidanceResponseActionBehaviorComponent) value); else if (name.equals("resource")) this.resource = castToReference(value); // Reference - else if (name.equals("actions")) - this.getActions().add((GuidanceResponseActionComponent) value); + else if (name.equals("action")) + this.getAction().add((GuidanceResponseActionComponent) value); else super.setProperty(name, value); } @@ -976,17 +940,8 @@ public class GuidanceResponse extends DomainResource { this.actionIdentifier = new Identifier(); return this.actionIdentifier; } - else if (name.equals("number")) { - throw new FHIRException("Cannot call addChild on a primitive type GuidanceResponse.number"); - } - else if (name.equals("supportingEvidence")) { - return addSupportingEvidence(); - } - else if (name.equals("documentation")) { - return addDocumentation(); - } - else if (name.equals("participant")) { - return addParticipant(); + else if (name.equals("label")) { + throw new FHIRException("Cannot call addChild on a primitive type GuidanceResponse.label"); } else if (name.equals("title")) { throw new FHIRException("Cannot call addChild on a primitive type GuidanceResponse.title"); @@ -1000,15 +955,31 @@ public class GuidanceResponse extends DomainResource { else if (name.equals("concept")) { return addConcept(); } + else if (name.equals("supportingEvidence")) { + return addSupportingEvidence(); + } + else if (name.equals("relatedAction")) { + this.relatedAction = new GuidanceResponseActionRelatedActionComponent(); + return this.relatedAction; + } + else if (name.equals("documentation")) { + return addDocumentation(); + } + else if (name.equals("participant")) { + return addParticipant(); + } else if (name.equals("type")) { throw new FHIRException("Cannot call addChild on a primitive type GuidanceResponse.type"); } + else if (name.equals("behavior")) { + return addBehavior(); + } else if (name.equals("resource")) { this.resource = new Reference(); return this.resource; } - else if (name.equals("actions")) { - return addActions(); + else if (name.equals("action")) { + return addAction(); } else return super.addChild(name); @@ -1018,12 +989,21 @@ public class GuidanceResponse extends DomainResource { GuidanceResponseActionComponent dst = new GuidanceResponseActionComponent(); copyValues(dst); dst.actionIdentifier = actionIdentifier == null ? null : actionIdentifier.copy(); - dst.number = number == null ? null : number.copy(); + dst.label = label == null ? null : label.copy(); + dst.title = title == null ? null : title.copy(); + dst.description = description == null ? null : description.copy(); + dst.textEquivalent = textEquivalent == null ? null : textEquivalent.copy(); + if (concept != null) { + dst.concept = new ArrayList(); + for (CodeableConcept i : concept) + dst.concept.add(i.copy()); + }; if (supportingEvidence != null) { dst.supportingEvidence = new ArrayList(); for (Attachment i : supportingEvidence) dst.supportingEvidence.add(i.copy()); }; + dst.relatedAction = relatedAction == null ? null : relatedAction.copy(); if (documentation != null) { dst.documentation = new ArrayList(); for (Attachment i : documentation) @@ -1034,20 +1014,17 @@ public class GuidanceResponse extends DomainResource { for (Reference i : participant) dst.participant.add(i.copy()); }; - dst.title = title == null ? null : title.copy(); - dst.description = description == null ? null : description.copy(); - dst.textEquivalent = textEquivalent == null ? null : textEquivalent.copy(); - if (concept != null) { - dst.concept = new ArrayList(); - for (CodeableConcept i : concept) - dst.concept.add(i.copy()); - }; dst.type = type == null ? null : type.copy(); + if (behavior != null) { + dst.behavior = new ArrayList(); + for (GuidanceResponseActionBehaviorComponent i : behavior) + dst.behavior.add(i.copy()); + }; dst.resource = resource == null ? null : resource.copy(); - if (actions != null) { - dst.actions = new ArrayList(); - for (GuidanceResponseActionComponent i : actions) - dst.actions.add(i.copy()); + if (action != null) { + dst.action = new ArrayList(); + for (GuidanceResponseActionComponent i : action) + dst.action.add(i.copy()); }; return dst; } @@ -1059,12 +1036,12 @@ public class GuidanceResponse extends DomainResource { if (!(other instanceof GuidanceResponseActionComponent)) return false; GuidanceResponseActionComponent o = (GuidanceResponseActionComponent) other; - return compareDeep(actionIdentifier, o.actionIdentifier, true) && compareDeep(number, o.number, true) - && compareDeep(supportingEvidence, o.supportingEvidence, true) && compareDeep(documentation, o.documentation, true) - && compareDeep(participant, o.participant, true) && compareDeep(title, o.title, true) && compareDeep(description, o.description, true) - && compareDeep(textEquivalent, o.textEquivalent, true) && compareDeep(concept, o.concept, true) - && compareDeep(type, o.type, true) && compareDeep(resource, o.resource, true) && compareDeep(actions, o.actions, true) - ; + return compareDeep(actionIdentifier, o.actionIdentifier, true) && compareDeep(label, o.label, true) + && compareDeep(title, o.title, true) && compareDeep(description, o.description, true) && compareDeep(textEquivalent, o.textEquivalent, true) + && compareDeep(concept, o.concept, true) && compareDeep(supportingEvidence, o.supportingEvidence, true) + && compareDeep(relatedAction, o.relatedAction, true) && compareDeep(documentation, o.documentation, true) + && compareDeep(participant, o.participant, true) && compareDeep(type, o.type, true) && compareDeep(behavior, o.behavior, true) + && compareDeep(resource, o.resource, true) && compareDeep(action, o.action, true); } @Override @@ -1074,17 +1051,14 @@ public class GuidanceResponse extends DomainResource { if (!(other instanceof GuidanceResponseActionComponent)) return false; GuidanceResponseActionComponent o = (GuidanceResponseActionComponent) other; - return compareValues(number, o.number, true) && compareValues(title, o.title, true) && compareValues(description, o.description, true) + return compareValues(label, o.label, true) && compareValues(title, o.title, true) && compareValues(description, o.description, true) && compareValues(textEquivalent, o.textEquivalent, true) && compareValues(type, o.type, true); } public boolean isEmpty() { - return super.isEmpty() && (actionIdentifier == null || actionIdentifier.isEmpty()) && (number == null || number.isEmpty()) - && (supportingEvidence == null || supportingEvidence.isEmpty()) && (documentation == null || documentation.isEmpty()) - && (participant == null || participant.isEmpty()) && (title == null || title.isEmpty()) && (description == null || description.isEmpty()) - && (textEquivalent == null || textEquivalent.isEmpty()) && (concept == null || concept.isEmpty()) - && (type == null || type.isEmpty()) && (resource == null || resource.isEmpty()) && (actions == null || actions.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( actionIdentifier, label, title + , description, textEquivalent, concept, supportingEvidence, relatedAction, documentation + , participant, type, behavior, resource, action); } public String fhirType() { @@ -1094,22 +1068,473 @@ public class GuidanceResponse extends DomainResource { } + @Block() + public static class GuidanceResponseActionRelatedActionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The unique identifier of the related action. + */ + @Child(name = "actionIdentifier", type = {Identifier.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Identifier of the related action", formalDefinition="The unique identifier of the related action." ) + protected Identifier actionIdentifier; + + /** + * The relationship of this action to the related action. + */ + @Child(name = "relationship", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="before | after", formalDefinition="The relationship of this action to the related action." ) + protected CodeType relationship; + + /** + * A duration or range of durations to apply to the relationship. For example, 30-60 minutes before. + */ + @Child(name = "offset", type = {Duration.class, Range.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Time offset for the relationship", formalDefinition="A duration or range of durations to apply to the relationship. For example, 30-60 minutes before." ) + protected Type offset; + + /** + * An optional indicator for how the relationship is anchored to the related action. For example "before the start" or "before the end" of the related action. + */ + @Child(name = "anchor", type = {CodeType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="start | end", formalDefinition="An optional indicator for how the relationship is anchored to the related action. For example \"before the start\" or \"before the end\" of the related action." ) + protected CodeType anchor; + + private static final long serialVersionUID = -1200619014L; + /** - * The id of the request associated with this response. If an id was provided as part of the request, it will be provided here to enable the requester to more easily identify the response in a multi-request scenario. + * Constructor + */ + public GuidanceResponseActionRelatedActionComponent() { + super(); + } + + /** + * Constructor + */ + public GuidanceResponseActionRelatedActionComponent(Identifier actionIdentifier, CodeType relationship) { + super(); + this.actionIdentifier = actionIdentifier; + this.relationship = relationship; + } + + /** + * @return {@link #actionIdentifier} (The unique identifier of the related action.) + */ + public Identifier getActionIdentifier() { + if (this.actionIdentifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponseActionRelatedActionComponent.actionIdentifier"); + else if (Configuration.doAutoCreate()) + this.actionIdentifier = new Identifier(); // cc + return this.actionIdentifier; + } + + public boolean hasActionIdentifier() { + return this.actionIdentifier != null && !this.actionIdentifier.isEmpty(); + } + + /** + * @param value {@link #actionIdentifier} (The unique identifier of the related action.) + */ + public GuidanceResponseActionRelatedActionComponent setActionIdentifier(Identifier value) { + this.actionIdentifier = value; + return this; + } + + /** + * @return {@link #relationship} (The relationship of this action to the related action.). This is the underlying object with id, value and extensions. The accessor "getRelationship" gives direct access to the value + */ + public CodeType getRelationshipElement() { + if (this.relationship == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponseActionRelatedActionComponent.relationship"); + else if (Configuration.doAutoCreate()) + this.relationship = new CodeType(); // bb + return this.relationship; + } + + public boolean hasRelationshipElement() { + return this.relationship != null && !this.relationship.isEmpty(); + } + + public boolean hasRelationship() { + return this.relationship != null && !this.relationship.isEmpty(); + } + + /** + * @param value {@link #relationship} (The relationship of this action to the related action.). This is the underlying object with id, value and extensions. The accessor "getRelationship" gives direct access to the value + */ + public GuidanceResponseActionRelatedActionComponent setRelationshipElement(CodeType value) { + this.relationship = value; + return this; + } + + /** + * @return The relationship of this action to the related action. + */ + public String getRelationship() { + return this.relationship == null ? null : this.relationship.getValue(); + } + + /** + * @param value The relationship of this action to the related action. + */ + public GuidanceResponseActionRelatedActionComponent setRelationship(String value) { + if (this.relationship == null) + this.relationship = new CodeType(); + this.relationship.setValue(value); + return this; + } + + /** + * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) + */ + public Type getOffset() { + return this.offset; + } + + /** + * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) + */ + public Duration getOffsetDuration() throws FHIRException { + if (!(this.offset instanceof Duration)) + throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.offset.getClass().getName()+" was encountered"); + return (Duration) this.offset; + } + + public boolean hasOffsetDuration() { + return this.offset instanceof Duration; + } + + /** + * @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) + */ + public Range getOffsetRange() throws FHIRException { + if (!(this.offset instanceof Range)) + throw new FHIRException("Type mismatch: the type Range was expected, but "+this.offset.getClass().getName()+" was encountered"); + return (Range) this.offset; + } + + public boolean hasOffsetRange() { + return this.offset instanceof Range; + } + + public boolean hasOffset() { + return this.offset != null && !this.offset.isEmpty(); + } + + /** + * @param value {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) + */ + public GuidanceResponseActionRelatedActionComponent setOffset(Type value) { + this.offset = value; + return this; + } + + /** + * @return {@link #anchor} (An optional indicator for how the relationship is anchored to the related action. For example "before the start" or "before the end" of the related action.). This is the underlying object with id, value and extensions. The accessor "getAnchor" gives direct access to the value + */ + public CodeType getAnchorElement() { + if (this.anchor == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponseActionRelatedActionComponent.anchor"); + else if (Configuration.doAutoCreate()) + this.anchor = new CodeType(); // bb + return this.anchor; + } + + public boolean hasAnchorElement() { + return this.anchor != null && !this.anchor.isEmpty(); + } + + public boolean hasAnchor() { + return this.anchor != null && !this.anchor.isEmpty(); + } + + /** + * @param value {@link #anchor} (An optional indicator for how the relationship is anchored to the related action. For example "before the start" or "before the end" of the related action.). This is the underlying object with id, value and extensions. The accessor "getAnchor" gives direct access to the value + */ + public GuidanceResponseActionRelatedActionComponent setAnchorElement(CodeType value) { + this.anchor = value; + return this; + } + + /** + * @return An optional indicator for how the relationship is anchored to the related action. For example "before the start" or "before the end" of the related action. + */ + public String getAnchor() { + return this.anchor == null ? null : this.anchor.getValue(); + } + + /** + * @param value An optional indicator for how the relationship is anchored to the related action. For example "before the start" or "before the end" of the related action. + */ + public GuidanceResponseActionRelatedActionComponent setAnchor(String value) { + if (Utilities.noString(value)) + this.anchor = null; + else { + if (this.anchor == null) + this.anchor = new CodeType(); + this.anchor.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("actionIdentifier", "Identifier", "The unique identifier of the related action.", 0, java.lang.Integer.MAX_VALUE, actionIdentifier)); + childrenList.add(new Property("relationship", "code", "The relationship of this action to the related action.", 0, java.lang.Integer.MAX_VALUE, relationship)); + childrenList.add(new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, java.lang.Integer.MAX_VALUE, offset)); + childrenList.add(new Property("anchor", "code", "An optional indicator for how the relationship is anchored to the related action. For example \"before the start\" or \"before the end\" of the related action.", 0, java.lang.Integer.MAX_VALUE, anchor)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("actionIdentifier")) + this.actionIdentifier = castToIdentifier(value); // Identifier + else if (name.equals("relationship")) + this.relationship = castToCode(value); // CodeType + else if (name.equals("offset[x]")) + this.offset = (Type) value; // Type + else if (name.equals("anchor")) + this.anchor = castToCode(value); // CodeType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("actionIdentifier")) { + this.actionIdentifier = new Identifier(); + return this.actionIdentifier; + } + else if (name.equals("relationship")) { + throw new FHIRException("Cannot call addChild on a primitive type GuidanceResponse.relationship"); + } + else if (name.equals("offsetDuration")) { + this.offset = new Duration(); + return this.offset; + } + else if (name.equals("offsetRange")) { + this.offset = new Range(); + return this.offset; + } + else if (name.equals("anchor")) { + throw new FHIRException("Cannot call addChild on a primitive type GuidanceResponse.anchor"); + } + else + return super.addChild(name); + } + + public GuidanceResponseActionRelatedActionComponent copy() { + GuidanceResponseActionRelatedActionComponent dst = new GuidanceResponseActionRelatedActionComponent(); + copyValues(dst); + dst.actionIdentifier = actionIdentifier == null ? null : actionIdentifier.copy(); + dst.relationship = relationship == null ? null : relationship.copy(); + dst.offset = offset == null ? null : offset.copy(); + dst.anchor = anchor == null ? null : anchor.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof GuidanceResponseActionRelatedActionComponent)) + return false; + GuidanceResponseActionRelatedActionComponent o = (GuidanceResponseActionRelatedActionComponent) other; + return compareDeep(actionIdentifier, o.actionIdentifier, true) && compareDeep(relationship, o.relationship, true) + && compareDeep(offset, o.offset, true) && compareDeep(anchor, o.anchor, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof GuidanceResponseActionRelatedActionComponent)) + return false; + GuidanceResponseActionRelatedActionComponent o = (GuidanceResponseActionRelatedActionComponent) other; + return compareValues(relationship, o.relationship, true) && compareValues(anchor, o.anchor, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( actionIdentifier, relationship + , offset, anchor); + } + + public String fhirType() { + return "GuidanceResponse.action.relatedAction"; + + } + + } + + @Block() + public static class GuidanceResponseActionBehaviorComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The type of the behavior to be described, such as grouping, visual, or selection behaviors. + */ + @Child(name = "type", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The type of behavior (grouping, precheck, selection, cardinality, etc)", formalDefinition="The type of the behavior to be described, such as grouping, visual, or selection behaviors." ) + protected Coding type; + + /** + * The specific behavior. The code used here is determined by the type of behavior being described. For example, the grouping behavior uses the grouping-behavior-type valueset. + */ + @Child(name = "value", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Specific behavior (e.g. required, at-most-one, single, etc)", formalDefinition="The specific behavior. The code used here is determined by the type of behavior being described. For example, the grouping behavior uses the grouping-behavior-type valueset." ) + protected Coding value; + + private static final long serialVersionUID = -1054119695L; + + /** + * Constructor + */ + public GuidanceResponseActionBehaviorComponent() { + super(); + } + + /** + * Constructor + */ + public GuidanceResponseActionBehaviorComponent(Coding type, Coding value) { + super(); + this.type = type; + this.value = value; + } + + /** + * @return {@link #type} (The type of the behavior to be described, such as grouping, visual, or selection behaviors.) + */ + public Coding getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponseActionBehaviorComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Coding(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of the behavior to be described, such as grouping, visual, or selection behaviors.) + */ + public GuidanceResponseActionBehaviorComponent setType(Coding value) { + this.type = value; + return this; + } + + /** + * @return {@link #value} (The specific behavior. The code used here is determined by the type of behavior being described. For example, the grouping behavior uses the grouping-behavior-type valueset.) + */ + public Coding getValue() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create GuidanceResponseActionBehaviorComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new Coding(); // cc + return this.value; + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The specific behavior. The code used here is determined by the type of behavior being described. For example, the grouping behavior uses the grouping-behavior-type valueset.) + */ + public GuidanceResponseActionBehaviorComponent setValue(Coding value) { + this.value = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "Coding", "The type of the behavior to be described, such as grouping, visual, or selection behaviors.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("value", "Coding", "The specific behavior. The code used here is determined by the type of behavior being described. For example, the grouping behavior uses the grouping-behavior-type valueset.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCoding(value); // Coding + else if (name.equals("value")) + this.value = castToCoding(value); // Coding + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + this.type = new Coding(); + return this.type; + } + else if (name.equals("value")) { + this.value = new Coding(); + return this.value; + } + else + return super.addChild(name); + } + + public GuidanceResponseActionBehaviorComponent copy() { + GuidanceResponseActionBehaviorComponent dst = new GuidanceResponseActionBehaviorComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof GuidanceResponseActionBehaviorComponent)) + return false; + GuidanceResponseActionBehaviorComponent o = (GuidanceResponseActionBehaviorComponent) other; + return compareDeep(type, o.type, true) && compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof GuidanceResponseActionBehaviorComponent)) + return false; + GuidanceResponseActionBehaviorComponent o = (GuidanceResponseActionBehaviorComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, value); + } + + public String fhirType() { + return "GuidanceResponse.action.behavior"; + + } + + } + + /** + * The id of the request associated with this response. If an id was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario. */ @Child(name = "requestId", type = {StringType.class}, order=0, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The id of the request associated with this response, if any", formalDefinition="The id of the request associated with this response. If an id was provided as part of the request, it will be provided here to enable the requester to more easily identify the response in a multi-request scenario." ) + @Description(shortDefinition="The id of the request associated with this response, if any", formalDefinition="The id of the request associated with this response. If an id was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario." ) protected StringType requestId; /** - * A reference to a knowledge module involved in an interaction. + * A reference to the knowledge module that was invoked. */ @Child(name = "module", type = {DecisionSupportServiceModule.class, DecisionSupportRule.class}, order=1, min=1, max=1, modifier=true, summary=true) - @Description(shortDefinition="A reference to a knowledge module", formalDefinition="A reference to a knowledge module involved in an interaction." ) + @Description(shortDefinition="A reference to a knowledge module", formalDefinition="A reference to the knowledge module that was invoked." ) protected Reference module; /** - * The actual object that is the target of the reference (A reference to a knowledge module involved in an interaction.) + * The actual object that is the target of the reference (A reference to the knowledge module that was invoked.) */ protected Resource moduleTarget; @@ -1148,10 +1573,17 @@ public class GuidanceResponse extends DomainResource { * The actions, if any, produced by the evaluation of the artifact. */ @Child(name = "action", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The actions, if any, produced by the evaluation of the artifact." ) + @Description(shortDefinition="Proposed actions, if any", formalDefinition="The actions, if any, produced by the evaluation of the artifact." ) protected List action; - private static final long serialVersionUID = -2105369308L; + /** + * If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data. + */ + @Child(name = "dataRequirement", type = {DataRequirement.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Additional required data", formalDefinition="If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data." ) + protected List dataRequirement; + + private static final long serialVersionUID = -918912174L; /** * Constructor @@ -1170,7 +1602,7 @@ public class GuidanceResponse extends DomainResource { } /** - * @return {@link #requestId} (The id of the request associated with this response. If an id was provided as part of the request, it will be provided here to enable the requester to more easily identify the response in a multi-request scenario.). This is the underlying object with id, value and extensions. The accessor "getRequestId" gives direct access to the value + * @return {@link #requestId} (The id of the request associated with this response. If an id was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.). This is the underlying object with id, value and extensions. The accessor "getRequestId" gives direct access to the value */ public StringType getRequestIdElement() { if (this.requestId == null) @@ -1190,7 +1622,7 @@ public class GuidanceResponse extends DomainResource { } /** - * @param value {@link #requestId} (The id of the request associated with this response. If an id was provided as part of the request, it will be provided here to enable the requester to more easily identify the response in a multi-request scenario.). This is the underlying object with id, value and extensions. The accessor "getRequestId" gives direct access to the value + * @param value {@link #requestId} (The id of the request associated with this response. If an id was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.). This is the underlying object with id, value and extensions. The accessor "getRequestId" gives direct access to the value */ public GuidanceResponse setRequestIdElement(StringType value) { this.requestId = value; @@ -1198,14 +1630,14 @@ public class GuidanceResponse extends DomainResource { } /** - * @return The id of the request associated with this response. If an id was provided as part of the request, it will be provided here to enable the requester to more easily identify the response in a multi-request scenario. + * @return The id of the request associated with this response. If an id was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario. */ public String getRequestId() { return this.requestId == null ? null : this.requestId.getValue(); } /** - * @param value The id of the request associated with this response. If an id was provided as part of the request, it will be provided here to enable the requester to more easily identify the response in a multi-request scenario. + * @param value The id of the request associated with this response. If an id was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario. */ public GuidanceResponse setRequestId(String value) { if (Utilities.noString(value)) @@ -1219,7 +1651,7 @@ public class GuidanceResponse extends DomainResource { } /** - * @return {@link #module} (A reference to a knowledge module involved in an interaction.) + * @return {@link #module} (A reference to the knowledge module that was invoked.) */ public Reference getModule() { if (this.module == null) @@ -1235,7 +1667,7 @@ public class GuidanceResponse extends DomainResource { } /** - * @param value {@link #module} (A reference to a knowledge module involved in an interaction.) + * @param value {@link #module} (A reference to the knowledge module that was invoked.) */ public GuidanceResponse setModule(Reference value) { this.module = value; @@ -1243,14 +1675,14 @@ public class GuidanceResponse extends DomainResource { } /** - * @return {@link #module} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a knowledge module involved in an interaction.) + * @return {@link #module} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to the knowledge module that was invoked.) */ public Resource getModuleTarget() { return this.moduleTarget; } /** - * @param value {@link #module} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a knowledge module involved in an interaction.) + * @param value {@link #module} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to the knowledge module that was invoked.) */ public GuidanceResponse setModuleTarget(Resource value) { this.moduleTarget = value; @@ -1447,14 +1879,55 @@ public class GuidanceResponse extends DomainResource { return this; } + /** + * @return {@link #dataRequirement} (If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.) + */ + public List getDataRequirement() { + if (this.dataRequirement == null) + this.dataRequirement = new ArrayList(); + return this.dataRequirement; + } + + public boolean hasDataRequirement() { + if (this.dataRequirement == null) + return false; + for (DataRequirement item : this.dataRequirement) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dataRequirement} (If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.) + */ + // syntactic sugar + public DataRequirement addDataRequirement() { //3 + DataRequirement t = new DataRequirement(); + if (this.dataRequirement == null) + this.dataRequirement = new ArrayList(); + this.dataRequirement.add(t); + return t; + } + + // syntactic sugar + public GuidanceResponse addDataRequirement(DataRequirement t) { //3 + if (t == null) + return this; + if (this.dataRequirement == null) + this.dataRequirement = new ArrayList(); + this.dataRequirement.add(t); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("requestId", "string", "The id of the request associated with this response. If an id was provided as part of the request, it will be provided here to enable the requester to more easily identify the response in a multi-request scenario.", 0, java.lang.Integer.MAX_VALUE, requestId)); - childrenList.add(new Property("module", "Reference(DecisionSupportServiceModule|DecisionSupportRule)", "A reference to a knowledge module involved in an interaction.", 0, java.lang.Integer.MAX_VALUE, module)); + childrenList.add(new Property("requestId", "string", "The id of the request associated with this response. If an id was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.", 0, java.lang.Integer.MAX_VALUE, requestId)); + childrenList.add(new Property("module", "Reference(DecisionSupportServiceModule|DecisionSupportRule)", "A reference to the knowledge module that was invoked.", 0, java.lang.Integer.MAX_VALUE, module)); childrenList.add(new Property("status", "code", "The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("evaluationMessage", "Reference(OperationOutcome)", "Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.", 0, java.lang.Integer.MAX_VALUE, evaluationMessage)); childrenList.add(new Property("outputParameters", "Reference(Parameters)", "The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.", 0, java.lang.Integer.MAX_VALUE, outputParameters)); childrenList.add(new Property("action", "", "The actions, if any, produced by the evaluation of the artifact.", 0, java.lang.Integer.MAX_VALUE, action)); + childrenList.add(new Property("dataRequirement", "DataRequirement", "If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.", 0, java.lang.Integer.MAX_VALUE, dataRequirement)); } @Override @@ -1471,6 +1944,8 @@ public class GuidanceResponse extends DomainResource { this.outputParameters = castToReference(value); // Reference else if (name.equals("action")) this.getAction().add((GuidanceResponseActionComponent) value); + else if (name.equals("dataRequirement")) + this.getDataRequirement().add(castToDataRequirement(value)); else super.setProperty(name, value); } @@ -1497,6 +1972,9 @@ public class GuidanceResponse extends DomainResource { else if (name.equals("action")) { return addAction(); } + else if (name.equals("dataRequirement")) { + return addDataRequirement(); + } else return super.addChild(name); } @@ -1523,6 +2001,11 @@ public class GuidanceResponse extends DomainResource { for (GuidanceResponseActionComponent i : action) dst.action.add(i.copy()); }; + if (dataRequirement != null) { + dst.dataRequirement = new ArrayList(); + for (DataRequirement i : dataRequirement) + dst.dataRequirement.add(i.copy()); + }; return dst; } @@ -1539,7 +2022,8 @@ public class GuidanceResponse extends DomainResource { GuidanceResponse o = (GuidanceResponse) other; return compareDeep(requestId, o.requestId, true) && compareDeep(module, o.module, true) && compareDeep(status, o.status, true) && compareDeep(evaluationMessage, o.evaluationMessage, true) && compareDeep(outputParameters, o.outputParameters, true) - && compareDeep(action, o.action, true); + && compareDeep(action, o.action, true) && compareDeep(dataRequirement, o.dataRequirement, true) + ; } @Override @@ -1553,10 +2037,8 @@ public class GuidanceResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (requestId == null || requestId.isEmpty()) && (module == null || module.isEmpty()) - && (status == null || status.isEmpty()) && (evaluationMessage == null || evaluationMessage.isEmpty()) - && (outputParameters == null || outputParameters.isEmpty()) && (action == null || action.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( requestId, module, status, evaluationMessage + , outputParameters, action, dataRequirement); } @Override diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/HealthcareService.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/HealthcareService.java index 323db8d4a89..6e664b69956 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/HealthcareService.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/HealthcareService.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * The details of a healthcare service available at a location. */ @@ -215,176 +214,6 @@ public class HealthcareService extends DomainResource { } } - @Block() - public static class ServiceTypeComponent extends BackboneElement implements IBaseBackboneElement { - /** - * The specific type of service being delivered or performed. - */ - @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Type of service delivered or performed", formalDefinition="The specific type of service being delivered or performed." ) - protected CodeableConcept type; - - /** - * Collection of specialties handled by the service site. This is more of a medical term. - */ - @Child(name = "specialty", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Specialties handled by the Service Site", formalDefinition="Collection of specialties handled by the service site. This is more of a medical term." ) - protected List specialty; - - private static final long serialVersionUID = 1703986174L; - - /** - * Constructor - */ - public ServiceTypeComponent() { - super(); - } - - /** - * Constructor - */ - public ServiceTypeComponent(CodeableConcept type) { - super(); - this.type = type; - } - - /** - * @return {@link #type} (The specific type of service being delivered or performed.) - */ - public CodeableConcept getType() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ServiceTypeComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new CodeableConcept(); // cc - return this.type; - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The specific type of service being delivered or performed.) - */ - public ServiceTypeComponent setType(CodeableConcept value) { - this.type = value; - return this; - } - - /** - * @return {@link #specialty} (Collection of specialties handled by the service site. This is more of a medical term.) - */ - public List getSpecialty() { - if (this.specialty == null) - this.specialty = new ArrayList(); - return this.specialty; - } - - public boolean hasSpecialty() { - if (this.specialty == null) - return false; - for (CodeableConcept item : this.specialty) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #specialty} (Collection of specialties handled by the service site. This is more of a medical term.) - */ - // syntactic sugar - public CodeableConcept addSpecialty() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.specialty == null) - this.specialty = new ArrayList(); - this.specialty.add(t); - return t; - } - - // syntactic sugar - public ServiceTypeComponent addSpecialty(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.specialty == null) - this.specialty = new ArrayList(); - this.specialty.add(t); - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("type", "CodeableConcept", "The specific type of service being delivered or performed.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("specialty", "CodeableConcept", "Collection of specialties handled by the service site. This is more of a medical term.", 0, java.lang.Integer.MAX_VALUE, specialty)); - } - - @Override - public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("type")) - this.type = castToCodeableConcept(value); // CodeableConcept - else if (name.equals("specialty")) - this.getSpecialty().add(castToCodeableConcept(value)); - else - super.setProperty(name, value); - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("type")) { - this.type = new CodeableConcept(); - return this.type; - } - else if (name.equals("specialty")) { - return addSpecialty(); - } - else - return super.addChild(name); - } - - public ServiceTypeComponent copy() { - ServiceTypeComponent dst = new ServiceTypeComponent(); - copyValues(dst); - dst.type = type == null ? null : type.copy(); - if (specialty != null) { - dst.specialty = new ArrayList(); - for (CodeableConcept i : specialty) - dst.specialty.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ServiceTypeComponent)) - return false; - ServiceTypeComponent o = (ServiceTypeComponent) other; - return compareDeep(type, o.type, true) && compareDeep(specialty, o.specialty, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ServiceTypeComponent)) - return false; - ServiceTypeComponent o = (ServiceTypeComponent) other; - return true; - } - - public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (specialty == null || specialty.isEmpty()) - ; - } - - public String fhirType() { - return "HealthcareService.serviceType"; - - } - - } - @Block() public static class HealthcareServiceAvailableTimeComponent extends BackboneElement implements IBaseBackboneElement { /** @@ -698,9 +527,8 @@ public class HealthcareService extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (daysOfWeek == null || daysOfWeek.isEmpty()) && (allDay == null || allDay.isEmpty()) - && (availableStartTime == null || availableStartTime.isEmpty()) && (availableEndTime == null || availableEndTime.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( daysOfWeek, allDay, availableStartTime + , availableEndTime); } public String fhirType() { @@ -870,8 +698,7 @@ public class HealthcareService extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (description == null || description.isEmpty()) && (during == null || during.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( description, during); } public String fhirType() { @@ -908,63 +735,70 @@ public class HealthcareService extends DomainResource { protected CodeableConcept serviceCategory; /** - * A specific type of service that may be delivered or performed. + * The specific type of service that may be delivered or performed. */ - @Child(name = "serviceType", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Specific service delivered or performed", formalDefinition="A specific type of service that may be delivered or performed." ) - protected List serviceType; + @Child(name = "serviceType", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Type of service that may be delivered or performed", formalDefinition="The specific type of service that may be delivered or performed." ) + protected List serviceType; /** - * The location where this healthcare service may be provided. + * Collection of specialties handled by the service site. This is more of a medical term. */ - @Child(name = "location", type = {Location.class}, order=4, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Location where service may be provided", formalDefinition="The location where this healthcare service may be provided." ) - protected Reference location; + @Child(name = "specialty", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Specialties handled by the HealthcareService", formalDefinition="Collection of specialties handled by the service site. This is more of a medical term." ) + protected List specialty; /** - * The actual object that is the target of the reference (The location where this healthcare service may be provided.) + * The location(s) where this healthcare service may be provided. */ - protected Location locationTarget; + @Child(name = "location", type = {Location.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Location(s) where service may be provided", formalDefinition="The location(s) where this healthcare service may be provided." ) + protected List location; + /** + * The actual objects that are the target of the reference (The location(s) where this healthcare service may be provided.) + */ + protected List locationTarget; + /** * Further description of the service as it would be presented to a consumer while searching. */ - @Child(name = "serviceName", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "serviceName", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Description of service as presented to a consumer while searching", formalDefinition="Further description of the service as it would be presented to a consumer while searching." ) protected StringType serviceName; /** * Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName. */ - @Child(name = "comment", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "comment", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Additional description and/or any specific issues not covered elsewhere", formalDefinition="Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName." ) protected StringType comment; /** * Extra details about the service that can't be placed in the other fields. */ - @Child(name = "extraDetails", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Child(name = "extraDetails", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Extra details about the service that can't be placed in the other fields", formalDefinition="Extra details about the service that can't be placed in the other fields." ) protected StringType extraDetails; /** * If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list. */ - @Child(name = "photo", type = {Attachment.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "photo", type = {Attachment.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Facilitates quick identification of the service", formalDefinition="If there is a photo/symbol associated with this HealthcareService, it may be included here to facilitate quick identification of the service in a list." ) protected Attachment photo; /** * List of contacts related to this specific healthcare service. */ - @Child(name = "telecom", type = {ContactPoint.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "telecom", type = {ContactPoint.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Contacts related to the healthcare service", formalDefinition="List of contacts related to this specific healthcare service." ) protected List telecom; /** * The location(s) that this service is available to (not where the service is provided). */ - @Child(name = "coverageArea", type = {Location.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "coverageArea", type = {Location.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Location(s) service is inteded for/available to", formalDefinition="The location(s) that this service is available to (not where the service is provided)." ) protected List coverageArea; /** @@ -976,81 +810,81 @@ public class HealthcareService extends DomainResource { /** * The code(s) that detail the conditions under which the healthcare service is available/offered. */ - @Child(name = "serviceProvisionCode", type = {CodeableConcept.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "serviceProvisionCode", type = {CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Conditions under which service is available/offered", formalDefinition="The code(s) that detail the conditions under which the healthcare service is available/offered." ) protected List serviceProvisionCode; /** * Does this service have specific eligibility requirements that need to be met in order to use the service? */ - @Child(name = "eligibility", type = {CodeableConcept.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Child(name = "eligibility", type = {CodeableConcept.class}, order=13, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Specific eligibility requirements required to use the service", formalDefinition="Does this service have specific eligibility requirements that need to be met in order to use the service?" ) protected CodeableConcept eligibility; /** * Describes the eligibility conditions for the service. */ - @Child(name = "eligibilityNote", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Child(name = "eligibilityNote", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Describes the eligibility conditions for the service", formalDefinition="Describes the eligibility conditions for the service." ) protected StringType eligibilityNote; /** * Program Names that can be used to categorize the service. */ - @Child(name = "programName", type = {StringType.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "programName", type = {StringType.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Program Names that categorize the service", formalDefinition="Program Names that can be used to categorize the service." ) protected List programName; /** * Collection of characteristics (attributes). */ - @Child(name = "characteristic", type = {CodeableConcept.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "characteristic", type = {CodeableConcept.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Collection of characteristics (attributes)", formalDefinition="Collection of characteristics (attributes)." ) protected List characteristic; /** * Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required. */ - @Child(name = "referralMethod", type = {CodeableConcept.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "referralMethod", type = {CodeableConcept.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Ways that the service accepts referrals", formalDefinition="Ways that the service accepts referrals, if this is not provided then it is implied that no referral is required." ) protected List referralMethod; /** * The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available. */ - @Child(name = "publicKey", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false) + @Child(name = "publicKey", type = {StringType.class}, order=18, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="PKI Public keys to support secure communications", formalDefinition="The public part of the 'keys' allocated to an Organization by an accredited body to support secure exchange of data over the internet. To be provided by the Organization, where available." ) protected StringType publicKey; /** * Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service. */ - @Child(name = "appointmentRequired", type = {BooleanType.class}, order=18, min=0, max=1, modifier=false, summary=false) + @Child(name = "appointmentRequired", type = {BooleanType.class}, order=19, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="If an appointment is required for access to this service", formalDefinition="Indicates whether or not a prospective consumer will require an appointment for a particular service at a site to be provided by the Organization. Indicates if an appointment is required for access to this service." ) protected BooleanType appointmentRequired; /** * A collection of times that the Service Site is available. */ - @Child(name = "availableTime", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "availableTime", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Times the Service Site is available", formalDefinition="A collection of times that the Service Site is available." ) protected List availableTime; /** * The HealthcareService is not available during this period of time due to the provided reason. */ - @Child(name = "notAvailable", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "notAvailable", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Not available during this time due to provided reason", formalDefinition="The HealthcareService is not available during this period of time due to the provided reason." ) protected List notAvailable; /** * A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times. */ - @Child(name = "availabilityExceptions", type = {StringType.class}, order=21, min=0, max=1, modifier=false, summary=false) + @Child(name = "availabilityExceptions", type = {StringType.class}, order=22, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Description of availability exceptions", formalDefinition="A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times." ) protected StringType availabilityExceptions; - private static final long serialVersionUID = 683771126L; + private static final long serialVersionUID = -874217100L; /** * Constructor @@ -1059,14 +893,6 @@ public class HealthcareService extends DomainResource { super(); } - /** - * Constructor - */ - public HealthcareService(Reference location) { - super(); - this.location = location; - } - /** * @return {@link #identifier} (External identifiers for this item.) */ @@ -1176,87 +1002,144 @@ public class HealthcareService extends DomainResource { } /** - * @return {@link #serviceType} (A specific type of service that may be delivered or performed.) + * @return {@link #serviceType} (The specific type of service that may be delivered or performed.) */ - public List getServiceType() { + public List getServiceType() { if (this.serviceType == null) - this.serviceType = new ArrayList(); + this.serviceType = new ArrayList(); return this.serviceType; } public boolean hasServiceType() { if (this.serviceType == null) return false; - for (ServiceTypeComponent item : this.serviceType) + for (CodeableConcept item : this.serviceType) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #serviceType} (A specific type of service that may be delivered or performed.) + * @return {@link #serviceType} (The specific type of service that may be delivered or performed.) */ // syntactic sugar - public ServiceTypeComponent addServiceType() { //3 - ServiceTypeComponent t = new ServiceTypeComponent(); + public CodeableConcept addServiceType() { //3 + CodeableConcept t = new CodeableConcept(); if (this.serviceType == null) - this.serviceType = new ArrayList(); + this.serviceType = new ArrayList(); this.serviceType.add(t); return t; } // syntactic sugar - public HealthcareService addServiceType(ServiceTypeComponent t) { //3 + public HealthcareService addServiceType(CodeableConcept t) { //3 if (t == null) return this; if (this.serviceType == null) - this.serviceType = new ArrayList(); + this.serviceType = new ArrayList(); this.serviceType.add(t); return this; } /** - * @return {@link #location} (The location where this healthcare service may be provided.) + * @return {@link #specialty} (Collection of specialties handled by the service site. This is more of a medical term.) */ - public Reference getLocation() { + public List getSpecialty() { + if (this.specialty == null) + this.specialty = new ArrayList(); + return this.specialty; + } + + public boolean hasSpecialty() { + if (this.specialty == null) + return false; + for (CodeableConcept item : this.specialty) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #specialty} (Collection of specialties handled by the service site. This is more of a medical term.) + */ + // syntactic sugar + public CodeableConcept addSpecialty() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.specialty == null) + this.specialty = new ArrayList(); + this.specialty.add(t); + return t; + } + + // syntactic sugar + public HealthcareService addSpecialty(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.specialty == null) + this.specialty = new ArrayList(); + this.specialty.add(t); + return this; + } + + /** + * @return {@link #location} (The location(s) where this healthcare service may be provided.) + */ + public List getLocation() { if (this.location == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create HealthcareService.location"); - else if (Configuration.doAutoCreate()) - this.location = new Reference(); // cc + this.location = new ArrayList(); return this.location; } public boolean hasLocation() { - return this.location != null && !this.location.isEmpty(); + if (this.location == null) + return false; + for (Reference item : this.location) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #location} (The location where this healthcare service may be provided.) + * @return {@link #location} (The location(s) where this healthcare service may be provided.) */ - public HealthcareService setLocation(Reference value) { - this.location = value; + // syntactic sugar + public Reference addLocation() { //3 + Reference t = new Reference(); + if (this.location == null) + this.location = new ArrayList(); + this.location.add(t); + return t; + } + + // syntactic sugar + public HealthcareService addLocation(Reference t) { //3 + if (t == null) + return this; + if (this.location == null) + this.location = new ArrayList(); + this.location.add(t); return this; } /** - * @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The location where this healthcare service may be provided.) + * @return {@link #location} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The location(s) where this healthcare service may be provided.) */ - public Location getLocationTarget() { + public List getLocationTarget() { if (this.locationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create HealthcareService.location"); - else if (Configuration.doAutoCreate()) - this.locationTarget = new Location(); // aa + this.locationTarget = new ArrayList(); return this.locationTarget; } + // syntactic sugar /** - * @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The location where this healthcare service may be provided.) + * @return {@link #location} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The location(s) where this healthcare service may be provided.) */ - public HealthcareService setLocationTarget(Location value) { - this.locationTarget = value; - return this; + public Location addLocationTarget() { + Location r = new Location(); + if (this.locationTarget == null) + this.locationTarget = new ArrayList(); + this.locationTarget.add(r); + return r; } /** @@ -2006,8 +1889,9 @@ public class HealthcareService extends DomainResource { childrenList.add(new Property("identifier", "Identifier", "External identifiers for this item.", 0, java.lang.Integer.MAX_VALUE, identifier)); childrenList.add(new Property("providedBy", "Reference(Organization)", "The organization that provides this healthcare service.", 0, java.lang.Integer.MAX_VALUE, providedBy)); childrenList.add(new Property("serviceCategory", "CodeableConcept", "Identifies the broad category of service being performed or delivered.", 0, java.lang.Integer.MAX_VALUE, serviceCategory)); - childrenList.add(new Property("serviceType", "", "A specific type of service that may be delivered or performed.", 0, java.lang.Integer.MAX_VALUE, serviceType)); - childrenList.add(new Property("location", "Reference(Location)", "The location where this healthcare service may be provided.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("serviceType", "CodeableConcept", "The specific type of service that may be delivered or performed.", 0, java.lang.Integer.MAX_VALUE, serviceType)); + childrenList.add(new Property("specialty", "CodeableConcept", "Collection of specialties handled by the service site. This is more of a medical term.", 0, java.lang.Integer.MAX_VALUE, specialty)); + childrenList.add(new Property("location", "Reference(Location)", "The location(s) where this healthcare service may be provided.", 0, java.lang.Integer.MAX_VALUE, location)); childrenList.add(new Property("serviceName", "string", "Further description of the service as it would be presented to a consumer while searching.", 0, java.lang.Integer.MAX_VALUE, serviceName)); childrenList.add(new Property("comment", "string", "Any additional description of the service and/or any specific issues not covered by the other attributes, which can be displayed as further detail under the serviceName.", 0, java.lang.Integer.MAX_VALUE, comment)); childrenList.add(new Property("extraDetails", "string", "Extra details about the service that can't be placed in the other fields.", 0, java.lang.Integer.MAX_VALUE, extraDetails)); @@ -2036,9 +1920,11 @@ public class HealthcareService extends DomainResource { else if (name.equals("serviceCategory")) this.serviceCategory = castToCodeableConcept(value); // CodeableConcept else if (name.equals("serviceType")) - this.getServiceType().add((ServiceTypeComponent) value); + this.getServiceType().add(castToCodeableConcept(value)); + else if (name.equals("specialty")) + this.getSpecialty().add(castToCodeableConcept(value)); else if (name.equals("location")) - this.location = castToReference(value); // Reference + this.getLocation().add(castToReference(value)); else if (name.equals("serviceName")) this.serviceName = castToString(value); // StringType else if (name.equals("comment")) @@ -2093,9 +1979,11 @@ public class HealthcareService extends DomainResource { else if (name.equals("serviceType")) { return addServiceType(); } + else if (name.equals("specialty")) { + return addSpecialty(); + } else if (name.equals("location")) { - this.location = new Reference(); - return this.location; + return addLocation(); } else if (name.equals("serviceName")) { throw new FHIRException("Cannot call addChild on a primitive type HealthcareService.serviceName"); @@ -2170,11 +2058,20 @@ public class HealthcareService extends DomainResource { dst.providedBy = providedBy == null ? null : providedBy.copy(); dst.serviceCategory = serviceCategory == null ? null : serviceCategory.copy(); if (serviceType != null) { - dst.serviceType = new ArrayList(); - for (ServiceTypeComponent i : serviceType) + dst.serviceType = new ArrayList(); + for (CodeableConcept i : serviceType) dst.serviceType.add(i.copy()); }; - dst.location = location == null ? null : location.copy(); + if (specialty != null) { + dst.specialty = new ArrayList(); + for (CodeableConcept i : specialty) + dst.specialty.add(i.copy()); + }; + if (location != null) { + dst.location = new ArrayList(); + for (Reference i : location) + dst.location.add(i.copy()); + }; dst.serviceName = serviceName == null ? null : serviceName.copy(); dst.comment = comment == null ? null : comment.copy(); dst.extraDetails = extraDetails == null ? null : extraDetails.copy(); @@ -2240,9 +2137,9 @@ public class HealthcareService extends DomainResource { HealthcareService o = (HealthcareService) other; return compareDeep(identifier, o.identifier, true) && compareDeep(providedBy, o.providedBy, true) && compareDeep(serviceCategory, o.serviceCategory, true) && compareDeep(serviceType, o.serviceType, true) - && compareDeep(location, o.location, true) && compareDeep(serviceName, o.serviceName, true) && compareDeep(comment, o.comment, true) - && compareDeep(extraDetails, o.extraDetails, true) && compareDeep(photo, o.photo, true) && compareDeep(telecom, o.telecom, true) - && compareDeep(coverageArea, o.coverageArea, true) && compareDeep(serviceProvisionCode, o.serviceProvisionCode, true) + && compareDeep(specialty, o.specialty, true) && compareDeep(location, o.location, true) && compareDeep(serviceName, o.serviceName, true) + && compareDeep(comment, o.comment, true) && compareDeep(extraDetails, o.extraDetails, true) && compareDeep(photo, o.photo, true) + && compareDeep(telecom, o.telecom, true) && compareDeep(coverageArea, o.coverageArea, true) && compareDeep(serviceProvisionCode, o.serviceProvisionCode, true) && compareDeep(eligibility, o.eligibility, true) && compareDeep(eligibilityNote, o.eligibilityNote, true) && compareDeep(programName, o.programName, true) && compareDeep(characteristic, o.characteristic, true) && compareDeep(referralMethod, o.referralMethod, true) && compareDeep(publicKey, o.publicKey, true) @@ -2265,17 +2162,11 @@ public class HealthcareService extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (providedBy == null || providedBy.isEmpty()) - && (serviceCategory == null || serviceCategory.isEmpty()) && (serviceType == null || serviceType.isEmpty()) - && (location == null || location.isEmpty()) && (serviceName == null || serviceName.isEmpty()) - && (comment == null || comment.isEmpty()) && (extraDetails == null || extraDetails.isEmpty()) - && (photo == null || photo.isEmpty()) && (telecom == null || telecom.isEmpty()) && (coverageArea == null || coverageArea.isEmpty()) - && (serviceProvisionCode == null || serviceProvisionCode.isEmpty()) && (eligibility == null || eligibility.isEmpty()) - && (eligibilityNote == null || eligibilityNote.isEmpty()) && (programName == null || programName.isEmpty()) - && (characteristic == null || characteristic.isEmpty()) && (referralMethod == null || referralMethod.isEmpty()) - && (publicKey == null || publicKey.isEmpty()) && (appointmentRequired == null || appointmentRequired.isEmpty()) - && (availableTime == null || availableTime.isEmpty()) && (notAvailable == null || notAvailable.isEmpty()) - && (availabilityExceptions == null || availabilityExceptions.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, providedBy, serviceCategory + , serviceType, specialty, location, serviceName, comment, extraDetails, photo, telecom + , coverageArea, serviceProvisionCode, eligibility, eligibilityNote, programName, characteristic + , referralMethod, publicKey, appointmentRequired, availableTime, notAvailable, availabilityExceptions + ); } @Override @@ -2328,17 +2219,17 @@ public class HealthcareService extends DomainResource { *

* Description: The type of service provided by this healthcare service
* Type: token
- * Path: HealthcareService.serviceType.type
+ * Path: HealthcareService.serviceType
*

*/ - @SearchParamDefinition(name="servicetype", path="HealthcareService.serviceType.type", description="The type of service provided by this healthcare service", type="token" ) + @SearchParamDefinition(name="servicetype", path="HealthcareService.serviceType", description="The type of service provided by this healthcare service", type="token" ) public static final String SP_SERVICETYPE = "servicetype"; /** * Fluent Client search parameter constant for servicetype *

* Description: The type of service provided by this healthcare service
* Type: token
- * Path: HealthcareService.serviceType.type
+ * Path: HealthcareService.serviceType
*

*/ public static final ca.uhn.fhir.rest.gclient.TokenClientParam SERVICETYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SERVICETYPE); diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/HumanName.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/HumanName.java index 790c1eb568b..7cea60130bb 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/HumanName.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/HumanName.java @@ -29,19 +29,17 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; -import ca.uhn.fhir.util.ElementUtil; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A human's name with the ability to identify parts and usage. */ @@ -807,7 +805,8 @@ public class HumanName extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && ElementUtil.isEmpty(use, text, family, given, prefix, suffix, period); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( use, text, family, given, prefix + , suffix, period); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/IdType.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/IdType.java index 518707470d6..c32a5849a91 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/IdType.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/IdType.java @@ -79,7 +79,7 @@ import ca.uhn.fhir.model.api.annotation.DatatypeDef; * identity on objects it creates as a convenience. *

*

- * Regex for ID: [a-zA-Z0-9\-\.]{1,36} + * Regex for ID: [a-z0-9\-\.]{1,36} *

*/ @DatatypeDef(name = "id", profileOf=StringType.class) @@ -208,9 +208,6 @@ public final class IdType extends UriType implements IPrimitiveType, IId myUnqualifiedId = theId; myUnqualifiedVersionId = StringUtils.defaultIfBlank(theVersionId, null); myHaveComponentParts = true; - if (isBlank(myBaseUrl) && isBlank(myResourceType) && isBlank(myUnqualifiedId) && isBlank(myUnqualifiedVersionId)) { - myHaveComponentParts = false; - } } /** diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Identifier.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Identifier.java index 1f6ccfdbe8b..431bc7d96d2 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Identifier.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Identifier.java @@ -29,20 +29,18 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A technical identifier - identifies some entity uniquely and unambiguously. */ @@ -190,10 +188,10 @@ public class Identifier extends Type implements ICompositeType { protected UriType system; /** - * The portion of the identifier typically displayed to the user and which is unique within the context of the system. + * The portion of the identifier typically relevant to the user and which is unique within the context of the system. */ @Child(name = "value", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The value that is unique", formalDefinition="The portion of the identifier typically displayed to the user and which is unique within the context of the system." ) + @Description(shortDefinition="The value that is unique", formalDefinition="The portion of the identifier typically relevant to the user and which is unique within the context of the system." ) protected StringType value; /** @@ -347,7 +345,7 @@ public class Identifier extends Type implements ICompositeType { } /** - * @return {@link #value} (The portion of the identifier typically displayed to the user and which is unique within the context of the system.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + * @return {@link #value} (The portion of the identifier typically relevant to the user and which is unique within the context of the system.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value */ public StringType getValueElement() { if (this.value == null) @@ -367,7 +365,7 @@ public class Identifier extends Type implements ICompositeType { } /** - * @param value {@link #value} (The portion of the identifier typically displayed to the user and which is unique within the context of the system.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + * @param value {@link #value} (The portion of the identifier typically relevant to the user and which is unique within the context of the system.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value */ public Identifier setValueElement(StringType value) { this.value = value; @@ -375,14 +373,14 @@ public class Identifier extends Type implements ICompositeType { } /** - * @return The portion of the identifier typically displayed to the user and which is unique within the context of the system. + * @return The portion of the identifier typically relevant to the user and which is unique within the context of the system. */ public String getValue() { return this.value == null ? null : this.value.getValue(); } /** - * @param value The portion of the identifier typically displayed to the user and which is unique within the context of the system. + * @param value The portion of the identifier typically relevant to the user and which is unique within the context of the system. */ public Identifier setValue(String value) { if (Utilities.noString(value)) @@ -468,7 +466,7 @@ public class Identifier extends Type implements ICompositeType { childrenList.add(new Property("use", "code", "The purpose of this identifier.", 0, java.lang.Integer.MAX_VALUE, use)); childrenList.add(new Property("type", "CodeableConcept", "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("system", "uri", "Establishes the namespace in which set of possible id values is unique.", 0, java.lang.Integer.MAX_VALUE, system)); - childrenList.add(new Property("value", "string", "The portion of the identifier typically displayed to the user and which is unique within the context of the system.", 0, java.lang.Integer.MAX_VALUE, value)); + childrenList.add(new Property("value", "string", "The portion of the identifier typically relevant to the user and which is unique within the context of the system.", 0, java.lang.Integer.MAX_VALUE, value)); childrenList.add(new Property("period", "Period", "Time period during which identifier is/was valid for use.", 0, java.lang.Integer.MAX_VALUE, period)); childrenList.add(new Property("assigner", "Reference(Organization)", "Organization that issued/manages the identifier.", 0, java.lang.Integer.MAX_VALUE, assigner)); } @@ -563,9 +561,8 @@ public class Identifier extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (use == null || use.isEmpty()) && (type == null || type.isEmpty()) - && (system == null || system.isEmpty()) && (value == null || value.isEmpty()) && (period == null || period.isEmpty()) - && (assigner == null || assigner.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( use, type, system, value, period + , assigner); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImagingExcerpt.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImagingExcerpt.java new file mode 100644 index 00000000000..b64affbc0ac --- /dev/null +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImagingExcerpt.java @@ -0,0 +1,2862 @@ +package org.hl7.fhir.dstu3.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu3.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; +/** + * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingExcerpt resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on. + */ +@ResourceDef(name="ImagingExcerpt", profile="http://hl7.org/fhir/Profile/ImagingExcerpt") +public class ImagingExcerpt extends DomainResource { + + public enum DWebType { + /** + * Web Access to DICOM Persistent Objects - RESTful Services + */ + WADORS, + /** + * Web Access to DICOM Persistent Objects - URI + */ + WADOURI, + /** + * IHE - Invoke Image Display Profile + */ + IID, + /** + * Web Access to DICOM Persistent Objects - Web Services + */ + WADOWS, + /** + * added to help the parsers + */ + NULL; + public static DWebType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("WADO-RS".equals(codeString)) + return WADORS; + if ("WADO-URI".equals(codeString)) + return WADOURI; + if ("IID".equals(codeString)) + return IID; + if ("WADO-WS".equals(codeString)) + return WADOWS; + throw new FHIRException("Unknown DWebType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case WADORS: return "WADO-RS"; + case WADOURI: return "WADO-URI"; + case IID: return "IID"; + case WADOWS: return "WADO-WS"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case WADORS: return "http://hl7.org/fhir/dWebType"; + case WADOURI: return "http://hl7.org/fhir/dWebType"; + case IID: return "http://hl7.org/fhir/dWebType"; + case WADOWS: return "http://hl7.org/fhir/dWebType"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case WADORS: return "Web Access to DICOM Persistent Objects - RESTful Services"; + case WADOURI: return "Web Access to DICOM Persistent Objects - URI"; + case IID: return "IHE - Invoke Image Display Profile"; + case WADOWS: return "Web Access to DICOM Persistent Objects - Web Services"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case WADORS: return "WADO-RS"; + case WADOURI: return "WADO-URI"; + case IID: return "IID"; + case WADOWS: return "WADO-WS"; + default: return "?"; + } + } + } + + public static class DWebTypeEnumFactory implements EnumFactory { + public DWebType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("WADO-RS".equals(codeString)) + return DWebType.WADORS; + if ("WADO-URI".equals(codeString)) + return DWebType.WADOURI; + if ("IID".equals(codeString)) + return DWebType.IID; + if ("WADO-WS".equals(codeString)) + return DWebType.WADOWS; + throw new IllegalArgumentException("Unknown DWebType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("WADO-RS".equals(codeString)) + return new Enumeration(this, DWebType.WADORS); + if ("WADO-URI".equals(codeString)) + return new Enumeration(this, DWebType.WADOURI); + if ("IID".equals(codeString)) + return new Enumeration(this, DWebType.IID); + if ("WADO-WS".equals(codeString)) + return new Enumeration(this, DWebType.WADOWS); + throw new FHIRException("Unknown DWebType code '"+codeString+"'"); + } + public String toCode(DWebType code) { + if (code == DWebType.WADORS) + return "WADO-RS"; + if (code == DWebType.WADOURI) + return "WADO-URI"; + if (code == DWebType.IID) + return "IID"; + if (code == DWebType.WADOWS) + return "WADO-WS"; + return "?"; + } + public String toSystem(DWebType code) { + return code.getSystem(); + } + } + + @Block() + public static class StudyComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Study instance UID of the SOP instances in the selection. + */ + @Child(name = "uid", type = {OidType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Study instance UID", formalDefinition="Study instance UID of the SOP instances in the selection." ) + protected OidType uid; + + /** + * Reference to the Imaging Study in FHIR form. + */ + @Child(name = "imagingStudy", type = {ImagingStudy.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reference to ImagingStudy", formalDefinition="Reference to the Imaging Study in FHIR form." ) + protected Reference imagingStudy; + + /** + * The actual object that is the target of the reference (Reference to the Imaging Study in FHIR form.) + */ + protected ImagingStudy imagingStudyTarget; + + /** + * Methods of accessing using DICOM web technologies. + */ + @Child(name = "dicom", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Dicom web access", formalDefinition="Methods of accessing using DICOM web technologies." ) + protected List dicom; + + /** + * A set of viewable reference images of various types. + */ + @Child(name = "viewable", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Viewable format", formalDefinition="A set of viewable reference images of various types." ) + protected List viewable; + + /** + * Series identity and locating information of the DICOM SOP instances in the selection. + */ + @Child(name = "series", type = {}, order=5, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Series identity of the selected instances", formalDefinition="Series identity and locating information of the DICOM SOP instances in the selection." ) + protected List series; + + private static final long serialVersionUID = 1674060080L; + + /** + * Constructor + */ + public StudyComponent() { + super(); + } + + /** + * Constructor + */ + public StudyComponent(OidType uid) { + super(); + this.uid = uid; + } + + /** + * @return {@link #uid} (Study instance UID of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public OidType getUidElement() { + if (this.uid == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StudyComponent.uid"); + else if (Configuration.doAutoCreate()) + this.uid = new OidType(); // bb + return this.uid; + } + + public boolean hasUidElement() { + return this.uid != null && !this.uid.isEmpty(); + } + + public boolean hasUid() { + return this.uid != null && !this.uid.isEmpty(); + } + + /** + * @param value {@link #uid} (Study instance UID of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public StudyComponent setUidElement(OidType value) { + this.uid = value; + return this; + } + + /** + * @return Study instance UID of the SOP instances in the selection. + */ + public String getUid() { + return this.uid == null ? null : this.uid.getValue(); + } + + /** + * @param value Study instance UID of the SOP instances in the selection. + */ + public StudyComponent setUid(String value) { + if (this.uid == null) + this.uid = new OidType(); + this.uid.setValue(value); + return this; + } + + /** + * @return {@link #imagingStudy} (Reference to the Imaging Study in FHIR form.) + */ + public Reference getImagingStudy() { + if (this.imagingStudy == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StudyComponent.imagingStudy"); + else if (Configuration.doAutoCreate()) + this.imagingStudy = new Reference(); // cc + return this.imagingStudy; + } + + public boolean hasImagingStudy() { + return this.imagingStudy != null && !this.imagingStudy.isEmpty(); + } + + /** + * @param value {@link #imagingStudy} (Reference to the Imaging Study in FHIR form.) + */ + public StudyComponent setImagingStudy(Reference value) { + this.imagingStudy = value; + return this; + } + + /** + * @return {@link #imagingStudy} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the Imaging Study in FHIR form.) + */ + public ImagingStudy getImagingStudyTarget() { + if (this.imagingStudyTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StudyComponent.imagingStudy"); + else if (Configuration.doAutoCreate()) + this.imagingStudyTarget = new ImagingStudy(); // aa + return this.imagingStudyTarget; + } + + /** + * @param value {@link #imagingStudy} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the Imaging Study in FHIR form.) + */ + public StudyComponent setImagingStudyTarget(ImagingStudy value) { + this.imagingStudyTarget = value; + return this; + } + + /** + * @return {@link #dicom} (Methods of accessing using DICOM web technologies.) + */ + public List getDicom() { + if (this.dicom == null) + this.dicom = new ArrayList(); + return this.dicom; + } + + public boolean hasDicom() { + if (this.dicom == null) + return false; + for (StudyDicomComponent item : this.dicom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dicom} (Methods of accessing using DICOM web technologies.) + */ + // syntactic sugar + public StudyDicomComponent addDicom() { //3 + StudyDicomComponent t = new StudyDicomComponent(); + if (this.dicom == null) + this.dicom = new ArrayList(); + this.dicom.add(t); + return t; + } + + // syntactic sugar + public StudyComponent addDicom(StudyDicomComponent t) { //3 + if (t == null) + return this; + if (this.dicom == null) + this.dicom = new ArrayList(); + this.dicom.add(t); + return this; + } + + /** + * @return {@link #viewable} (A set of viewable reference images of various types.) + */ + public List getViewable() { + if (this.viewable == null) + this.viewable = new ArrayList(); + return this.viewable; + } + + public boolean hasViewable() { + if (this.viewable == null) + return false; + for (StudyViewableComponent item : this.viewable) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #viewable} (A set of viewable reference images of various types.) + */ + // syntactic sugar + public StudyViewableComponent addViewable() { //3 + StudyViewableComponent t = new StudyViewableComponent(); + if (this.viewable == null) + this.viewable = new ArrayList(); + this.viewable.add(t); + return t; + } + + // syntactic sugar + public StudyComponent addViewable(StudyViewableComponent t) { //3 + if (t == null) + return this; + if (this.viewable == null) + this.viewable = new ArrayList(); + this.viewable.add(t); + return this; + } + + /** + * @return {@link #series} (Series identity and locating information of the DICOM SOP instances in the selection.) + */ + public List getSeries() { + if (this.series == null) + this.series = new ArrayList(); + return this.series; + } + + public boolean hasSeries() { + if (this.series == null) + return false; + for (SeriesComponent item : this.series) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #series} (Series identity and locating information of the DICOM SOP instances in the selection.) + */ + // syntactic sugar + public SeriesComponent addSeries() { //3 + SeriesComponent t = new SeriesComponent(); + if (this.series == null) + this.series = new ArrayList(); + this.series.add(t); + return t; + } + + // syntactic sugar + public StudyComponent addSeries(SeriesComponent t) { //3 + if (t == null) + return this; + if (this.series == null) + this.series = new ArrayList(); + this.series.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("uid", "oid", "Study instance UID of the SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, uid)); + childrenList.add(new Property("imagingStudy", "Reference(ImagingStudy)", "Reference to the Imaging Study in FHIR form.", 0, java.lang.Integer.MAX_VALUE, imagingStudy)); + childrenList.add(new Property("dicom", "", "Methods of accessing using DICOM web technologies.", 0, java.lang.Integer.MAX_VALUE, dicom)); + childrenList.add(new Property("viewable", "", "A set of viewable reference images of various types.", 0, java.lang.Integer.MAX_VALUE, viewable)); + childrenList.add(new Property("series", "", "Series identity and locating information of the DICOM SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, series)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("uid")) + this.uid = castToOid(value); // OidType + else if (name.equals("imagingStudy")) + this.imagingStudy = castToReference(value); // Reference + else if (name.equals("dicom")) + this.getDicom().add((StudyDicomComponent) value); + else if (name.equals("viewable")) + this.getViewable().add((StudyViewableComponent) value); + else if (name.equals("series")) + this.getSeries().add((SeriesComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("uid")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.uid"); + } + else if (name.equals("imagingStudy")) { + this.imagingStudy = new Reference(); + return this.imagingStudy; + } + else if (name.equals("dicom")) { + return addDicom(); + } + else if (name.equals("viewable")) { + return addViewable(); + } + else if (name.equals("series")) { + return addSeries(); + } + else + return super.addChild(name); + } + + public StudyComponent copy() { + StudyComponent dst = new StudyComponent(); + copyValues(dst); + dst.uid = uid == null ? null : uid.copy(); + dst.imagingStudy = imagingStudy == null ? null : imagingStudy.copy(); + if (dicom != null) { + dst.dicom = new ArrayList(); + for (StudyDicomComponent i : dicom) + dst.dicom.add(i.copy()); + }; + if (viewable != null) { + dst.viewable = new ArrayList(); + for (StudyViewableComponent i : viewable) + dst.viewable.add(i.copy()); + }; + if (series != null) { + dst.series = new ArrayList(); + for (SeriesComponent i : series) + dst.series.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StudyComponent)) + return false; + StudyComponent o = (StudyComponent) other; + return compareDeep(uid, o.uid, true) && compareDeep(imagingStudy, o.imagingStudy, true) && compareDeep(dicom, o.dicom, true) + && compareDeep(viewable, o.viewable, true) && compareDeep(series, o.series, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StudyComponent)) + return false; + StudyComponent o = (StudyComponent) other; + return compareValues(uid, o.uid, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( uid, imagingStudy, dicom, viewable + , series); + } + + public String fhirType() { + return "ImagingExcerpt.study"; + + } + + } + + @Block() + public static class StudyDicomComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Access type for DICOM web. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="WADO-RS | WADO-URI | IID | WADO-WS", formalDefinition="Access type for DICOM web." ) + protected Enumeration type; + + /** + * The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. + */ + @Child(name = "url", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Retrieve study URL", formalDefinition="The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol." ) + protected UriType url; + + private static final long serialVersionUID = 1661664416L; + + /** + * Constructor + */ + public StudyDicomComponent() { + super(); + } + + /** + * Constructor + */ + public StudyDicomComponent(Enumeration type, UriType url) { + super(); + this.type = type; + this.url = url; + } + + /** + * @return {@link #type} (Access type for DICOM web.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StudyDicomComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new DWebTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Access type for DICOM web.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public StudyDicomComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return Access type for DICOM web. + */ + public DWebType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value Access type for DICOM web. + */ + public StudyDicomComponent setType(DWebType value) { + if (this.type == null) + this.type = new Enumeration(new DWebTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #url} (The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StudyDicomComponent.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public StudyDicomComponent setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. + */ + public StudyDicomComponent setUrl(String value) { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "Access type for DICOM web.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("url", "uri", "The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.", 0, java.lang.Integer.MAX_VALUE, url)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = new DWebTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("url")) + this.url = castToUri(value); // UriType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.type"); + } + else if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.url"); + } + else + return super.addChild(name); + } + + public StudyDicomComponent copy() { + StudyDicomComponent dst = new StudyDicomComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.url = url == null ? null : url.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StudyDicomComponent)) + return false; + StudyDicomComponent o = (StudyDicomComponent) other; + return compareDeep(type, o.type, true) && compareDeep(url, o.url, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StudyDicomComponent)) + return false; + StudyDicomComponent o = (StudyDicomComponent) other; + return compareValues(type, o.type, true) && compareValues(url, o.url, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, url); + } + + public String fhirType() { + return "ImagingExcerpt.study.dicom"; + + } + + } + + @Block() + public static class StudyViewableComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate. + */ + @Child(name = "contentType", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Mime type of the content, with charset etc.", formalDefinition="Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate." ) + protected CodeType contentType; + + /** + * Height of the image in pixels (photo/video). + */ + @Child(name = "height", type = {PositiveIntType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Height of the image in pixels (photo/video)", formalDefinition="Height of the image in pixels (photo/video)." ) + protected PositiveIntType height; + + /** + * Width of the image in pixels (photo/video). + */ + @Child(name = "width", type = {PositiveIntType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Width of the image in pixels (photo/video)", formalDefinition="Width of the image in pixels (photo/video)." ) + protected PositiveIntType width; + + /** + * The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. + */ + @Child(name = "frames", type = {PositiveIntType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Number of frames if > 1 (photo)", formalDefinition="The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif." ) + protected PositiveIntType frames; + + /** + * The duration of the recording in seconds - for audio and video. + */ + @Child(name = "duration", type = {UnsignedIntType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Length in seconds (audio / video)", formalDefinition="The duration of the recording in seconds - for audio and video." ) + protected UnsignedIntType duration; + + /** + * The number of bytes of data that make up this attachment. + */ + @Child(name = "size", type = {UnsignedIntType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Number of bytes of content (if url provided)", formalDefinition="The number of bytes of data that make up this attachment." ) + protected UnsignedIntType size; + + /** + * A label or set of text to display in place of the data. + */ + @Child(name = "title", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Label to display in place of the data", formalDefinition="A label or set of text to display in place of the data." ) + protected StringType title; + + /** + * A location where the data can be accessed. + */ + @Child(name = "url", type = {UriType.class}, order=8, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Uri where the data can be found", formalDefinition="A location where the data can be accessed." ) + protected UriType url; + + private static final long serialVersionUID = -2135689428L; + + /** + * Constructor + */ + public StudyViewableComponent() { + super(); + } + + /** + * Constructor + */ + public StudyViewableComponent(CodeType contentType, UriType url) { + super(); + this.contentType = contentType; + this.url = url; + } + + /** + * @return {@link #contentType} (Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value + */ + public CodeType getContentTypeElement() { + if (this.contentType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StudyViewableComponent.contentType"); + else if (Configuration.doAutoCreate()) + this.contentType = new CodeType(); // bb + return this.contentType; + } + + public boolean hasContentTypeElement() { + return this.contentType != null && !this.contentType.isEmpty(); + } + + public boolean hasContentType() { + return this.contentType != null && !this.contentType.isEmpty(); + } + + /** + * @param value {@link #contentType} (Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value + */ + public StudyViewableComponent setContentTypeElement(CodeType value) { + this.contentType = value; + return this; + } + + /** + * @return Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate. + */ + public String getContentType() { + return this.contentType == null ? null : this.contentType.getValue(); + } + + /** + * @param value Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate. + */ + public StudyViewableComponent setContentType(String value) { + if (this.contentType == null) + this.contentType = new CodeType(); + this.contentType.setValue(value); + return this; + } + + /** + * @return {@link #height} (Height of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getHeight" gives direct access to the value + */ + public PositiveIntType getHeightElement() { + if (this.height == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StudyViewableComponent.height"); + else if (Configuration.doAutoCreate()) + this.height = new PositiveIntType(); // bb + return this.height; + } + + public boolean hasHeightElement() { + return this.height != null && !this.height.isEmpty(); + } + + public boolean hasHeight() { + return this.height != null && !this.height.isEmpty(); + } + + /** + * @param value {@link #height} (Height of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getHeight" gives direct access to the value + */ + public StudyViewableComponent setHeightElement(PositiveIntType value) { + this.height = value; + return this; + } + + /** + * @return Height of the image in pixels (photo/video). + */ + public int getHeight() { + return this.height == null || this.height.isEmpty() ? 0 : this.height.getValue(); + } + + /** + * @param value Height of the image in pixels (photo/video). + */ + public StudyViewableComponent setHeight(int value) { + if (this.height == null) + this.height = new PositiveIntType(); + this.height.setValue(value); + return this; + } + + /** + * @return {@link #width} (Width of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getWidth" gives direct access to the value + */ + public PositiveIntType getWidthElement() { + if (this.width == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StudyViewableComponent.width"); + else if (Configuration.doAutoCreate()) + this.width = new PositiveIntType(); // bb + return this.width; + } + + public boolean hasWidthElement() { + return this.width != null && !this.width.isEmpty(); + } + + public boolean hasWidth() { + return this.width != null && !this.width.isEmpty(); + } + + /** + * @param value {@link #width} (Width of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getWidth" gives direct access to the value + */ + public StudyViewableComponent setWidthElement(PositiveIntType value) { + this.width = value; + return this; + } + + /** + * @return Width of the image in pixels (photo/video). + */ + public int getWidth() { + return this.width == null || this.width.isEmpty() ? 0 : this.width.getValue(); + } + + /** + * @param value Width of the image in pixels (photo/video). + */ + public StudyViewableComponent setWidth(int value) { + if (this.width == null) + this.width = new PositiveIntType(); + this.width.setValue(value); + return this; + } + + /** + * @return {@link #frames} (The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif.). This is the underlying object with id, value and extensions. The accessor "getFrames" gives direct access to the value + */ + public PositiveIntType getFramesElement() { + if (this.frames == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StudyViewableComponent.frames"); + else if (Configuration.doAutoCreate()) + this.frames = new PositiveIntType(); // bb + return this.frames; + } + + public boolean hasFramesElement() { + return this.frames != null && !this.frames.isEmpty(); + } + + public boolean hasFrames() { + return this.frames != null && !this.frames.isEmpty(); + } + + /** + * @param value {@link #frames} (The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif.). This is the underlying object with id, value and extensions. The accessor "getFrames" gives direct access to the value + */ + public StudyViewableComponent setFramesElement(PositiveIntType value) { + this.frames = value; + return this; + } + + /** + * @return The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. + */ + public int getFrames() { + return this.frames == null || this.frames.isEmpty() ? 0 : this.frames.getValue(); + } + + /** + * @param value The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. + */ + public StudyViewableComponent setFrames(int value) { + if (this.frames == null) + this.frames = new PositiveIntType(); + this.frames.setValue(value); + return this; + } + + /** + * @return {@link #duration} (The duration of the recording in seconds - for audio and video.). This is the underlying object with id, value and extensions. The accessor "getDuration" gives direct access to the value + */ + public UnsignedIntType getDurationElement() { + if (this.duration == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StudyViewableComponent.duration"); + else if (Configuration.doAutoCreate()) + this.duration = new UnsignedIntType(); // bb + return this.duration; + } + + public boolean hasDurationElement() { + return this.duration != null && !this.duration.isEmpty(); + } + + public boolean hasDuration() { + return this.duration != null && !this.duration.isEmpty(); + } + + /** + * @param value {@link #duration} (The duration of the recording in seconds - for audio and video.). This is the underlying object with id, value and extensions. The accessor "getDuration" gives direct access to the value + */ + public StudyViewableComponent setDurationElement(UnsignedIntType value) { + this.duration = value; + return this; + } + + /** + * @return The duration of the recording in seconds - for audio and video. + */ + public int getDuration() { + return this.duration == null || this.duration.isEmpty() ? 0 : this.duration.getValue(); + } + + /** + * @param value The duration of the recording in seconds - for audio and video. + */ + public StudyViewableComponent setDuration(int value) { + if (this.duration == null) + this.duration = new UnsignedIntType(); + this.duration.setValue(value); + return this; + } + + /** + * @return {@link #size} (The number of bytes of data that make up this attachment.). This is the underlying object with id, value and extensions. The accessor "getSize" gives direct access to the value + */ + public UnsignedIntType getSizeElement() { + if (this.size == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StudyViewableComponent.size"); + else if (Configuration.doAutoCreate()) + this.size = new UnsignedIntType(); // bb + return this.size; + } + + public boolean hasSizeElement() { + return this.size != null && !this.size.isEmpty(); + } + + public boolean hasSize() { + return this.size != null && !this.size.isEmpty(); + } + + /** + * @param value {@link #size} (The number of bytes of data that make up this attachment.). This is the underlying object with id, value and extensions. The accessor "getSize" gives direct access to the value + */ + public StudyViewableComponent setSizeElement(UnsignedIntType value) { + this.size = value; + return this; + } + + /** + * @return The number of bytes of data that make up this attachment. + */ + public int getSize() { + return this.size == null || this.size.isEmpty() ? 0 : this.size.getValue(); + } + + /** + * @param value The number of bytes of data that make up this attachment. + */ + public StudyViewableComponent setSize(int value) { + if (this.size == null) + this.size = new UnsignedIntType(); + this.size.setValue(value); + return this; + } + + /** + * @return {@link #title} (A label or set of text to display in place of the data.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public StringType getTitleElement() { + if (this.title == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StudyViewableComponent.title"); + else if (Configuration.doAutoCreate()) + this.title = new StringType(); // bb + return this.title; + } + + public boolean hasTitleElement() { + return this.title != null && !this.title.isEmpty(); + } + + public boolean hasTitle() { + return this.title != null && !this.title.isEmpty(); + } + + /** + * @param value {@link #title} (A label or set of text to display in place of the data.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + */ + public StudyViewableComponent setTitleElement(StringType value) { + this.title = value; + return this; + } + + /** + * @return A label or set of text to display in place of the data. + */ + public String getTitle() { + return this.title == null ? null : this.title.getValue(); + } + + /** + * @param value A label or set of text to display in place of the data. + */ + public StudyViewableComponent setTitle(String value) { + if (Utilities.noString(value)) + this.title = null; + else { + if (this.title == null) + this.title = new StringType(); + this.title.setValue(value); + } + return this; + } + + /** + * @return {@link #url} (A location where the data can be accessed.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StudyViewableComponent.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (A location where the data can be accessed.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public StudyViewableComponent setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return A location where the data can be accessed. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value A location where the data can be accessed. + */ + public StudyViewableComponent setUrl(String value) { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("contentType", "code", "Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.", 0, java.lang.Integer.MAX_VALUE, contentType)); + childrenList.add(new Property("height", "positiveInt", "Height of the image in pixels (photo/video).", 0, java.lang.Integer.MAX_VALUE, height)); + childrenList.add(new Property("width", "positiveInt", "Width of the image in pixels (photo/video).", 0, java.lang.Integer.MAX_VALUE, width)); + childrenList.add(new Property("frames", "positiveInt", "The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif.", 0, java.lang.Integer.MAX_VALUE, frames)); + childrenList.add(new Property("duration", "unsignedInt", "The duration of the recording in seconds - for audio and video.", 0, java.lang.Integer.MAX_VALUE, duration)); + childrenList.add(new Property("size", "unsignedInt", "The number of bytes of data that make up this attachment.", 0, java.lang.Integer.MAX_VALUE, size)); + childrenList.add(new Property("title", "string", "A label or set of text to display in place of the data.", 0, java.lang.Integer.MAX_VALUE, title)); + childrenList.add(new Property("url", "uri", "A location where the data can be accessed.", 0, java.lang.Integer.MAX_VALUE, url)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("contentType")) + this.contentType = castToCode(value); // CodeType + else if (name.equals("height")) + this.height = castToPositiveInt(value); // PositiveIntType + else if (name.equals("width")) + this.width = castToPositiveInt(value); // PositiveIntType + else if (name.equals("frames")) + this.frames = castToPositiveInt(value); // PositiveIntType + else if (name.equals("duration")) + this.duration = castToUnsignedInt(value); // UnsignedIntType + else if (name.equals("size")) + this.size = castToUnsignedInt(value); // UnsignedIntType + else if (name.equals("title")) + this.title = castToString(value); // StringType + else if (name.equals("url")) + this.url = castToUri(value); // UriType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("contentType")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.contentType"); + } + else if (name.equals("height")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.height"); + } + else if (name.equals("width")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.width"); + } + else if (name.equals("frames")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.frames"); + } + else if (name.equals("duration")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.duration"); + } + else if (name.equals("size")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.size"); + } + else if (name.equals("title")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.title"); + } + else if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.url"); + } + else + return super.addChild(name); + } + + public StudyViewableComponent copy() { + StudyViewableComponent dst = new StudyViewableComponent(); + copyValues(dst); + dst.contentType = contentType == null ? null : contentType.copy(); + dst.height = height == null ? null : height.copy(); + dst.width = width == null ? null : width.copy(); + dst.frames = frames == null ? null : frames.copy(); + dst.duration = duration == null ? null : duration.copy(); + dst.size = size == null ? null : size.copy(); + dst.title = title == null ? null : title.copy(); + dst.url = url == null ? null : url.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StudyViewableComponent)) + return false; + StudyViewableComponent o = (StudyViewableComponent) other; + return compareDeep(contentType, o.contentType, true) && compareDeep(height, o.height, true) && compareDeep(width, o.width, true) + && compareDeep(frames, o.frames, true) && compareDeep(duration, o.duration, true) && compareDeep(size, o.size, true) + && compareDeep(title, o.title, true) && compareDeep(url, o.url, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StudyViewableComponent)) + return false; + StudyViewableComponent o = (StudyViewableComponent) other; + return compareValues(contentType, o.contentType, true) && compareValues(height, o.height, true) && compareValues(width, o.width, true) + && compareValues(frames, o.frames, true) && compareValues(duration, o.duration, true) && compareValues(size, o.size, true) + && compareValues(title, o.title, true) && compareValues(url, o.url, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( contentType, height, width, frames + , duration, size, title, url); + } + + public String fhirType() { + return "ImagingExcerpt.study.viewable"; + + } + + } + + @Block() + public static class SeriesComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Series instance UID of the SOP instances in the selection. + */ + @Child(name = "uid", type = {OidType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Series instance UID", formalDefinition="Series instance UID of the SOP instances in the selection." ) + protected OidType uid; + + /** + * Methods of accessing using DICOM web technologies. + */ + @Child(name = "dicom", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Dicom web access", formalDefinition="Methods of accessing using DICOM web technologies." ) + protected List dicom; + + /** + * Identity and locating information of the selected DICOM SOP instances. + */ + @Child(name = "instance", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The selected instance", formalDefinition="Identity and locating information of the selected DICOM SOP instances." ) + protected List instance; + + private static final long serialVersionUID = 1845643577L; + + /** + * Constructor + */ + public SeriesComponent() { + super(); + } + + /** + * Constructor + */ + public SeriesComponent(OidType uid) { + super(); + this.uid = uid; + } + + /** + * @return {@link #uid} (Series instance UID of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public OidType getUidElement() { + if (this.uid == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SeriesComponent.uid"); + else if (Configuration.doAutoCreate()) + this.uid = new OidType(); // bb + return this.uid; + } + + public boolean hasUidElement() { + return this.uid != null && !this.uid.isEmpty(); + } + + public boolean hasUid() { + return this.uid != null && !this.uid.isEmpty(); + } + + /** + * @param value {@link #uid} (Series instance UID of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public SeriesComponent setUidElement(OidType value) { + this.uid = value; + return this; + } + + /** + * @return Series instance UID of the SOP instances in the selection. + */ + public String getUid() { + return this.uid == null ? null : this.uid.getValue(); + } + + /** + * @param value Series instance UID of the SOP instances in the selection. + */ + public SeriesComponent setUid(String value) { + if (this.uid == null) + this.uid = new OidType(); + this.uid.setValue(value); + return this; + } + + /** + * @return {@link #dicom} (Methods of accessing using DICOM web technologies.) + */ + public List getDicom() { + if (this.dicom == null) + this.dicom = new ArrayList(); + return this.dicom; + } + + public boolean hasDicom() { + if (this.dicom == null) + return false; + for (SeriesDicomComponent item : this.dicom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dicom} (Methods of accessing using DICOM web technologies.) + */ + // syntactic sugar + public SeriesDicomComponent addDicom() { //3 + SeriesDicomComponent t = new SeriesDicomComponent(); + if (this.dicom == null) + this.dicom = new ArrayList(); + this.dicom.add(t); + return t; + } + + // syntactic sugar + public SeriesComponent addDicom(SeriesDicomComponent t) { //3 + if (t == null) + return this; + if (this.dicom == null) + this.dicom = new ArrayList(); + this.dicom.add(t); + return this; + } + + /** + * @return {@link #instance} (Identity and locating information of the selected DICOM SOP instances.) + */ + public List getInstance() { + if (this.instance == null) + this.instance = new ArrayList(); + return this.instance; + } + + public boolean hasInstance() { + if (this.instance == null) + return false; + for (InstanceComponent item : this.instance) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #instance} (Identity and locating information of the selected DICOM SOP instances.) + */ + // syntactic sugar + public InstanceComponent addInstance() { //3 + InstanceComponent t = new InstanceComponent(); + if (this.instance == null) + this.instance = new ArrayList(); + this.instance.add(t); + return t; + } + + // syntactic sugar + public SeriesComponent addInstance(InstanceComponent t) { //3 + if (t == null) + return this; + if (this.instance == null) + this.instance = new ArrayList(); + this.instance.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("uid", "oid", "Series instance UID of the SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, uid)); + childrenList.add(new Property("dicom", "", "Methods of accessing using DICOM web technologies.", 0, java.lang.Integer.MAX_VALUE, dicom)); + childrenList.add(new Property("instance", "", "Identity and locating information of the selected DICOM SOP instances.", 0, java.lang.Integer.MAX_VALUE, instance)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("uid")) + this.uid = castToOid(value); // OidType + else if (name.equals("dicom")) + this.getDicom().add((SeriesDicomComponent) value); + else if (name.equals("instance")) + this.getInstance().add((InstanceComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("uid")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.uid"); + } + else if (name.equals("dicom")) { + return addDicom(); + } + else if (name.equals("instance")) { + return addInstance(); + } + else + return super.addChild(name); + } + + public SeriesComponent copy() { + SeriesComponent dst = new SeriesComponent(); + copyValues(dst); + dst.uid = uid == null ? null : uid.copy(); + if (dicom != null) { + dst.dicom = new ArrayList(); + for (SeriesDicomComponent i : dicom) + dst.dicom.add(i.copy()); + }; + if (instance != null) { + dst.instance = new ArrayList(); + for (InstanceComponent i : instance) + dst.instance.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SeriesComponent)) + return false; + SeriesComponent o = (SeriesComponent) other; + return compareDeep(uid, o.uid, true) && compareDeep(dicom, o.dicom, true) && compareDeep(instance, o.instance, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SeriesComponent)) + return false; + SeriesComponent o = (SeriesComponent) other; + return compareValues(uid, o.uid, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( uid, dicom, instance); + } + + public String fhirType() { + return "ImagingExcerpt.study.series"; + + } + + } + + @Block() + public static class SeriesDicomComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Access type for DICOM web. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="WADO-RS | WADO-URI | IID | WADO-WS", formalDefinition="Access type for DICOM web." ) + protected Enumeration type; + + /** + * The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. + */ + @Child(name = "url", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Retrieve study URL", formalDefinition="The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol." ) + protected UriType url; + + private static final long serialVersionUID = 1661664416L; + + /** + * Constructor + */ + public SeriesDicomComponent() { + super(); + } + + /** + * Constructor + */ + public SeriesDicomComponent(Enumeration type, UriType url) { + super(); + this.type = type; + this.url = url; + } + + /** + * @return {@link #type} (Access type for DICOM web.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SeriesDicomComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new DWebTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Access type for DICOM web.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public SeriesDicomComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return Access type for DICOM web. + */ + public DWebType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value Access type for DICOM web. + */ + public SeriesDicomComponent setType(DWebType value) { + if (this.type == null) + this.type = new Enumeration(new DWebTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #url} (The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SeriesDicomComponent.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public SeriesDicomComponent setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. + */ + public SeriesDicomComponent setUrl(String value) { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "Access type for DICOM web.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("url", "uri", "The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.", 0, java.lang.Integer.MAX_VALUE, url)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = new DWebTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("url")) + this.url = castToUri(value); // UriType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.type"); + } + else if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.url"); + } + else + return super.addChild(name); + } + + public SeriesDicomComponent copy() { + SeriesDicomComponent dst = new SeriesDicomComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.url = url == null ? null : url.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SeriesDicomComponent)) + return false; + SeriesDicomComponent o = (SeriesDicomComponent) other; + return compareDeep(type, o.type, true) && compareDeep(url, o.url, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SeriesDicomComponent)) + return false; + SeriesDicomComponent o = (SeriesDicomComponent) other; + return compareValues(type, o.type, true) && compareValues(url, o.url, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, url); + } + + public String fhirType() { + return "ImagingExcerpt.study.series.dicom"; + + } + + } + + @Block() + public static class InstanceComponent extends BackboneElement implements IBaseBackboneElement { + /** + * SOP class UID of the selected instance. + */ + @Child(name = "sopClass", type = {OidType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="SOP class UID of instance", formalDefinition="SOP class UID of the selected instance." ) + protected OidType sopClass; + + /** + * SOP Instance UID of the selected instance. + */ + @Child(name = "uid", type = {OidType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Selected instance UID", formalDefinition="SOP Instance UID of the selected instance." ) + protected OidType uid; + + /** + * Methods of accessing using DICOM web technologies. + */ + @Child(name = "dicom", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Dicom web access", formalDefinition="Methods of accessing using DICOM web technologies." ) + protected List dicom; + + /** + * The specific frame reference within a multi-frame object. + */ + @Child(name = "frameNumbers", type = {UnsignedIntType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Frame reference number", formalDefinition="The specific frame reference within a multi-frame object." ) + protected List frameNumbers; + + private static final long serialVersionUID = 1372440557L; + + /** + * Constructor + */ + public InstanceComponent() { + super(); + } + + /** + * Constructor + */ + public InstanceComponent(OidType sopClass, OidType uid) { + super(); + this.sopClass = sopClass; + this.uid = uid; + } + + /** + * @return {@link #sopClass} (SOP class UID of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getSopClass" gives direct access to the value + */ + public OidType getSopClassElement() { + if (this.sopClass == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create InstanceComponent.sopClass"); + else if (Configuration.doAutoCreate()) + this.sopClass = new OidType(); // bb + return this.sopClass; + } + + public boolean hasSopClassElement() { + return this.sopClass != null && !this.sopClass.isEmpty(); + } + + public boolean hasSopClass() { + return this.sopClass != null && !this.sopClass.isEmpty(); + } + + /** + * @param value {@link #sopClass} (SOP class UID of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getSopClass" gives direct access to the value + */ + public InstanceComponent setSopClassElement(OidType value) { + this.sopClass = value; + return this; + } + + /** + * @return SOP class UID of the selected instance. + */ + public String getSopClass() { + return this.sopClass == null ? null : this.sopClass.getValue(); + } + + /** + * @param value SOP class UID of the selected instance. + */ + public InstanceComponent setSopClass(String value) { + if (this.sopClass == null) + this.sopClass = new OidType(); + this.sopClass.setValue(value); + return this; + } + + /** + * @return {@link #uid} (SOP Instance UID of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public OidType getUidElement() { + if (this.uid == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create InstanceComponent.uid"); + else if (Configuration.doAutoCreate()) + this.uid = new OidType(); // bb + return this.uid; + } + + public boolean hasUidElement() { + return this.uid != null && !this.uid.isEmpty(); + } + + public boolean hasUid() { + return this.uid != null && !this.uid.isEmpty(); + } + + /** + * @param value {@link #uid} (SOP Instance UID of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public InstanceComponent setUidElement(OidType value) { + this.uid = value; + return this; + } + + /** + * @return SOP Instance UID of the selected instance. + */ + public String getUid() { + return this.uid == null ? null : this.uid.getValue(); + } + + /** + * @param value SOP Instance UID of the selected instance. + */ + public InstanceComponent setUid(String value) { + if (this.uid == null) + this.uid = new OidType(); + this.uid.setValue(value); + return this; + } + + /** + * @return {@link #dicom} (Methods of accessing using DICOM web technologies.) + */ + public List getDicom() { + if (this.dicom == null) + this.dicom = new ArrayList(); + return this.dicom; + } + + public boolean hasDicom() { + if (this.dicom == null) + return false; + for (InstanceDicomComponent item : this.dicom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dicom} (Methods of accessing using DICOM web technologies.) + */ + // syntactic sugar + public InstanceDicomComponent addDicom() { //3 + InstanceDicomComponent t = new InstanceDicomComponent(); + if (this.dicom == null) + this.dicom = new ArrayList(); + this.dicom.add(t); + return t; + } + + // syntactic sugar + public InstanceComponent addDicom(InstanceDicomComponent t) { //3 + if (t == null) + return this; + if (this.dicom == null) + this.dicom = new ArrayList(); + this.dicom.add(t); + return this; + } + + /** + * @return {@link #frameNumbers} (The specific frame reference within a multi-frame object.) + */ + public List getFrameNumbers() { + if (this.frameNumbers == null) + this.frameNumbers = new ArrayList(); + return this.frameNumbers; + } + + public boolean hasFrameNumbers() { + if (this.frameNumbers == null) + return false; + for (UnsignedIntType item : this.frameNumbers) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #frameNumbers} (The specific frame reference within a multi-frame object.) + */ + // syntactic sugar + public UnsignedIntType addFrameNumbersElement() {//2 + UnsignedIntType t = new UnsignedIntType(); + if (this.frameNumbers == null) + this.frameNumbers = new ArrayList(); + this.frameNumbers.add(t); + return t; + } + + /** + * @param value {@link #frameNumbers} (The specific frame reference within a multi-frame object.) + */ + public InstanceComponent addFrameNumbers(int value) { //1 + UnsignedIntType t = new UnsignedIntType(); + t.setValue(value); + if (this.frameNumbers == null) + this.frameNumbers = new ArrayList(); + this.frameNumbers.add(t); + return this; + } + + /** + * @param value {@link #frameNumbers} (The specific frame reference within a multi-frame object.) + */ + public boolean hasFrameNumbers(int value) { + if (this.frameNumbers == null) + return false; + for (UnsignedIntType v : this.frameNumbers) + if (v.equals(value)) // unsignedInt + return true; + return false; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("sopClass", "oid", "SOP class UID of the selected instance.", 0, java.lang.Integer.MAX_VALUE, sopClass)); + childrenList.add(new Property("uid", "oid", "SOP Instance UID of the selected instance.", 0, java.lang.Integer.MAX_VALUE, uid)); + childrenList.add(new Property("dicom", "", "Methods of accessing using DICOM web technologies.", 0, java.lang.Integer.MAX_VALUE, dicom)); + childrenList.add(new Property("frameNumbers", "unsignedInt", "The specific frame reference within a multi-frame object.", 0, java.lang.Integer.MAX_VALUE, frameNumbers)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("sopClass")) + this.sopClass = castToOid(value); // OidType + else if (name.equals("uid")) + this.uid = castToOid(value); // OidType + else if (name.equals("dicom")) + this.getDicom().add((InstanceDicomComponent) value); + else if (name.equals("frameNumbers")) + this.getFrameNumbers().add(castToUnsignedInt(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("sopClass")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.sopClass"); + } + else if (name.equals("uid")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.uid"); + } + else if (name.equals("dicom")) { + return addDicom(); + } + else if (name.equals("frameNumbers")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.frameNumbers"); + } + else + return super.addChild(name); + } + + public InstanceComponent copy() { + InstanceComponent dst = new InstanceComponent(); + copyValues(dst); + dst.sopClass = sopClass == null ? null : sopClass.copy(); + dst.uid = uid == null ? null : uid.copy(); + if (dicom != null) { + dst.dicom = new ArrayList(); + for (InstanceDicomComponent i : dicom) + dst.dicom.add(i.copy()); + }; + if (frameNumbers != null) { + dst.frameNumbers = new ArrayList(); + for (UnsignedIntType i : frameNumbers) + dst.frameNumbers.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof InstanceComponent)) + return false; + InstanceComponent o = (InstanceComponent) other; + return compareDeep(sopClass, o.sopClass, true) && compareDeep(uid, o.uid, true) && compareDeep(dicom, o.dicom, true) + && compareDeep(frameNumbers, o.frameNumbers, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof InstanceComponent)) + return false; + InstanceComponent o = (InstanceComponent) other; + return compareValues(sopClass, o.sopClass, true) && compareValues(uid, o.uid, true) && compareValues(frameNumbers, o.frameNumbers, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sopClass, uid, dicom, frameNumbers + ); + } + + public String fhirType() { + return "ImagingExcerpt.study.series.instance"; + + } + + } + + @Block() + public static class InstanceDicomComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Access type for DICOM web. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="WADO-RS | WADO-URI | IID | WADO-WS", formalDefinition="Access type for DICOM web." ) + protected Enumeration type; + + /** + * The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. + */ + @Child(name = "url", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Retrieve study URL", formalDefinition="The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol." ) + protected UriType url; + + private static final long serialVersionUID = 1661664416L; + + /** + * Constructor + */ + public InstanceDicomComponent() { + super(); + } + + /** + * Constructor + */ + public InstanceDicomComponent(Enumeration type, UriType url) { + super(); + this.type = type; + this.url = url; + } + + /** + * @return {@link #type} (Access type for DICOM web.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create InstanceDicomComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new DWebTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Access type for DICOM web.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public InstanceDicomComponent setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return Access type for DICOM web. + */ + public DWebType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value Access type for DICOM web. + */ + public InstanceDicomComponent setType(DWebType value) { + if (this.type == null) + this.type = new Enumeration(new DWebTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #url} (The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create InstanceDicomComponent.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public InstanceDicomComponent setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. + */ + public InstanceDicomComponent setUrl(String value) { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "Access type for DICOM web.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("url", "uri", "The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.", 0, java.lang.Integer.MAX_VALUE, url)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = new DWebTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("url")) + this.url = castToUri(value); // UriType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.type"); + } + else if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.url"); + } + else + return super.addChild(name); + } + + public InstanceDicomComponent copy() { + InstanceDicomComponent dst = new InstanceDicomComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.url = url == null ? null : url.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof InstanceDicomComponent)) + return false; + InstanceDicomComponent o = (InstanceDicomComponent) other; + return compareDeep(type, o.type, true) && compareDeep(url, o.url, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof InstanceDicomComponent)) + return false; + InstanceDicomComponent o = (InstanceDicomComponent) other; + return compareValues(type, o.type, true) && compareValues(url, o.url, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, url); + } + + public String fhirType() { + return "ImagingExcerpt.study.series.instance.dicom"; + + } + + } + + /** + * Unique identifier of the DICOM Key Object Selection (KOS) representation. + */ + @Child(name = "uid", type = {OidType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Instance UID", formalDefinition="Unique identifier of the DICOM Key Object Selection (KOS) representation." ) + protected OidType uid; + + /** + * A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingExcerpt. + */ + @Child(name = "patient", type = {Patient.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Patient of the selected objects", formalDefinition="A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingExcerpt." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingExcerpt.) + */ + protected Patient patientTarget; + + /** + * Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image). + */ + @Child(name = "authoringTime", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Time when the imaging object selection was created", formalDefinition="Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image)." ) + protected DateTimeType authoringTime; + + /** + * Author of ImagingExcerpt. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion. + */ + @Child(name = "author", type = {Practitioner.class, Device.class, Organization.class, Patient.class, RelatedPerson.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Author (human or machine)", formalDefinition="Author of ImagingExcerpt. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion." ) + protected Reference author; + + /** + * The actual object that is the target of the reference (Author of ImagingExcerpt. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) + */ + protected Resource authorTarget; + + /** + * The reason for, or significance of, the selection of objects referenced in the resource. + */ + @Child(name = "title", type = {CodeableConcept.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reason for selection", formalDefinition="The reason for, or significance of, the selection of objects referenced in the resource." ) + protected CodeableConcept title; + + /** + * Text description of the DICOM SOP instances selected in the ImagingExcerpt. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection. + */ + @Child(name = "description", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Description text", formalDefinition="Text description of the DICOM SOP instances selected in the ImagingExcerpt. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection." ) + protected StringType description; + + /** + * Study identity and locating information of the DICOM SOP instances in the selection. + */ + @Child(name = "study", type = {}, order=6, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Study identity of the selected instances", formalDefinition="Study identity and locating information of the DICOM SOP instances in the selection." ) + protected List study; + + private static final long serialVersionUID = 1428713335L; + + /** + * Constructor + */ + public ImagingExcerpt() { + super(); + } + + /** + * Constructor + */ + public ImagingExcerpt(OidType uid, Reference patient, CodeableConcept title) { + super(); + this.uid = uid; + this.patient = patient; + this.title = title; + } + + /** + * @return {@link #uid} (Unique identifier of the DICOM Key Object Selection (KOS) representation.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public OidType getUidElement() { + if (this.uid == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingExcerpt.uid"); + else if (Configuration.doAutoCreate()) + this.uid = new OidType(); // bb + return this.uid; + } + + public boolean hasUidElement() { + return this.uid != null && !this.uid.isEmpty(); + } + + public boolean hasUid() { + return this.uid != null && !this.uid.isEmpty(); + } + + /** + * @param value {@link #uid} (Unique identifier of the DICOM Key Object Selection (KOS) representation.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public ImagingExcerpt setUidElement(OidType value) { + this.uid = value; + return this; + } + + /** + * @return Unique identifier of the DICOM Key Object Selection (KOS) representation. + */ + public String getUid() { + return this.uid == null ? null : this.uid.getValue(); + } + + /** + * @param value Unique identifier of the DICOM Key Object Selection (KOS) representation. + */ + public ImagingExcerpt setUid(String value) { + if (this.uid == null) + this.uid = new OidType(); + this.uid.setValue(value); + return this; + } + + /** + * @return {@link #patient} (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingExcerpt.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingExcerpt.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingExcerpt.) + */ + public ImagingExcerpt setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingExcerpt.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingExcerpt.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingExcerpt.) + */ + public ImagingExcerpt setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #authoringTime} (Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).). This is the underlying object with id, value and extensions. The accessor "getAuthoringTime" gives direct access to the value + */ + public DateTimeType getAuthoringTimeElement() { + if (this.authoringTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingExcerpt.authoringTime"); + else if (Configuration.doAutoCreate()) + this.authoringTime = new DateTimeType(); // bb + return this.authoringTime; + } + + public boolean hasAuthoringTimeElement() { + return this.authoringTime != null && !this.authoringTime.isEmpty(); + } + + public boolean hasAuthoringTime() { + return this.authoringTime != null && !this.authoringTime.isEmpty(); + } + + /** + * @param value {@link #authoringTime} (Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).). This is the underlying object with id, value and extensions. The accessor "getAuthoringTime" gives direct access to the value + */ + public ImagingExcerpt setAuthoringTimeElement(DateTimeType value) { + this.authoringTime = value; + return this; + } + + /** + * @return Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image). + */ + public Date getAuthoringTime() { + return this.authoringTime == null ? null : this.authoringTime.getValue(); + } + + /** + * @param value Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image). + */ + public ImagingExcerpt setAuthoringTime(Date value) { + if (value == null) + this.authoringTime = null; + else { + if (this.authoringTime == null) + this.authoringTime = new DateTimeType(); + this.authoringTime.setValue(value); + } + return this; + } + + /** + * @return {@link #author} (Author of ImagingExcerpt. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) + */ + public Reference getAuthor() { + if (this.author == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingExcerpt.author"); + else if (Configuration.doAutoCreate()) + this.author = new Reference(); // cc + return this.author; + } + + public boolean hasAuthor() { + return this.author != null && !this.author.isEmpty(); + } + + /** + * @param value {@link #author} (Author of ImagingExcerpt. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) + */ + public ImagingExcerpt setAuthor(Reference value) { + this.author = value; + return this; + } + + /** + * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Author of ImagingExcerpt. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) + */ + public Resource getAuthorTarget() { + return this.authorTarget; + } + + /** + * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Author of ImagingExcerpt. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) + */ + public ImagingExcerpt setAuthorTarget(Resource value) { + this.authorTarget = value; + return this; + } + + /** + * @return {@link #title} (The reason for, or significance of, the selection of objects referenced in the resource.) + */ + public CodeableConcept getTitle() { + if (this.title == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingExcerpt.title"); + else if (Configuration.doAutoCreate()) + this.title = new CodeableConcept(); // cc + return this.title; + } + + public boolean hasTitle() { + return this.title != null && !this.title.isEmpty(); + } + + /** + * @param value {@link #title} (The reason for, or significance of, the selection of objects referenced in the resource.) + */ + public ImagingExcerpt setTitle(CodeableConcept value) { + this.title = value; + return this; + } + + /** + * @return {@link #description} (Text description of the DICOM SOP instances selected in the ImagingExcerpt. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingExcerpt.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (Text description of the DICOM SOP instances selected in the ImagingExcerpt. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public ImagingExcerpt setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return Text description of the DICOM SOP instances selected in the ImagingExcerpt. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value Text description of the DICOM SOP instances selected in the ImagingExcerpt. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection. + */ + public ImagingExcerpt setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #study} (Study identity and locating information of the DICOM SOP instances in the selection.) + */ + public List getStudy() { + if (this.study == null) + this.study = new ArrayList(); + return this.study; + } + + public boolean hasStudy() { + if (this.study == null) + return false; + for (StudyComponent item : this.study) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #study} (Study identity and locating information of the DICOM SOP instances in the selection.) + */ + // syntactic sugar + public StudyComponent addStudy() { //3 + StudyComponent t = new StudyComponent(); + if (this.study == null) + this.study = new ArrayList(); + this.study.add(t); + return t; + } + + // syntactic sugar + public ImagingExcerpt addStudy(StudyComponent t) { //3 + if (t == null) + return this; + if (this.study == null) + this.study = new ArrayList(); + this.study.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("uid", "oid", "Unique identifier of the DICOM Key Object Selection (KOS) representation.", 0, java.lang.Integer.MAX_VALUE, uid)); + childrenList.add(new Property("patient", "Reference(Patient)", "A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingExcerpt.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("authoringTime", "dateTime", "Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).", 0, java.lang.Integer.MAX_VALUE, authoringTime)); + childrenList.add(new Property("author", "Reference(Practitioner|Device|Organization|Patient|RelatedPerson)", "Author of ImagingExcerpt. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.", 0, java.lang.Integer.MAX_VALUE, author)); + childrenList.add(new Property("title", "CodeableConcept", "The reason for, or significance of, the selection of objects referenced in the resource.", 0, java.lang.Integer.MAX_VALUE, title)); + childrenList.add(new Property("description", "string", "Text description of the DICOM SOP instances selected in the ImagingExcerpt. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("study", "", "Study identity and locating information of the DICOM SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, study)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("uid")) + this.uid = castToOid(value); // OidType + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("authoringTime")) + this.authoringTime = castToDateTime(value); // DateTimeType + else if (name.equals("author")) + this.author = castToReference(value); // Reference + else if (name.equals("title")) + this.title = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("study")) + this.getStudy().add((StudyComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("uid")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.uid"); + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("authoringTime")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.authoringTime"); + } + else if (name.equals("author")) { + this.author = new Reference(); + return this.author; + } + else if (name.equals("title")) { + this.title = new CodeableConcept(); + return this.title; + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.description"); + } + else if (name.equals("study")) { + return addStudy(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ImagingExcerpt"; + + } + + public ImagingExcerpt copy() { + ImagingExcerpt dst = new ImagingExcerpt(); + copyValues(dst); + dst.uid = uid == null ? null : uid.copy(); + dst.patient = patient == null ? null : patient.copy(); + dst.authoringTime = authoringTime == null ? null : authoringTime.copy(); + dst.author = author == null ? null : author.copy(); + dst.title = title == null ? null : title.copy(); + dst.description = description == null ? null : description.copy(); + if (study != null) { + dst.study = new ArrayList(); + for (StudyComponent i : study) + dst.study.add(i.copy()); + }; + return dst; + } + + protected ImagingExcerpt typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ImagingExcerpt)) + return false; + ImagingExcerpt o = (ImagingExcerpt) other; + return compareDeep(uid, o.uid, true) && compareDeep(patient, o.patient, true) && compareDeep(authoringTime, o.authoringTime, true) + && compareDeep(author, o.author, true) && compareDeep(title, o.title, true) && compareDeep(description, o.description, true) + && compareDeep(study, o.study, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ImagingExcerpt)) + return false; + ImagingExcerpt o = (ImagingExcerpt) other; + return compareValues(uid, o.uid, true) && compareValues(authoringTime, o.authoringTime, true) && compareValues(description, o.description, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( uid, patient, authoringTime, author + , title, description, study); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.ImagingExcerpt; + } + + /** + * Search parameter: identifier + *

+ * Description: UID of key DICOM object selection
+ * Type: uri
+ * Path: ImagingExcerpt.uid
+ *

+ */ + @SearchParamDefinition(name="identifier", path="ImagingExcerpt.uid", description="UID of key DICOM object selection", type="uri" ) + public static final String SP_IDENTIFIER = "identifier"; + /** + * Fluent Client search parameter constant for identifier + *

+ * Description: UID of key DICOM object selection
+ * Type: uri
+ * Path: ImagingExcerpt.uid
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.UriClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_IDENTIFIER); + + /** + * Search parameter: authoring-time + *

+ * Description: Time of key DICOM object selection authoring
+ * Type: date
+ * Path: ImagingExcerpt.authoringTime
+ *

+ */ + @SearchParamDefinition(name="authoring-time", path="ImagingExcerpt.authoringTime", description="Time of key DICOM object selection authoring", type="date" ) + public static final String SP_AUTHORING_TIME = "authoring-time"; + /** + * Fluent Client search parameter constant for authoring-time + *

+ * Description: Time of key DICOM object selection authoring
+ * Type: date
+ * Path: ImagingExcerpt.authoringTime
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.DateClientParam AUTHORING_TIME = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_AUTHORING_TIME); + + /** + * Search parameter: selected-study + *

+ * Description: Study selected in key DICOM object selection
+ * Type: uri
+ * Path: ImagingExcerpt.study.uid
+ *

+ */ + @SearchParamDefinition(name="selected-study", path="ImagingExcerpt.study.uid", description="Study selected in key DICOM object selection", type="uri" ) + public static final String SP_SELECTED_STUDY = "selected-study"; + /** + * Fluent Client search parameter constant for selected-study + *

+ * Description: Study selected in key DICOM object selection
+ * Type: uri
+ * Path: ImagingExcerpt.study.uid
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.UriClientParam SELECTED_STUDY = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_SELECTED_STUDY); + + /** + * Search parameter: author + *

+ * Description: Author of key DICOM object selection
+ * Type: reference
+ * Path: ImagingExcerpt.author
+ *

+ */ + @SearchParamDefinition(name="author", path="ImagingExcerpt.author", description="Author of key DICOM object selection", type="reference" ) + public static final String SP_AUTHOR = "author"; + /** + * Fluent Client search parameter constant for author + *

+ * Description: Author of key DICOM object selection
+ * Type: reference
+ * Path: ImagingExcerpt.author
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AUTHOR); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "ImagingExcerpt:author". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHOR = new ca.uhn.fhir.model.api.Include("ImagingExcerpt:author").toLocked(); + + /** + * Search parameter: patient + *

+ * Description: Subject of key DICOM object selection
+ * Type: reference
+ * Path: ImagingExcerpt.patient
+ *

+ */ + @SearchParamDefinition(name="patient", path="ImagingExcerpt.patient", description="Subject of key DICOM object selection", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) + public static final String SP_PATIENT = "patient"; + /** + * Fluent Client search parameter constant for patient + *

+ * Description: Subject of key DICOM object selection
+ * Type: reference
+ * Path: ImagingExcerpt.patient
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "ImagingExcerpt:patient". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ImagingExcerpt:patient").toLocked(); + + /** + * Search parameter: title + *

+ * Description: Title of key DICOM object selection
+ * Type: token
+ * Path: ImagingExcerpt.title
+ *

+ */ + @SearchParamDefinition(name="title", path="ImagingExcerpt.title", description="Title of key DICOM object selection", type="token" ) + public static final String SP_TITLE = "title"; + /** + * Fluent Client search parameter constant for title + *

+ * Description: Title of key DICOM object selection
+ * Type: token
+ * Path: ImagingExcerpt.title
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam TITLE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TITLE); + + +} + diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImagingObjectSelection.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImagingObjectSelection.java index 70eb646d537..6088e2cae60 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImagingObjectSelection.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImagingObjectSelection.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on. */ @@ -355,8 +354,8 @@ public class ImagingObjectSelection extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (uid == null || uid.isEmpty()) && (url == null || url.isEmpty()) && (imagingStudy == null || imagingStudy.isEmpty()) - && (series == null || series.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( uid, url, imagingStudy, series + ); } public String fhirType() { @@ -371,7 +370,7 @@ public class ImagingObjectSelection extends DomainResource { /** * Series instance UID of the SOP instances in the selection. */ - @Child(name = "uid", type = {OidType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Child(name = "uid", type = {OidType.class}, order=1, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Series instance UID", formalDefinition="Series instance UID of the SOP instances in the selection." ) protected OidType uid; @@ -398,6 +397,14 @@ public class ImagingObjectSelection extends DomainResource { super(); } + /** + * Constructor + */ + public SeriesComponent(OidType uid) { + super(); + this.uid = uid; + } + /** * @return {@link #uid} (Series instance UID of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value */ @@ -437,13 +444,9 @@ public class ImagingObjectSelection extends DomainResource { * @param value Series instance UID of the SOP instances in the selection. */ public SeriesComponent setUid(String value) { - if (Utilities.noString(value)) - this.uid = null; - else { if (this.uid == null) this.uid = new OidType(); this.uid.setValue(value); - } return this; } @@ -605,8 +608,7 @@ public class ImagingObjectSelection extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (uid == null || uid.isEmpty()) && (url == null || url.isEmpty()) && (instance == null || instance.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( uid, url, instance); } public String fhirType() { @@ -642,11 +644,11 @@ public class ImagingObjectSelection extends DomainResource { /** * Identity and location information of the frames in the selected instance. */ - @Child(name = "frames", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "frame", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="The frame set", formalDefinition="Identity and location information of the frames in the selected instance." ) - protected List frames; + protected List frame; - private static final long serialVersionUID = 1641180916L; + private static final long serialVersionUID = -1609681911L; /** * Constructor @@ -801,42 +803,42 @@ public class ImagingObjectSelection extends DomainResource { } /** - * @return {@link #frames} (Identity and location information of the frames in the selected instance.) + * @return {@link #frame} (Identity and location information of the frames in the selected instance.) */ - public List getFrames() { - if (this.frames == null) - this.frames = new ArrayList(); - return this.frames; + public List getFrame() { + if (this.frame == null) + this.frame = new ArrayList(); + return this.frame; } - public boolean hasFrames() { - if (this.frames == null) + public boolean hasFrame() { + if (this.frame == null) return false; - for (FramesComponent item : this.frames) + for (FramesComponent item : this.frame) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #frames} (Identity and location information of the frames in the selected instance.) + * @return {@link #frame} (Identity and location information of the frames in the selected instance.) */ // syntactic sugar - public FramesComponent addFrames() { //3 + public FramesComponent addFrame() { //3 FramesComponent t = new FramesComponent(); - if (this.frames == null) - this.frames = new ArrayList(); - this.frames.add(t); + if (this.frame == null) + this.frame = new ArrayList(); + this.frame.add(t); return t; } // syntactic sugar - public InstanceComponent addFrames(FramesComponent t) { //3 + public InstanceComponent addFrame(FramesComponent t) { //3 if (t == null) return this; - if (this.frames == null) - this.frames = new ArrayList(); - this.frames.add(t); + if (this.frame == null) + this.frame = new ArrayList(); + this.frame.add(t); return this; } @@ -845,7 +847,7 @@ public class ImagingObjectSelection extends DomainResource { childrenList.add(new Property("sopClass", "oid", "SOP class UID of the selected instance.", 0, java.lang.Integer.MAX_VALUE, sopClass)); childrenList.add(new Property("uid", "oid", "SOP Instance UID of the selected instance.", 0, java.lang.Integer.MAX_VALUE, uid)); childrenList.add(new Property("url", "uri", "WADO-RS URL to retrieve the DICOM SOP Instance.", 0, java.lang.Integer.MAX_VALUE, url)); - childrenList.add(new Property("frames", "", "Identity and location information of the frames in the selected instance.", 0, java.lang.Integer.MAX_VALUE, frames)); + childrenList.add(new Property("frame", "", "Identity and location information of the frames in the selected instance.", 0, java.lang.Integer.MAX_VALUE, frame)); } @Override @@ -856,8 +858,8 @@ public class ImagingObjectSelection extends DomainResource { this.uid = castToOid(value); // OidType else if (name.equals("url")) this.url = castToUri(value); // UriType - else if (name.equals("frames")) - this.getFrames().add((FramesComponent) value); + else if (name.equals("frame")) + this.getFrame().add((FramesComponent) value); else super.setProperty(name, value); } @@ -873,8 +875,8 @@ public class ImagingObjectSelection extends DomainResource { else if (name.equals("url")) { throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.url"); } - else if (name.equals("frames")) { - return addFrames(); + else if (name.equals("frame")) { + return addFrame(); } else return super.addChild(name); @@ -886,10 +888,10 @@ public class ImagingObjectSelection extends DomainResource { dst.sopClass = sopClass == null ? null : sopClass.copy(); dst.uid = uid == null ? null : uid.copy(); dst.url = url == null ? null : url.copy(); - if (frames != null) { - dst.frames = new ArrayList(); - for (FramesComponent i : frames) - dst.frames.add(i.copy()); + if (frame != null) { + dst.frame = new ArrayList(); + for (FramesComponent i : frame) + dst.frame.add(i.copy()); }; return dst; } @@ -902,7 +904,7 @@ public class ImagingObjectSelection extends DomainResource { return false; InstanceComponent o = (InstanceComponent) other; return compareDeep(sopClass, o.sopClass, true) && compareDeep(uid, o.uid, true) && compareDeep(url, o.url, true) - && compareDeep(frames, o.frames, true); + && compareDeep(frame, o.frame, true); } @Override @@ -917,8 +919,7 @@ public class ImagingObjectSelection extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sopClass == null || sopClass.isEmpty()) && (uid == null || uid.isEmpty()) - && (url == null || url.isEmpty()) && (frames == null || frames.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sopClass, uid, url, frame); } public String fhirType() { @@ -931,11 +932,11 @@ public class ImagingObjectSelection extends DomainResource { @Block() public static class FramesComponent extends BackboneElement implements IBaseBackboneElement { /** - * The frame numbers in the frame set. + * The specific frame reference within a multi-frame object. */ - @Child(name = "frameNumbers", type = {UnsignedIntType.class}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Frame numbers", formalDefinition="The frame numbers in the frame set." ) - protected List frameNumbers; + @Child(name = "number", type = {UnsignedIntType.class}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Frame reference number", formalDefinition="The specific frame reference within a multi-frame object." ) + protected List number; /** * WADO-RS URL to retrieve the DICOM frames. @@ -944,7 +945,7 @@ public class ImagingObjectSelection extends DomainResource { @Description(shortDefinition="Retrieve frame URL", formalDefinition="WADO-RS URL to retrieve the DICOM frames." ) protected UriType url; - private static final long serialVersionUID = -2068206970L; + private static final long serialVersionUID = 236505178L; /** * Constructor @@ -962,54 +963,54 @@ public class ImagingObjectSelection extends DomainResource { } /** - * @return {@link #frameNumbers} (The frame numbers in the frame set.) + * @return {@link #number} (The specific frame reference within a multi-frame object.) */ - public List getFrameNumbers() { - if (this.frameNumbers == null) - this.frameNumbers = new ArrayList(); - return this.frameNumbers; + public List getNumber() { + if (this.number == null) + this.number = new ArrayList(); + return this.number; } - public boolean hasFrameNumbers() { - if (this.frameNumbers == null) + public boolean hasNumber() { + if (this.number == null) return false; - for (UnsignedIntType item : this.frameNumbers) + for (UnsignedIntType item : this.number) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #frameNumbers} (The frame numbers in the frame set.) + * @return {@link #number} (The specific frame reference within a multi-frame object.) */ // syntactic sugar - public UnsignedIntType addFrameNumbersElement() {//2 + public UnsignedIntType addNumberElement() {//2 UnsignedIntType t = new UnsignedIntType(); - if (this.frameNumbers == null) - this.frameNumbers = new ArrayList(); - this.frameNumbers.add(t); + if (this.number == null) + this.number = new ArrayList(); + this.number.add(t); return t; } /** - * @param value {@link #frameNumbers} (The frame numbers in the frame set.) + * @param value {@link #number} (The specific frame reference within a multi-frame object.) */ - public FramesComponent addFrameNumbers(int value) { //1 + public FramesComponent addNumber(int value) { //1 UnsignedIntType t = new UnsignedIntType(); t.setValue(value); - if (this.frameNumbers == null) - this.frameNumbers = new ArrayList(); - this.frameNumbers.add(t); + if (this.number == null) + this.number = new ArrayList(); + this.number.add(t); return this; } /** - * @param value {@link #frameNumbers} (The frame numbers in the frame set.) + * @param value {@link #number} (The specific frame reference within a multi-frame object.) */ - public boolean hasFrameNumbers(int value) { - if (this.frameNumbers == null) + public boolean hasNumber(int value) { + if (this.number == null) return false; - for (UnsignedIntType v : this.frameNumbers) + for (UnsignedIntType v : this.number) if (v.equals(value)) // unsignedInt return true; return false; @@ -1062,14 +1063,14 @@ public class ImagingObjectSelection extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("frameNumbers", "unsignedInt", "The frame numbers in the frame set.", 0, java.lang.Integer.MAX_VALUE, frameNumbers)); + childrenList.add(new Property("number", "unsignedInt", "The specific frame reference within a multi-frame object.", 0, java.lang.Integer.MAX_VALUE, number)); childrenList.add(new Property("url", "uri", "WADO-RS URL to retrieve the DICOM frames.", 0, java.lang.Integer.MAX_VALUE, url)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("frameNumbers")) - this.getFrameNumbers().add(castToUnsignedInt(value)); + if (name.equals("number")) + this.getNumber().add(castToUnsignedInt(value)); else if (name.equals("url")) this.url = castToUri(value); // UriType else @@ -1078,8 +1079,8 @@ public class ImagingObjectSelection extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("frameNumbers")) { - throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.frameNumbers"); + if (name.equals("number")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.number"); } else if (name.equals("url")) { throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.url"); @@ -1091,10 +1092,10 @@ public class ImagingObjectSelection extends DomainResource { public FramesComponent copy() { FramesComponent dst = new FramesComponent(); copyValues(dst); - if (frameNumbers != null) { - dst.frameNumbers = new ArrayList(); - for (UnsignedIntType i : frameNumbers) - dst.frameNumbers.add(i.copy()); + if (number != null) { + dst.number = new ArrayList(); + for (UnsignedIntType i : number) + dst.number.add(i.copy()); }; dst.url = url == null ? null : url.copy(); return dst; @@ -1107,7 +1108,7 @@ public class ImagingObjectSelection extends DomainResource { if (!(other instanceof FramesComponent)) return false; FramesComponent o = (FramesComponent) other; - return compareDeep(frameNumbers, o.frameNumbers, true) && compareDeep(url, o.url, true); + return compareDeep(number, o.number, true) && compareDeep(url, o.url, true); } @Override @@ -1117,16 +1118,15 @@ public class ImagingObjectSelection extends DomainResource { if (!(other instanceof FramesComponent)) return false; FramesComponent o = (FramesComponent) other; - return compareValues(frameNumbers, o.frameNumbers, true) && compareValues(url, o.url, true); + return compareValues(number, o.number, true) && compareValues(url, o.url, true); } public boolean isEmpty() { - return super.isEmpty() && (frameNumbers == null || frameNumbers.isEmpty()) && (url == null || url.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( number, url); } public String fhirType() { - return "ImagingObjectSelection.study.series.instance.frames"; + return "ImagingObjectSelection.study.series.instance.frame"; } @@ -1152,23 +1152,16 @@ public class ImagingObjectSelection extends DomainResource { protected Patient patientTarget; /** - * The reason for, or significance of, the selection of objects referenced in the resource. + * Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image). */ - @Child(name = "title", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Reason for selection", formalDefinition="The reason for, or significance of, the selection of objects referenced in the resource." ) - protected CodeableConcept title; - - /** - * Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection. - */ - @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Description text", formalDefinition="Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection." ) - protected StringType description; + @Child(name = "authoringTime", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Time when the imaging object selection was created", formalDefinition="Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image)." ) + protected DateTimeType authoringTime; /** * Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion. */ - @Child(name = "author", type = {Practitioner.class, Device.class, Organization.class, Patient.class, RelatedPerson.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "author", type = {Practitioner.class, Device.class, Organization.class, Patient.class, RelatedPerson.class}, order=3, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Author (human or machine)", formalDefinition="Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion." ) protected Reference author; @@ -1178,11 +1171,18 @@ public class ImagingObjectSelection extends DomainResource { protected Resource authorTarget; /** - * Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image). + * The reason for, or significance of, the selection of objects referenced in the resource. */ - @Child(name = "authoringTime", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Authoring time of the selection", formalDefinition="Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image)." ) - protected DateTimeType authoringTime; + @Child(name = "title", type = {CodeableConcept.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reason for selection", formalDefinition="The reason for, or significance of, the selection of objects referenced in the resource." ) + protected CodeableConcept title; + + /** + * Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection. + */ + @Child(name = "description", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Description text", formalDefinition="Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection." ) + protected StringType description; /** * Study identity and locating information of the DICOM SOP instances in the selection. @@ -1191,7 +1191,7 @@ public class ImagingObjectSelection extends DomainResource { @Description(shortDefinition="Study identity of the selected instances", formalDefinition="Study identity and locating information of the DICOM SOP instances in the selection." ) protected List study; - private static final long serialVersionUID = -1961832713L; + private static final long serialVersionUID = 1428713335L; /** * Constructor @@ -1299,6 +1299,94 @@ public class ImagingObjectSelection extends DomainResource { return this; } + /** + * @return {@link #authoringTime} (Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).). This is the underlying object with id, value and extensions. The accessor "getAuthoringTime" gives direct access to the value + */ + public DateTimeType getAuthoringTimeElement() { + if (this.authoringTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingObjectSelection.authoringTime"); + else if (Configuration.doAutoCreate()) + this.authoringTime = new DateTimeType(); // bb + return this.authoringTime; + } + + public boolean hasAuthoringTimeElement() { + return this.authoringTime != null && !this.authoringTime.isEmpty(); + } + + public boolean hasAuthoringTime() { + return this.authoringTime != null && !this.authoringTime.isEmpty(); + } + + /** + * @param value {@link #authoringTime} (Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).). This is the underlying object with id, value and extensions. The accessor "getAuthoringTime" gives direct access to the value + */ + public ImagingObjectSelection setAuthoringTimeElement(DateTimeType value) { + this.authoringTime = value; + return this; + } + + /** + * @return Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image). + */ + public Date getAuthoringTime() { + return this.authoringTime == null ? null : this.authoringTime.getValue(); + } + + /** + * @param value Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image). + */ + public ImagingObjectSelection setAuthoringTime(Date value) { + if (value == null) + this.authoringTime = null; + else { + if (this.authoringTime == null) + this.authoringTime = new DateTimeType(); + this.authoringTime.setValue(value); + } + return this; + } + + /** + * @return {@link #author} (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) + */ + public Reference getAuthor() { + if (this.author == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingObjectSelection.author"); + else if (Configuration.doAutoCreate()) + this.author = new Reference(); // cc + return this.author; + } + + public boolean hasAuthor() { + return this.author != null && !this.author.isEmpty(); + } + + /** + * @param value {@link #author} (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) + */ + public ImagingObjectSelection setAuthor(Reference value) { + this.author = value; + return this; + } + + /** + * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) + */ + public Resource getAuthorTarget() { + return this.authorTarget; + } + + /** + * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) + */ + public ImagingObjectSelection setAuthorTarget(Resource value) { + this.authorTarget = value; + return this; + } + /** * @return {@link #title} (The reason for, or significance of, the selection of objects referenced in the resource.) */ @@ -1372,94 +1460,6 @@ public class ImagingObjectSelection extends DomainResource { return this; } - /** - * @return {@link #author} (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) - */ - public Reference getAuthor() { - if (this.author == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ImagingObjectSelection.author"); - else if (Configuration.doAutoCreate()) - this.author = new Reference(); // cc - return this.author; - } - - public boolean hasAuthor() { - return this.author != null && !this.author.isEmpty(); - } - - /** - * @param value {@link #author} (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) - */ - public ImagingObjectSelection setAuthor(Reference value) { - this.author = value; - return this; - } - - /** - * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) - */ - public Resource getAuthorTarget() { - return this.authorTarget; - } - - /** - * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) - */ - public ImagingObjectSelection setAuthorTarget(Resource value) { - this.authorTarget = value; - return this; - } - - /** - * @return {@link #authoringTime} (Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).). This is the underlying object with id, value and extensions. The accessor "getAuthoringTime" gives direct access to the value - */ - public DateTimeType getAuthoringTimeElement() { - if (this.authoringTime == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ImagingObjectSelection.authoringTime"); - else if (Configuration.doAutoCreate()) - this.authoringTime = new DateTimeType(); // bb - return this.authoringTime; - } - - public boolean hasAuthoringTimeElement() { - return this.authoringTime != null && !this.authoringTime.isEmpty(); - } - - public boolean hasAuthoringTime() { - return this.authoringTime != null && !this.authoringTime.isEmpty(); - } - - /** - * @param value {@link #authoringTime} (Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).). This is the underlying object with id, value and extensions. The accessor "getAuthoringTime" gives direct access to the value - */ - public ImagingObjectSelection setAuthoringTimeElement(DateTimeType value) { - this.authoringTime = value; - return this; - } - - /** - * @return Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image). - */ - public Date getAuthoringTime() { - return this.authoringTime == null ? null : this.authoringTime.getValue(); - } - - /** - * @param value Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image). - */ - public ImagingObjectSelection setAuthoringTime(Date value) { - if (value == null) - this.authoringTime = null; - else { - if (this.authoringTime == null) - this.authoringTime = new DateTimeType(); - this.authoringTime.setValue(value); - } - return this; - } - /** * @return {@link #study} (Study identity and locating information of the DICOM SOP instances in the selection.) */ @@ -1504,10 +1504,10 @@ public class ImagingObjectSelection extends DomainResource { super.listChildren(childrenList); childrenList.add(new Property("uid", "oid", "Instance UID of the DICOM KOS SOP Instances represented in this resource.", 0, java.lang.Integer.MAX_VALUE, uid)); childrenList.add(new Property("patient", "Reference(Patient)", "A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingObjectSelection.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("authoringTime", "dateTime", "Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).", 0, java.lang.Integer.MAX_VALUE, authoringTime)); + childrenList.add(new Property("author", "Reference(Practitioner|Device|Organization|Patient|RelatedPerson)", "Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.", 0, java.lang.Integer.MAX_VALUE, author)); childrenList.add(new Property("title", "CodeableConcept", "The reason for, or significance of, the selection of objects referenced in the resource.", 0, java.lang.Integer.MAX_VALUE, title)); childrenList.add(new Property("description", "string", "Text description of the DICOM SOP instances selected in the ImagingObjectSelection. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, description)); - childrenList.add(new Property("author", "Reference(Practitioner|Device|Organization|Patient|RelatedPerson)", "Author of ImagingObjectSelection. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.", 0, java.lang.Integer.MAX_VALUE, author)); - childrenList.add(new Property("authoringTime", "dateTime", "Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).", 0, java.lang.Integer.MAX_VALUE, authoringTime)); childrenList.add(new Property("study", "", "Study identity and locating information of the DICOM SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, study)); } @@ -1517,14 +1517,14 @@ public class ImagingObjectSelection extends DomainResource { this.uid = castToOid(value); // OidType else if (name.equals("patient")) this.patient = castToReference(value); // Reference + else if (name.equals("authoringTime")) + this.authoringTime = castToDateTime(value); // DateTimeType + else if (name.equals("author")) + this.author = castToReference(value); // Reference else if (name.equals("title")) this.title = castToCodeableConcept(value); // CodeableConcept else if (name.equals("description")) this.description = castToString(value); // StringType - else if (name.equals("author")) - this.author = castToReference(value); // Reference - else if (name.equals("authoringTime")) - this.authoringTime = castToDateTime(value); // DateTimeType else if (name.equals("study")) this.getStudy().add((StudyComponent) value); else @@ -1540,6 +1540,13 @@ public class ImagingObjectSelection extends DomainResource { this.patient = new Reference(); return this.patient; } + else if (name.equals("authoringTime")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.authoringTime"); + } + else if (name.equals("author")) { + this.author = new Reference(); + return this.author; + } else if (name.equals("title")) { this.title = new CodeableConcept(); return this.title; @@ -1547,13 +1554,6 @@ public class ImagingObjectSelection extends DomainResource { else if (name.equals("description")) { throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.description"); } - else if (name.equals("author")) { - this.author = new Reference(); - return this.author; - } - else if (name.equals("authoringTime")) { - throw new FHIRException("Cannot call addChild on a primitive type ImagingObjectSelection.authoringTime"); - } else if (name.equals("study")) { return addStudy(); } @@ -1571,10 +1571,10 @@ public class ImagingObjectSelection extends DomainResource { copyValues(dst); dst.uid = uid == null ? null : uid.copy(); dst.patient = patient == null ? null : patient.copy(); + dst.authoringTime = authoringTime == null ? null : authoringTime.copy(); + dst.author = author == null ? null : author.copy(); dst.title = title == null ? null : title.copy(); dst.description = description == null ? null : description.copy(); - dst.author = author == null ? null : author.copy(); - dst.authoringTime = authoringTime == null ? null : authoringTime.copy(); if (study != null) { dst.study = new ArrayList(); for (StudyComponent i : study) @@ -1594,8 +1594,8 @@ public class ImagingObjectSelection extends DomainResource { if (!(other instanceof ImagingObjectSelection)) return false; ImagingObjectSelection o = (ImagingObjectSelection) other; - return compareDeep(uid, o.uid, true) && compareDeep(patient, o.patient, true) && compareDeep(title, o.title, true) - && compareDeep(description, o.description, true) && compareDeep(author, o.author, true) && compareDeep(authoringTime, o.authoringTime, true) + return compareDeep(uid, o.uid, true) && compareDeep(patient, o.patient, true) && compareDeep(authoringTime, o.authoringTime, true) + && compareDeep(author, o.author, true) && compareDeep(title, o.title, true) && compareDeep(description, o.description, true) && compareDeep(study, o.study, true); } @@ -1606,15 +1606,13 @@ public class ImagingObjectSelection extends DomainResource { if (!(other instanceof ImagingObjectSelection)) return false; ImagingObjectSelection o = (ImagingObjectSelection) other; - return compareValues(uid, o.uid, true) && compareValues(description, o.description, true) && compareValues(authoringTime, o.authoringTime, true) + return compareValues(uid, o.uid, true) && compareValues(authoringTime, o.authoringTime, true) && compareValues(description, o.description, true) ; } public boolean isEmpty() { - return super.isEmpty() && (uid == null || uid.isEmpty()) && (patient == null || patient.isEmpty()) - && (title == null || title.isEmpty()) && (description == null || description.isEmpty()) && (author == null || author.isEmpty()) - && (authoringTime == null || authoringTime.isEmpty()) && (study == null || study.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( uid, patient, authoringTime, author + , title, description, study); } @Override @@ -1690,7 +1688,7 @@ public class ImagingObjectSelection extends DomainResource { * Path: ImagingObjectSelection.author
*

*/ - @SearchParamDefinition(name="author", path="ImagingObjectSelection.author", description="Author of key DICOM object selection", type="reference" ) + @SearchParamDefinition(name="author", path="ImagingObjectSelection.author", description="Author of key DICOM object selection", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_AUTHOR = "author"; /** * Fluent Client search parameter constant for author @@ -1716,7 +1714,7 @@ public class ImagingObjectSelection extends DomainResource { * Path: ImagingObjectSelection.patient
*

*/ - @SearchParamDefinition(name="patient", path="ImagingObjectSelection.patient", description="Subject of key DICOM object selection", type="reference" ) + @SearchParamDefinition(name="patient", path="ImagingObjectSelection.patient", description="Subject of key DICOM object selection", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImagingStudy.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImagingStudy.java index 47444cbc880..44e8fe7cd0b 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImagingStudy.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImagingStudy.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities. */ @@ -169,32 +168,32 @@ public class ImagingStudy extends DomainResource { @Block() public static class ImagingStudySeriesComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Formal identifier for this series. + */ + @Child(name = "uid", type = {OidType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Formal identifier for this series", formalDefinition="Formal identifier for this series." ) + protected OidType uid; + /** * The Numeric identifier of this series in the study. */ - @Child(name = "number", type = {UnsignedIntType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Child(name = "number", type = {UnsignedIntType.class}, order=2, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Numeric identifier of this series", formalDefinition="The Numeric identifier of this series in the study." ) protected UnsignedIntType number; /** * The modality of this series sequence. */ - @Child(name = "modality", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Child(name = "modality", type = {Coding.class}, order=3, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="The modality of the instances in the series", formalDefinition="The modality of this series sequence." ) protected Coding modality; - /** - * Formal identifier for this series. - */ - @Child(name = "uid", type = {OidType.class}, order=3, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Formal identifier for this series", formalDefinition="Formal identifier for this series." ) - protected OidType uid; - /** * A description of the series. */ @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="A description of the series", formalDefinition="A description of the series." ) + @Description(shortDefinition="A short human readable summary of the series", formalDefinition="A description of the series." ) protected StringType description; /** @@ -246,7 +245,7 @@ public class ImagingStudy extends DomainResource { @Description(shortDefinition="A single SOP instance from the series", formalDefinition="A single SOP Instance within the series, e.g. an image, or presentation state." ) protected List instance; - private static final long serialVersionUID = -1798366943L; + private static final long serialVersionUID = 42813749L; /** * Constructor @@ -258,13 +257,58 @@ public class ImagingStudy extends DomainResource { /** * Constructor */ - public ImagingStudySeriesComponent(Coding modality, OidType uid, UnsignedIntType numberOfInstances) { + public ImagingStudySeriesComponent(OidType uid, Coding modality, UnsignedIntType numberOfInstances) { super(); - this.modality = modality; this.uid = uid; + this.modality = modality; this.numberOfInstances = numberOfInstances; } + /** + * @return {@link #uid} (Formal identifier for this series.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public OidType getUidElement() { + if (this.uid == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudySeriesComponent.uid"); + else if (Configuration.doAutoCreate()) + this.uid = new OidType(); // bb + return this.uid; + } + + public boolean hasUidElement() { + return this.uid != null && !this.uid.isEmpty(); + } + + public boolean hasUid() { + return this.uid != null && !this.uid.isEmpty(); + } + + /** + * @param value {@link #uid} (Formal identifier for this series.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value + */ + public ImagingStudySeriesComponent setUidElement(OidType value) { + this.uid = value; + return this; + } + + /** + * @return Formal identifier for this series. + */ + public String getUid() { + return this.uid == null ? null : this.uid.getValue(); + } + + /** + * @param value Formal identifier for this series. + */ + public ImagingStudySeriesComponent setUid(String value) { + if (this.uid == null) + this.uid = new OidType(); + this.uid.setValue(value); + return this; + } + /** * @return {@link #number} (The Numeric identifier of this series in the study.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value */ @@ -334,51 +378,6 @@ public class ImagingStudy extends DomainResource { return this; } - /** - * @return {@link #uid} (Formal identifier for this series.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value - */ - public OidType getUidElement() { - if (this.uid == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ImagingStudySeriesComponent.uid"); - else if (Configuration.doAutoCreate()) - this.uid = new OidType(); // bb - return this.uid; - } - - public boolean hasUidElement() { - return this.uid != null && !this.uid.isEmpty(); - } - - public boolean hasUid() { - return this.uid != null && !this.uid.isEmpty(); - } - - /** - * @param value {@link #uid} (Formal identifier for this series.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value - */ - public ImagingStudySeriesComponent setUidElement(OidType value) { - this.uid = value; - return this; - } - - /** - * @return Formal identifier for this series. - */ - public String getUid() { - return this.uid == null ? null : this.uid.getValue(); - } - - /** - * @param value Formal identifier for this series. - */ - public ImagingStudySeriesComponent setUid(String value) { - if (this.uid == null) - this.uid = new OidType(); - this.uid.setValue(value); - return this; - } - /** * @return {@link #description} (A description of the series.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value */ @@ -710,9 +709,9 @@ public class ImagingStudy extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); + childrenList.add(new Property("uid", "oid", "Formal identifier for this series.", 0, java.lang.Integer.MAX_VALUE, uid)); childrenList.add(new Property("number", "unsignedInt", "The Numeric identifier of this series in the study.", 0, java.lang.Integer.MAX_VALUE, number)); childrenList.add(new Property("modality", "Coding", "The modality of this series sequence.", 0, java.lang.Integer.MAX_VALUE, modality)); - childrenList.add(new Property("uid", "oid", "Formal identifier for this series.", 0, java.lang.Integer.MAX_VALUE, uid)); childrenList.add(new Property("description", "string", "A description of the series.", 0, java.lang.Integer.MAX_VALUE, description)); childrenList.add(new Property("numberOfInstances", "unsignedInt", "Number of SOP Instances in Series.", 0, java.lang.Integer.MAX_VALUE, numberOfInstances)); childrenList.add(new Property("availability", "code", "Availability of series (online, offline or nearline).", 0, java.lang.Integer.MAX_VALUE, availability)); @@ -725,12 +724,12 @@ public class ImagingStudy extends DomainResource { @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("number")) + if (name.equals("uid")) + this.uid = castToOid(value); // OidType + else if (name.equals("number")) this.number = castToUnsignedInt(value); // UnsignedIntType else if (name.equals("modality")) this.modality = castToCoding(value); // Coding - else if (name.equals("uid")) - this.uid = castToOid(value); // OidType else if (name.equals("description")) this.description = castToString(value); // StringType else if (name.equals("numberOfInstances")) @@ -753,16 +752,16 @@ public class ImagingStudy extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("number")) { + if (name.equals("uid")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.uid"); + } + else if (name.equals("number")) { throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.number"); } else if (name.equals("modality")) { this.modality = new Coding(); return this.modality; } - else if (name.equals("uid")) { - throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.uid"); - } else if (name.equals("description")) { throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.description"); } @@ -796,9 +795,9 @@ public class ImagingStudy extends DomainResource { public ImagingStudySeriesComponent copy() { ImagingStudySeriesComponent dst = new ImagingStudySeriesComponent(); copyValues(dst); + dst.uid = uid == null ? null : uid.copy(); dst.number = number == null ? null : number.copy(); dst.modality = modality == null ? null : modality.copy(); - dst.uid = uid == null ? null : uid.copy(); dst.description = description == null ? null : description.copy(); dst.numberOfInstances = numberOfInstances == null ? null : numberOfInstances.copy(); dst.availability = availability == null ? null : availability.copy(); @@ -821,7 +820,7 @@ public class ImagingStudy extends DomainResource { if (!(other instanceof ImagingStudySeriesComponent)) return false; ImagingStudySeriesComponent o = (ImagingStudySeriesComponent) other; - return compareDeep(number, o.number, true) && compareDeep(modality, o.modality, true) && compareDeep(uid, o.uid, true) + return compareDeep(uid, o.uid, true) && compareDeep(number, o.number, true) && compareDeep(modality, o.modality, true) && compareDeep(description, o.description, true) && compareDeep(numberOfInstances, o.numberOfInstances, true) && compareDeep(availability, o.availability, true) && compareDeep(url, o.url, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(laterality, o.laterality, true) && compareDeep(started, o.started, true) && compareDeep(instance, o.instance, true) @@ -835,17 +834,14 @@ public class ImagingStudy extends DomainResource { if (!(other instanceof ImagingStudySeriesComponent)) return false; ImagingStudySeriesComponent o = (ImagingStudySeriesComponent) other; - return compareValues(number, o.number, true) && compareValues(uid, o.uid, true) && compareValues(description, o.description, true) + return compareValues(uid, o.uid, true) && compareValues(number, o.number, true) && compareValues(description, o.description, true) && compareValues(numberOfInstances, o.numberOfInstances, true) && compareValues(availability, o.availability, true) && compareValues(url, o.url, true) && compareValues(started, o.started, true); } public boolean isEmpty() { - return super.isEmpty() && (number == null || number.isEmpty()) && (modality == null || modality.isEmpty()) - && (uid == null || uid.isEmpty()) && (description == null || description.isEmpty()) && (numberOfInstances == null || numberOfInstances.isEmpty()) - && (availability == null || availability.isEmpty()) && (url == null || url.isEmpty()) && (bodySite == null || bodySite.isEmpty()) - && (laterality == null || laterality.isEmpty()) && (started == null || started.isEmpty()) - && (instance == null || instance.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( uid, number, modality, description + , numberOfInstances, availability, url, bodySite, laterality, started, instance); } public String fhirType() { @@ -857,20 +853,20 @@ public class ImagingStudy extends DomainResource { @Block() public static class ImagingStudySeriesInstanceComponent extends BackboneElement implements IBaseBackboneElement { - /** - * The number of instance in the series. - */ - @Child(name = "number", type = {UnsignedIntType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The number of this instance in the series", formalDefinition="The number of instance in the series." ) - protected UnsignedIntType number; - /** * Formal identifier for this image or other content. */ - @Child(name = "uid", type = {OidType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Child(name = "uid", type = {OidType.class}, order=1, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Formal identifier for this instance", formalDefinition="Formal identifier for this image or other content." ) protected OidType uid; + /** + * The number of instance in the series. + */ + @Child(name = "number", type = {UnsignedIntType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The number of this instance in the series", formalDefinition="The number of instance in the series." ) + protected UnsignedIntType number; + /** * DICOM instance type. */ @@ -896,10 +892,10 @@ public class ImagingStudy extends DomainResource { * Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance. */ @Child(name = "content", type = {Attachment.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Content of the instance", formalDefinition="Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance." ) + @Description(shortDefinition="The instance payload, such as the image binary data or URL to it", formalDefinition="Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance." ) protected List content; - private static final long serialVersionUID = -1450403705L; + private static final long serialVersionUID = -693669901L; /** * Constructor @@ -917,51 +913,6 @@ public class ImagingStudy extends DomainResource { this.sopClass = sopClass; } - /** - * @return {@link #number} (The number of instance in the series.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value - */ - public UnsignedIntType getNumberElement() { - if (this.number == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.number"); - else if (Configuration.doAutoCreate()) - this.number = new UnsignedIntType(); // bb - return this.number; - } - - public boolean hasNumberElement() { - return this.number != null && !this.number.isEmpty(); - } - - public boolean hasNumber() { - return this.number != null && !this.number.isEmpty(); - } - - /** - * @param value {@link #number} (The number of instance in the series.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value - */ - public ImagingStudySeriesInstanceComponent setNumberElement(UnsignedIntType value) { - this.number = value; - return this; - } - - /** - * @return The number of instance in the series. - */ - public int getNumber() { - return this.number == null || this.number.isEmpty() ? 0 : this.number.getValue(); - } - - /** - * @param value The number of instance in the series. - */ - public ImagingStudySeriesInstanceComponent setNumber(int value) { - if (this.number == null) - this.number = new UnsignedIntType(); - this.number.setValue(value); - return this; - } - /** * @return {@link #uid} (Formal identifier for this image or other content.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value */ @@ -1007,6 +958,51 @@ public class ImagingStudy extends DomainResource { return this; } + /** + * @return {@link #number} (The number of instance in the series.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + */ + public UnsignedIntType getNumberElement() { + if (this.number == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.number"); + else if (Configuration.doAutoCreate()) + this.number = new UnsignedIntType(); // bb + return this.number; + } + + public boolean hasNumberElement() { + return this.number != null && !this.number.isEmpty(); + } + + public boolean hasNumber() { + return this.number != null && !this.number.isEmpty(); + } + + /** + * @param value {@link #number} (The number of instance in the series.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value + */ + public ImagingStudySeriesInstanceComponent setNumberElement(UnsignedIntType value) { + this.number = value; + return this; + } + + /** + * @return The number of instance in the series. + */ + public int getNumber() { + return this.number == null || this.number.isEmpty() ? 0 : this.number.getValue(); + } + + /** + * @param value The number of instance in the series. + */ + public ImagingStudySeriesInstanceComponent setNumber(int value) { + if (this.number == null) + this.number = new UnsignedIntType(); + this.number.setValue(value); + return this; + } + /** * @return {@link #sopClass} (DICOM instance type.). This is the underlying object with id, value and extensions. The accessor "getSopClass" gives direct access to the value */ @@ -1192,8 +1188,8 @@ public class ImagingStudy extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("number", "unsignedInt", "The number of instance in the series.", 0, java.lang.Integer.MAX_VALUE, number)); childrenList.add(new Property("uid", "oid", "Formal identifier for this image or other content.", 0, java.lang.Integer.MAX_VALUE, uid)); + childrenList.add(new Property("number", "unsignedInt", "The number of instance in the series.", 0, java.lang.Integer.MAX_VALUE, number)); childrenList.add(new Property("sopClass", "oid", "DICOM instance type.", 0, java.lang.Integer.MAX_VALUE, sopClass)); childrenList.add(new Property("type", "string", "A human-friendly SOP Class name.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("title", "string", "The description of the instance.", 0, java.lang.Integer.MAX_VALUE, title)); @@ -1202,10 +1198,10 @@ public class ImagingStudy extends DomainResource { @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("number")) - this.number = castToUnsignedInt(value); // UnsignedIntType - else if (name.equals("uid")) + if (name.equals("uid")) this.uid = castToOid(value); // OidType + else if (name.equals("number")) + this.number = castToUnsignedInt(value); // UnsignedIntType else if (name.equals("sopClass")) this.sopClass = castToOid(value); // OidType else if (name.equals("type")) @@ -1220,12 +1216,12 @@ public class ImagingStudy extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("number")) { - throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.number"); - } - else if (name.equals("uid")) { + if (name.equals("uid")) { throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.uid"); } + else if (name.equals("number")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.number"); + } else if (name.equals("sopClass")) { throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.sopClass"); } @@ -1245,8 +1241,8 @@ public class ImagingStudy extends DomainResource { public ImagingStudySeriesInstanceComponent copy() { ImagingStudySeriesInstanceComponent dst = new ImagingStudySeriesInstanceComponent(); copyValues(dst); - dst.number = number == null ? null : number.copy(); dst.uid = uid == null ? null : uid.copy(); + dst.number = number == null ? null : number.copy(); dst.sopClass = sopClass == null ? null : sopClass.copy(); dst.type = type == null ? null : type.copy(); dst.title = title == null ? null : title.copy(); @@ -1265,7 +1261,7 @@ public class ImagingStudy extends DomainResource { if (!(other instanceof ImagingStudySeriesInstanceComponent)) return false; ImagingStudySeriesInstanceComponent o = (ImagingStudySeriesInstanceComponent) other; - return compareDeep(number, o.number, true) && compareDeep(uid, o.uid, true) && compareDeep(sopClass, o.sopClass, true) + return compareDeep(uid, o.uid, true) && compareDeep(number, o.number, true) && compareDeep(sopClass, o.sopClass, true) && compareDeep(type, o.type, true) && compareDeep(title, o.title, true) && compareDeep(content, o.content, true) ; } @@ -1277,14 +1273,13 @@ public class ImagingStudy extends DomainResource { if (!(other instanceof ImagingStudySeriesInstanceComponent)) return false; ImagingStudySeriesInstanceComponent o = (ImagingStudySeriesInstanceComponent) other; - return compareValues(number, o.number, true) && compareValues(uid, o.uid, true) && compareValues(sopClass, o.sopClass, true) + return compareValues(uid, o.uid, true) && compareValues(number, o.number, true) && compareValues(sopClass, o.sopClass, true) && compareValues(type, o.type, true) && compareValues(title, o.title, true); } public boolean isEmpty() { - return super.isEmpty() && (number == null || number.isEmpty()) && (uid == null || uid.isEmpty()) - && (sopClass == null || sopClass.isEmpty()) && (type == null || type.isEmpty()) && (title == null || title.isEmpty()) - && (content == null || content.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( uid, number, sopClass, type + , title, content); } public String fhirType() { @@ -1295,16 +1290,44 @@ public class ImagingStudy extends DomainResource { } /** - * Date and Time the study started. + * Formal identifier for the study. */ - @Child(name = "started", type = {DateTimeType.class}, order=0, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="When the study was started", formalDefinition="Date and Time the study started." ) - protected DateTimeType started; + @Child(name = "uid", type = {OidType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Formal identifier for the study", formalDefinition="Formal identifier for the study." ) + protected OidType uid; + + /** + * Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf). + */ + @Child(name = "accession", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Related workflow identifier (\"Accession Number\")", formalDefinition="Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf)." ) + protected Identifier accession; + + /** + * Other identifiers for the study. + */ + @Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Other identifiers for the study", formalDefinition="Other identifiers for the study." ) + protected List identifier; + + /** + * Availability of study (online, offline or nearline). + */ + @Child(name = "availability", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="ONLINE | OFFLINE | NEARLINE | UNAVAILABLE (0008,0056)", formalDefinition="Availability of study (online, offline or nearline)." ) + protected Enumeration availability; + + /** + * A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19). + */ + @Child(name = "modalityList", type = {Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="All series modality if actual acquisition modalities", formalDefinition="A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19)." ) + protected List modalityList; /** * The patient imaged in the study. */ - @Child(name = "patient", type = {Patient.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Child(name = "patient", type = {Patient.class}, order=5, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Who the images are of", formalDefinition="The patient imaged in the study." ) protected Reference patient; @@ -1314,30 +1337,16 @@ public class ImagingStudy extends DomainResource { protected Patient patientTarget; /** - * Formal identifier for the study. + * Date and Time the study started. */ - @Child(name = "uid", type = {OidType.class}, order=2, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Formal identifier for the study", formalDefinition="Formal identifier for the study." ) - protected OidType uid; - - /** - * Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf). - */ - @Child(name = "accession", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Related workflow identifier (\"Accession Number\")", formalDefinition="Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf)." ) - protected Identifier accession; - - /** - * Other identifiers for the study. - */ - @Child(name = "identifier", type = {Identifier.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Other identifiers for the study", formalDefinition="Other identifiers for the study." ) - protected List identifier; + @Child(name = "started", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="When the study was started", formalDefinition="Date and Time the study started." ) + protected DateTimeType started; /** * A list of the diagnostic orders that resulted in this imaging study being performed. */ - @Child(name = "order", type = {DiagnosticOrder.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "order", type = {DiagnosticOrder.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Order(s) that caused this study to be performed", formalDefinition="A list of the diagnostic orders that resulted in this imaging study being performed." ) protected List order; /** @@ -1346,17 +1355,10 @@ public class ImagingStudy extends DomainResource { protected List orderTarget; - /** - * A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19). - */ - @Child(name = "modalityList", type = {Coding.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="All series modality if actual acquisition modalities", formalDefinition="A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19)." ) - protected List modalityList; - /** * The requesting/referring physician. */ - @Child(name = "referrer", type = {Practitioner.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "referrer", type = {Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Referring physician (0008,0090)", formalDefinition="The requesting/referring physician." ) protected Reference referrer; @@ -1365,50 +1367,10 @@ public class ImagingStudy extends DomainResource { */ protected Practitioner referrerTarget; - /** - * Availability of study (online, offline or nearline). - */ - @Child(name = "availability", type = {CodeType.class}, order=8, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="ONLINE | OFFLINE | NEARLINE | UNAVAILABLE (0008,0056)", formalDefinition="Availability of study (online, offline or nearline)." ) - protected Enumeration availability; - - /** - * WADO-RS resource where Study is available. - */ - @Child(name = "url", type = {UriType.class}, order=9, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Retrieve URI", formalDefinition="WADO-RS resource where Study is available." ) - protected UriType url; - - /** - * Number of Series in Study. - */ - @Child(name = "numberOfSeries", type = {UnsignedIntType.class}, order=10, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Number of Study Related Series", formalDefinition="Number of Series in Study." ) - protected UnsignedIntType numberOfSeries; - - /** - * Number of SOP Instances in Study. - */ - @Child(name = "numberOfInstances", type = {UnsignedIntType.class}, order=11, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Number of Study Related Instances", formalDefinition="Number of SOP Instances in Study." ) - protected UnsignedIntType numberOfInstances; - - /** - * Type of procedure performed. - */ - @Child(name = "procedure", type = {Procedure.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Type of procedure performed", formalDefinition="Type of procedure performed." ) - protected List procedure; - /** - * The actual objects that are the target of the reference (Type of procedure performed.) - */ - protected List procedureTarget; - - /** * Who read the study and interpreted the images or other content. */ - @Child(name = "interpreter", type = {Practitioner.class}, order=13, min=0, max=1, modifier=false, summary=true) + @Child(name = "interpreter", type = {Practitioner.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Who interpreted images", formalDefinition="Who read the study and interpreted the images or other content." ) protected Reference interpreter; @@ -1417,6 +1379,39 @@ public class ImagingStudy extends DomainResource { */ protected Practitioner interpreterTarget; + /** + * WADO-RS resource where Study is available. + */ + @Child(name = "url", type = {UriType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Retrieve URI", formalDefinition="WADO-RS resource where Study is available." ) + protected UriType url; + + /** + * Number of Series in Study. + */ + @Child(name = "numberOfSeries", type = {UnsignedIntType.class}, order=11, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Number of Study Related Series", formalDefinition="Number of Series in Study." ) + protected UnsignedIntType numberOfSeries; + + /** + * Number of SOP Instances in Study. + */ + @Child(name = "numberOfInstances", type = {UnsignedIntType.class}, order=12, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Number of Study Related Instances", formalDefinition="Number of SOP Instances in Study." ) + protected UnsignedIntType numberOfInstances; + + /** + * Type of procedure performed. + */ + @Child(name = "procedure", type = {Procedure.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Type of procedure performed", formalDefinition="Type of procedure performed." ) + protected List procedure; + /** + * The actual objects that are the target of the reference (Type of procedure performed.) + */ + protected List procedureTarget; + + /** * Institution-generated description or classification of the Study performed. */ @@ -1431,7 +1426,7 @@ public class ImagingStudy extends DomainResource { @Description(shortDefinition="Each study has one or more series of instances", formalDefinition="Each study has one or more series of images or other content." ) protected List series; - private static final long serialVersionUID = 1895046380L; + private static final long serialVersionUID = 1998463596L; /** * Constructor @@ -1443,107 +1438,14 @@ public class ImagingStudy extends DomainResource { /** * Constructor */ - public ImagingStudy(Reference patient, OidType uid, UnsignedIntType numberOfSeries, UnsignedIntType numberOfInstances) { + public ImagingStudy(OidType uid, Reference patient, UnsignedIntType numberOfSeries, UnsignedIntType numberOfInstances) { super(); - this.patient = patient; this.uid = uid; + this.patient = patient; this.numberOfSeries = numberOfSeries; this.numberOfInstances = numberOfInstances; } - /** - * @return {@link #started} (Date and Time the study started.). This is the underlying object with id, value and extensions. The accessor "getStarted" gives direct access to the value - */ - public DateTimeType getStartedElement() { - if (this.started == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ImagingStudy.started"); - else if (Configuration.doAutoCreate()) - this.started = new DateTimeType(); // bb - return this.started; - } - - public boolean hasStartedElement() { - return this.started != null && !this.started.isEmpty(); - } - - public boolean hasStarted() { - return this.started != null && !this.started.isEmpty(); - } - - /** - * @param value {@link #started} (Date and Time the study started.). This is the underlying object with id, value and extensions. The accessor "getStarted" gives direct access to the value - */ - public ImagingStudy setStartedElement(DateTimeType value) { - this.started = value; - return this; - } - - /** - * @return Date and Time the study started. - */ - public Date getStarted() { - return this.started == null ? null : this.started.getValue(); - } - - /** - * @param value Date and Time the study started. - */ - public ImagingStudy setStarted(Date value) { - if (value == null) - this.started = null; - else { - if (this.started == null) - this.started = new DateTimeType(); - this.started.setValue(value); - } - return this; - } - - /** - * @return {@link #patient} (The patient imaged in the study.) - */ - public Reference getPatient() { - if (this.patient == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ImagingStudy.patient"); - else if (Configuration.doAutoCreate()) - this.patient = new Reference(); // cc - return this.patient; - } - - public boolean hasPatient() { - return this.patient != null && !this.patient.isEmpty(); - } - - /** - * @param value {@link #patient} (The patient imaged in the study.) - */ - public ImagingStudy setPatient(Reference value) { - this.patient = value; - return this; - } - - /** - * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient imaged in the study.) - */ - public Patient getPatientTarget() { - if (this.patientTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ImagingStudy.patient"); - else if (Configuration.doAutoCreate()) - this.patientTarget = new Patient(); // aa - return this.patientTarget; - } - - /** - * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient imaged in the study.) - */ - public ImagingStudy setPatientTarget(Patient value) { - this.patientTarget = value; - return this; - } - /** * @return {@link #uid} (Formal identifier for the study.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value */ @@ -1653,6 +1555,188 @@ public class ImagingStudy extends DomainResource { return this; } + /** + * @return {@link #availability} (Availability of study (online, offline or nearline).). This is the underlying object with id, value and extensions. The accessor "getAvailability" gives direct access to the value + */ + public Enumeration getAvailabilityElement() { + if (this.availability == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.availability"); + else if (Configuration.doAutoCreate()) + this.availability = new Enumeration(new InstanceAvailabilityEnumFactory()); // bb + return this.availability; + } + + public boolean hasAvailabilityElement() { + return this.availability != null && !this.availability.isEmpty(); + } + + public boolean hasAvailability() { + return this.availability != null && !this.availability.isEmpty(); + } + + /** + * @param value {@link #availability} (Availability of study (online, offline or nearline).). This is the underlying object with id, value and extensions. The accessor "getAvailability" gives direct access to the value + */ + public ImagingStudy setAvailabilityElement(Enumeration value) { + this.availability = value; + return this; + } + + /** + * @return Availability of study (online, offline or nearline). + */ + public InstanceAvailability getAvailability() { + return this.availability == null ? null : this.availability.getValue(); + } + + /** + * @param value Availability of study (online, offline or nearline). + */ + public ImagingStudy setAvailability(InstanceAvailability value) { + if (value == null) + this.availability = null; + else { + if (this.availability == null) + this.availability = new Enumeration(new InstanceAvailabilityEnumFactory()); + this.availability.setValue(value); + } + return this; + } + + /** + * @return {@link #modalityList} (A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).) + */ + public List getModalityList() { + if (this.modalityList == null) + this.modalityList = new ArrayList(); + return this.modalityList; + } + + public boolean hasModalityList() { + if (this.modalityList == null) + return false; + for (Coding item : this.modalityList) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #modalityList} (A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).) + */ + // syntactic sugar + public Coding addModalityList() { //3 + Coding t = new Coding(); + if (this.modalityList == null) + this.modalityList = new ArrayList(); + this.modalityList.add(t); + return t; + } + + // syntactic sugar + public ImagingStudy addModalityList(Coding t) { //3 + if (t == null) + return this; + if (this.modalityList == null) + this.modalityList = new ArrayList(); + this.modalityList.add(t); + return this; + } + + /** + * @return {@link #patient} (The patient imaged in the study.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (The patient imaged in the study.) + */ + public ImagingStudy setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient imaged in the study.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient imaged in the study.) + */ + public ImagingStudy setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #started} (Date and Time the study started.). This is the underlying object with id, value and extensions. The accessor "getStarted" gives direct access to the value + */ + public DateTimeType getStartedElement() { + if (this.started == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.started"); + else if (Configuration.doAutoCreate()) + this.started = new DateTimeType(); // bb + return this.started; + } + + public boolean hasStartedElement() { + return this.started != null && !this.started.isEmpty(); + } + + public boolean hasStarted() { + return this.started != null && !this.started.isEmpty(); + } + + /** + * @param value {@link #started} (Date and Time the study started.). This is the underlying object with id, value and extensions. The accessor "getStarted" gives direct access to the value + */ + public ImagingStudy setStartedElement(DateTimeType value) { + this.started = value; + return this; + } + + /** + * @return Date and Time the study started. + */ + public Date getStarted() { + return this.started == null ? null : this.started.getValue(); + } + + /** + * @param value Date and Time the study started. + */ + public ImagingStudy setStarted(Date value) { + if (value == null) + this.started = null; + else { + if (this.started == null) + this.started = new DateTimeType(); + this.started.setValue(value); + } + return this; + } + /** * @return {@link #order} (A list of the diagnostic orders that resulted in this imaging study being performed.) */ @@ -1714,46 +1798,6 @@ public class ImagingStudy extends DomainResource { return r; } - /** - * @return {@link #modalityList} (A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).) - */ - public List getModalityList() { - if (this.modalityList == null) - this.modalityList = new ArrayList(); - return this.modalityList; - } - - public boolean hasModalityList() { - if (this.modalityList == null) - return false; - for (Coding item : this.modalityList) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #modalityList} (A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).) - */ - // syntactic sugar - public Coding addModalityList() { //3 - Coding t = new Coding(); - if (this.modalityList == null) - this.modalityList = new ArrayList(); - this.modalityList.add(t); - return t; - } - - // syntactic sugar - public ImagingStudy addModalityList(Coding t) { //3 - if (t == null) - return this; - if (this.modalityList == null) - this.modalityList = new ArrayList(); - this.modalityList.add(t); - return this; - } - /** * @return {@link #referrer} (The requesting/referring physician.) */ @@ -1799,51 +1843,46 @@ public class ImagingStudy extends DomainResource { } /** - * @return {@link #availability} (Availability of study (online, offline or nearline).). This is the underlying object with id, value and extensions. The accessor "getAvailability" gives direct access to the value + * @return {@link #interpreter} (Who read the study and interpreted the images or other content.) */ - public Enumeration getAvailabilityElement() { - if (this.availability == null) + public Reference getInterpreter() { + if (this.interpreter == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ImagingStudy.availability"); + throw new Error("Attempt to auto-create ImagingStudy.interpreter"); else if (Configuration.doAutoCreate()) - this.availability = new Enumeration(new InstanceAvailabilityEnumFactory()); // bb - return this.availability; + this.interpreter = new Reference(); // cc + return this.interpreter; } - public boolean hasAvailabilityElement() { - return this.availability != null && !this.availability.isEmpty(); - } - - public boolean hasAvailability() { - return this.availability != null && !this.availability.isEmpty(); + public boolean hasInterpreter() { + return this.interpreter != null && !this.interpreter.isEmpty(); } /** - * @param value {@link #availability} (Availability of study (online, offline or nearline).). This is the underlying object with id, value and extensions. The accessor "getAvailability" gives direct access to the value + * @param value {@link #interpreter} (Who read the study and interpreted the images or other content.) */ - public ImagingStudy setAvailabilityElement(Enumeration value) { - this.availability = value; + public ImagingStudy setInterpreter(Reference value) { + this.interpreter = value; return this; } /** - * @return Availability of study (online, offline or nearline). + * @return {@link #interpreter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who read the study and interpreted the images or other content.) */ - public InstanceAvailability getAvailability() { - return this.availability == null ? null : this.availability.getValue(); + public Practitioner getInterpreterTarget() { + if (this.interpreterTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ImagingStudy.interpreter"); + else if (Configuration.doAutoCreate()) + this.interpreterTarget = new Practitioner(); // aa + return this.interpreterTarget; } /** - * @param value Availability of study (online, offline or nearline). + * @param value {@link #interpreter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who read the study and interpreted the images or other content.) */ - public ImagingStudy setAvailability(InstanceAvailability value) { - if (value == null) - this.availability = null; - else { - if (this.availability == null) - this.availability = new Enumeration(new InstanceAvailabilityEnumFactory()); - this.availability.setValue(value); - } + public ImagingStudy setInterpreterTarget(Practitioner value) { + this.interpreterTarget = value; return this; } @@ -2047,50 +2086,6 @@ public class ImagingStudy extends DomainResource { return r; } - /** - * @return {@link #interpreter} (Who read the study and interpreted the images or other content.) - */ - public Reference getInterpreter() { - if (this.interpreter == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ImagingStudy.interpreter"); - else if (Configuration.doAutoCreate()) - this.interpreter = new Reference(); // cc - return this.interpreter; - } - - public boolean hasInterpreter() { - return this.interpreter != null && !this.interpreter.isEmpty(); - } - - /** - * @param value {@link #interpreter} (Who read the study and interpreted the images or other content.) - */ - public ImagingStudy setInterpreter(Reference value) { - this.interpreter = value; - return this; - } - - /** - * @return {@link #interpreter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who read the study and interpreted the images or other content.) - */ - public Practitioner getInterpreterTarget() { - if (this.interpreterTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ImagingStudy.interpreter"); - else if (Configuration.doAutoCreate()) - this.interpreterTarget = new Practitioner(); // aa - return this.interpreterTarget; - } - - /** - * @param value {@link #interpreter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who read the study and interpreted the images or other content.) - */ - public ImagingStudy setInterpreterTarget(Practitioner value) { - this.interpreterTarget = value; - return this; - } - /** * @return {@link #description} (Institution-generated description or classification of the Study performed.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value */ @@ -2182,44 +2177,46 @@ public class ImagingStudy extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("started", "dateTime", "Date and Time the study started.", 0, java.lang.Integer.MAX_VALUE, started)); - childrenList.add(new Property("patient", "Reference(Patient)", "The patient imaged in the study.", 0, java.lang.Integer.MAX_VALUE, patient)); childrenList.add(new Property("uid", "oid", "Formal identifier for the study.", 0, java.lang.Integer.MAX_VALUE, uid)); childrenList.add(new Property("accession", "Identifier", "Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf).", 0, java.lang.Integer.MAX_VALUE, accession)); childrenList.add(new Property("identifier", "Identifier", "Other identifiers for the study.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("order", "Reference(DiagnosticOrder)", "A list of the diagnostic orders that resulted in this imaging study being performed.", 0, java.lang.Integer.MAX_VALUE, order)); - childrenList.add(new Property("modalityList", "Coding", "A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).", 0, java.lang.Integer.MAX_VALUE, modalityList)); - childrenList.add(new Property("referrer", "Reference(Practitioner)", "The requesting/referring physician.", 0, java.lang.Integer.MAX_VALUE, referrer)); childrenList.add(new Property("availability", "code", "Availability of study (online, offline or nearline).", 0, java.lang.Integer.MAX_VALUE, availability)); + childrenList.add(new Property("modalityList", "Coding", "A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).", 0, java.lang.Integer.MAX_VALUE, modalityList)); + childrenList.add(new Property("patient", "Reference(Patient)", "The patient imaged in the study.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("started", "dateTime", "Date and Time the study started.", 0, java.lang.Integer.MAX_VALUE, started)); + childrenList.add(new Property("order", "Reference(DiagnosticOrder)", "A list of the diagnostic orders that resulted in this imaging study being performed.", 0, java.lang.Integer.MAX_VALUE, order)); + childrenList.add(new Property("referrer", "Reference(Practitioner)", "The requesting/referring physician.", 0, java.lang.Integer.MAX_VALUE, referrer)); + childrenList.add(new Property("interpreter", "Reference(Practitioner)", "Who read the study and interpreted the images or other content.", 0, java.lang.Integer.MAX_VALUE, interpreter)); childrenList.add(new Property("url", "uri", "WADO-RS resource where Study is available.", 0, java.lang.Integer.MAX_VALUE, url)); childrenList.add(new Property("numberOfSeries", "unsignedInt", "Number of Series in Study.", 0, java.lang.Integer.MAX_VALUE, numberOfSeries)); childrenList.add(new Property("numberOfInstances", "unsignedInt", "Number of SOP Instances in Study.", 0, java.lang.Integer.MAX_VALUE, numberOfInstances)); childrenList.add(new Property("procedure", "Reference(Procedure)", "Type of procedure performed.", 0, java.lang.Integer.MAX_VALUE, procedure)); - childrenList.add(new Property("interpreter", "Reference(Practitioner)", "Who read the study and interpreted the images or other content.", 0, java.lang.Integer.MAX_VALUE, interpreter)); childrenList.add(new Property("description", "string", "Institution-generated description or classification of the Study performed.", 0, java.lang.Integer.MAX_VALUE, description)); childrenList.add(new Property("series", "", "Each study has one or more series of images or other content.", 0, java.lang.Integer.MAX_VALUE, series)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("started")) - this.started = castToDateTime(value); // DateTimeType - else if (name.equals("patient")) - this.patient = castToReference(value); // Reference - else if (name.equals("uid")) + if (name.equals("uid")) this.uid = castToOid(value); // OidType else if (name.equals("accession")) this.accession = castToIdentifier(value); // Identifier else if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); - else if (name.equals("order")) - this.getOrder().add(castToReference(value)); - else if (name.equals("modalityList")) - this.getModalityList().add(castToCoding(value)); - else if (name.equals("referrer")) - this.referrer = castToReference(value); // Reference else if (name.equals("availability")) this.availability = new InstanceAvailabilityEnumFactory().fromType(value); // Enumeration + else if (name.equals("modalityList")) + this.getModalityList().add(castToCoding(value)); + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("started")) + this.started = castToDateTime(value); // DateTimeType + else if (name.equals("order")) + this.getOrder().add(castToReference(value)); + else if (name.equals("referrer")) + this.referrer = castToReference(value); // Reference + else if (name.equals("interpreter")) + this.interpreter = castToReference(value); // Reference else if (name.equals("url")) this.url = castToUri(value); // UriType else if (name.equals("numberOfSeries")) @@ -2228,8 +2225,6 @@ public class ImagingStudy extends DomainResource { this.numberOfInstances = castToUnsignedInt(value); // UnsignedIntType else if (name.equals("procedure")) this.getProcedure().add(castToReference(value)); - else if (name.equals("interpreter")) - this.interpreter = castToReference(value); // Reference else if (name.equals("description")) this.description = castToString(value); // StringType else if (name.equals("series")) @@ -2240,14 +2235,7 @@ public class ImagingStudy extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("started")) { - throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.started"); - } - else if (name.equals("patient")) { - this.patient = new Reference(); - return this.patient; - } - else if (name.equals("uid")) { + if (name.equals("uid")) { throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.uid"); } else if (name.equals("accession")) { @@ -2257,18 +2245,29 @@ public class ImagingStudy extends DomainResource { else if (name.equals("identifier")) { return addIdentifier(); } - else if (name.equals("order")) { - return addOrder(); + else if (name.equals("availability")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.availability"); } else if (name.equals("modalityList")) { return addModalityList(); } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("started")) { + throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.started"); + } + else if (name.equals("order")) { + return addOrder(); + } else if (name.equals("referrer")) { this.referrer = new Reference(); return this.referrer; } - else if (name.equals("availability")) { - throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.availability"); + else if (name.equals("interpreter")) { + this.interpreter = new Reference(); + return this.interpreter; } else if (name.equals("url")) { throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.url"); @@ -2282,10 +2281,6 @@ public class ImagingStudy extends DomainResource { else if (name.equals("procedure")) { return addProcedure(); } - else if (name.equals("interpreter")) { - this.interpreter = new Reference(); - return this.interpreter; - } else if (name.equals("description")) { throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.description"); } @@ -2304,8 +2299,6 @@ public class ImagingStudy extends DomainResource { public ImagingStudy copy() { ImagingStudy dst = new ImagingStudy(); copyValues(dst); - dst.started = started == null ? null : started.copy(); - dst.patient = patient == null ? null : patient.copy(); dst.uid = uid == null ? null : uid.copy(); dst.accession = accession == null ? null : accession.copy(); if (identifier != null) { @@ -2313,18 +2306,21 @@ public class ImagingStudy extends DomainResource { for (Identifier i : identifier) dst.identifier.add(i.copy()); }; - if (order != null) { - dst.order = new ArrayList(); - for (Reference i : order) - dst.order.add(i.copy()); - }; + dst.availability = availability == null ? null : availability.copy(); if (modalityList != null) { dst.modalityList = new ArrayList(); for (Coding i : modalityList) dst.modalityList.add(i.copy()); }; + dst.patient = patient == null ? null : patient.copy(); + dst.started = started == null ? null : started.copy(); + if (order != null) { + dst.order = new ArrayList(); + for (Reference i : order) + dst.order.add(i.copy()); + }; dst.referrer = referrer == null ? null : referrer.copy(); - dst.availability = availability == null ? null : availability.copy(); + dst.interpreter = interpreter == null ? null : interpreter.copy(); dst.url = url == null ? null : url.copy(); dst.numberOfSeries = numberOfSeries == null ? null : numberOfSeries.copy(); dst.numberOfInstances = numberOfInstances == null ? null : numberOfInstances.copy(); @@ -2333,7 +2329,6 @@ public class ImagingStudy extends DomainResource { for (Reference i : procedure) dst.procedure.add(i.copy()); }; - dst.interpreter = interpreter == null ? null : interpreter.copy(); dst.description = description == null ? null : description.copy(); if (series != null) { dst.series = new ArrayList(); @@ -2354,12 +2349,13 @@ public class ImagingStudy extends DomainResource { if (!(other instanceof ImagingStudy)) return false; ImagingStudy o = (ImagingStudy) other; - return compareDeep(started, o.started, true) && compareDeep(patient, o.patient, true) && compareDeep(uid, o.uid, true) - && compareDeep(accession, o.accession, true) && compareDeep(identifier, o.identifier, true) && compareDeep(order, o.order, true) - && compareDeep(modalityList, o.modalityList, true) && compareDeep(referrer, o.referrer, true) && compareDeep(availability, o.availability, true) - && compareDeep(url, o.url, true) && compareDeep(numberOfSeries, o.numberOfSeries, true) && compareDeep(numberOfInstances, o.numberOfInstances, true) - && compareDeep(procedure, o.procedure, true) && compareDeep(interpreter, o.interpreter, true) && compareDeep(description, o.description, true) - && compareDeep(series, o.series, true); + return compareDeep(uid, o.uid, true) && compareDeep(accession, o.accession, true) && compareDeep(identifier, o.identifier, true) + && compareDeep(availability, o.availability, true) && compareDeep(modalityList, o.modalityList, true) + && compareDeep(patient, o.patient, true) && compareDeep(started, o.started, true) && compareDeep(order, o.order, true) + && compareDeep(referrer, o.referrer, true) && compareDeep(interpreter, o.interpreter, true) && compareDeep(url, o.url, true) + && compareDeep(numberOfSeries, o.numberOfSeries, true) && compareDeep(numberOfInstances, o.numberOfInstances, true) + && compareDeep(procedure, o.procedure, true) && compareDeep(description, o.description, true) && compareDeep(series, o.series, true) + ; } @Override @@ -2369,20 +2365,15 @@ public class ImagingStudy extends DomainResource { if (!(other instanceof ImagingStudy)) return false; ImagingStudy o = (ImagingStudy) other; - return compareValues(started, o.started, true) && compareValues(uid, o.uid, true) && compareValues(availability, o.availability, true) + return compareValues(uid, o.uid, true) && compareValues(availability, o.availability, true) && compareValues(started, o.started, true) && compareValues(url, o.url, true) && compareValues(numberOfSeries, o.numberOfSeries, true) && compareValues(numberOfInstances, o.numberOfInstances, true) && compareValues(description, o.description, true); } public boolean isEmpty() { - return super.isEmpty() && (started == null || started.isEmpty()) && (patient == null || patient.isEmpty()) - && (uid == null || uid.isEmpty()) && (accession == null || accession.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (order == null || order.isEmpty()) && (modalityList == null || modalityList.isEmpty()) - && (referrer == null || referrer.isEmpty()) && (availability == null || availability.isEmpty()) - && (url == null || url.isEmpty()) && (numberOfSeries == null || numberOfSeries.isEmpty()) - && (numberOfInstances == null || numberOfInstances.isEmpty()) && (procedure == null || procedure.isEmpty()) - && (interpreter == null || interpreter.isEmpty()) && (description == null || description.isEmpty()) - && (series == null || series.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( uid, accession, identifier, availability + , modalityList, patient, started, order, referrer, interpreter, url, numberOfSeries + , numberOfInstances, procedure, description, series); } @Override @@ -2390,6 +2381,26 @@ public class ImagingStudy extends DomainResource { return ResourceType.ImagingStudy; } + /** + * Search parameter: identifier + *

+ * Description: Other identifiers for the Study
+ * Type: token
+ * Path: ImagingStudy.identifier
+ *

+ */ + @SearchParamDefinition(name="identifier", path="ImagingStudy.identifier", description="Other identifiers for the Study", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + /** + * Fluent Client search parameter constant for identifier + *

+ * Description: Other identifiers for the Study
+ * Type: token
+ * Path: ImagingStudy.identifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); + /** * Search parameter: uid *

@@ -2498,7 +2509,7 @@ public class ImagingStudy extends DomainResource { * Path: ImagingStudy.patient
*

*/ - @SearchParamDefinition(name="patient", path="ImagingStudy.patient", description="Who the study is about", type="reference" ) + @SearchParamDefinition(name="patient", path="ImagingStudy.patient", description="Who the study is about", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Immunization.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Immunization.java index 83c0a0941ac..882304bbb0e 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Immunization.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Immunization.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed. */ @@ -219,8 +218,7 @@ public class Immunization extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (reason == null || reason.isEmpty()) && (reasonNotGiven == null || reasonNotGiven.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( reason, reasonNotGiven); } public String fhirType() { @@ -471,8 +469,7 @@ public class Immunization extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (date == null || date.isEmpty()) && (detail == null || detail.isEmpty()) - && (reported == null || reported.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( date, detail, reported); } public String fhirType() { @@ -993,10 +990,8 @@ public class Immunization extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (doseSequence == null || doseSequence.isEmpty()) && (description == null || description.isEmpty()) - && (authority == null || authority.isEmpty()) && (series == null || series.isEmpty()) && (seriesDoses == null || seriesDoses.isEmpty()) - && (targetDisease == null || targetDisease.isEmpty()) && (doseStatus == null || doseStatus.isEmpty()) - && (doseStatusReason == null || doseStatusReason.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( doseSequence, description, authority + , series, seriesDoses, targetDisease, doseStatus, doseStatusReason); } public String fhirType() { @@ -2265,16 +2260,10 @@ public class Immunization extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) - && (date == null || date.isEmpty()) && (vaccineCode == null || vaccineCode.isEmpty()) && (patient == null || patient.isEmpty()) - && (wasNotGiven == null || wasNotGiven.isEmpty()) && (reported == null || reported.isEmpty()) - && (performer == null || performer.isEmpty()) && (requester == null || requester.isEmpty()) - && (encounter == null || encounter.isEmpty()) && (manufacturer == null || manufacturer.isEmpty()) - && (location == null || location.isEmpty()) && (lotNumber == null || lotNumber.isEmpty()) - && (expirationDate == null || expirationDate.isEmpty()) && (site == null || site.isEmpty()) - && (route == null || route.isEmpty()) && (doseQuantity == null || doseQuantity.isEmpty()) - && (note == null || note.isEmpty()) && (explanation == null || explanation.isEmpty()) && (reaction == null || reaction.isEmpty()) - && (vaccinationProtocol == null || vaccinationProtocol.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, date, vaccineCode + , patient, wasNotGiven, reported, performer, requester, encounter, manufacturer, location + , lotNumber, expirationDate, site, route, doseQuantity, note, explanation, reaction + , vaccinationProtocol); } @Override @@ -2310,7 +2299,7 @@ public class Immunization extends DomainResource { * Path: Immunization.requester
*

*/ - @SearchParamDefinition(name="requester", path="Immunization.requester", description="The practitioner who ordered the vaccination", type="reference" ) + @SearchParamDefinition(name="requester", path="Immunization.requester", description="The practitioner who ordered the vaccination", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_REQUESTER = "requester"; /** * Fluent Client search parameter constant for requester @@ -2376,7 +2365,7 @@ public class Immunization extends DomainResource { * Path: Immunization.performer
*

*/ - @SearchParamDefinition(name="performer", path="Immunization.performer", description="The practitioner who administered the vaccination", type="reference" ) + @SearchParamDefinition(name="performer", path="Immunization.performer", description="The practitioner who administered the vaccination", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_PERFORMER = "performer"; /** * Fluent Client search parameter constant for performer @@ -2514,7 +2503,7 @@ public class Immunization extends DomainResource { * Path: Immunization.patient
*

*/ - @SearchParamDefinition(name="patient", path="Immunization.patient", description="The patient for the vaccination record", type="reference" ) + @SearchParamDefinition(name="patient", path="Immunization.patient", description="The patient for the vaccination record", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImmunizationRecommendation.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImmunizationRecommendation.java index abeabede212..ff2fe945408 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImmunizationRecommendation.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImmunizationRecommendation.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification. */ @@ -564,11 +563,9 @@ public class ImmunizationRecommendation extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (date == null || date.isEmpty()) && (vaccineCode == null || vaccineCode.isEmpty()) - && (doseNumber == null || doseNumber.isEmpty()) && (forecastStatus == null || forecastStatus.isEmpty()) - && (dateCriterion == null || dateCriterion.isEmpty()) && (protocol == null || protocol.isEmpty()) - && (supportingImmunization == null || supportingImmunization.isEmpty()) && (supportingPatientInformation == null || supportingPatientInformation.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( date, vaccineCode, doseNumber + , forecastStatus, dateCriterion, protocol, supportingImmunization, supportingPatientInformation + ); } public String fhirType() { @@ -739,8 +736,7 @@ public class ImmunizationRecommendation extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (value == null || value.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, value); } public String fhirType() { @@ -1055,8 +1051,8 @@ public class ImmunizationRecommendation extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (doseSequence == null || doseSequence.isEmpty()) && (description == null || description.isEmpty()) - && (authority == null || authority.isEmpty()) && (series == null || series.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( doseSequence, description, authority + , series); } public String fhirType() { @@ -1316,8 +1312,8 @@ public class ImmunizationRecommendation extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (patient == null || patient.isEmpty()) - && (recommendation == null || recommendation.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, patient, recommendation + ); } @Override @@ -1393,7 +1389,7 @@ public class ImmunizationRecommendation extends DomainResource { * Path: ImmunizationRecommendation.patient
*

*/ - @SearchParamDefinition(name="patient", path="ImmunizationRecommendation.patient", description="Who this profile is for", type="reference" ) + @SearchParamDefinition(name="patient", path="ImmunizationRecommendation.patient", description="Who this profile is for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImplementationGuide.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImplementationGuide.java index 3fd513b2ebd..bd11da7483e 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImplementationGuide.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ImplementationGuide.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A set of rules or how FHIR is used to solve a particular problem. This resource is used to gather all the parts of an implementation guide into a logical whole, and to publish a computable definition of all the parts. */ @@ -137,157 +135,6 @@ public class ImplementationGuide extends DomainResource { } } - public enum GuideResourcePurpose { - /** - * The resource is intended as an example. - */ - EXAMPLE, - /** - * The resource defines a value set or concept map used in the implementation guide. - */ - TERMINOLOGY, - /** - * The resource defines a profile (StructureDefinition) that is used in the implementation guide. - */ - PROFILE, - /** - * The resource defines an extension (StructureDefinition) that is used in the implementation guide. - */ - EXTENSION, - /** - * The resource contains a dictionary that is part of the implementation guide. - */ - DICTIONARY, - /** - * The resource defines a logical model (in a StructureDefinition) that is used in the implementation guide. - */ - LOGICAL, - /** - * added to help the parsers - */ - NULL; - public static GuideResourcePurpose fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("example".equals(codeString)) - return EXAMPLE; - if ("terminology".equals(codeString)) - return TERMINOLOGY; - if ("profile".equals(codeString)) - return PROFILE; - if ("extension".equals(codeString)) - return EXTENSION; - if ("dictionary".equals(codeString)) - return DICTIONARY; - if ("logical".equals(codeString)) - return LOGICAL; - throw new FHIRException("Unknown GuideResourcePurpose code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case EXAMPLE: return "example"; - case TERMINOLOGY: return "terminology"; - case PROFILE: return "profile"; - case EXTENSION: return "extension"; - case DICTIONARY: return "dictionary"; - case LOGICAL: return "logical"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case EXAMPLE: return "http://hl7.org/fhir/guide-resource-purpose"; - case TERMINOLOGY: return "http://hl7.org/fhir/guide-resource-purpose"; - case PROFILE: return "http://hl7.org/fhir/guide-resource-purpose"; - case EXTENSION: return "http://hl7.org/fhir/guide-resource-purpose"; - case DICTIONARY: return "http://hl7.org/fhir/guide-resource-purpose"; - case LOGICAL: return "http://hl7.org/fhir/guide-resource-purpose"; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case EXAMPLE: return "The resource is intended as an example."; - case TERMINOLOGY: return "The resource defines a value set or concept map used in the implementation guide."; - case PROFILE: return "The resource defines a profile (StructureDefinition) that is used in the implementation guide."; - case EXTENSION: return "The resource defines an extension (StructureDefinition) that is used in the implementation guide."; - case DICTIONARY: return "The resource contains a dictionary that is part of the implementation guide."; - case LOGICAL: return "The resource defines a logical model (in a StructureDefinition) that is used in the implementation guide."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case EXAMPLE: return "Example"; - case TERMINOLOGY: return "Terminology"; - case PROFILE: return "Profile"; - case EXTENSION: return "Extension"; - case DICTIONARY: return "Dictionary"; - case LOGICAL: return "Logical Model"; - default: return "?"; - } - } - } - - public static class GuideResourcePurposeEnumFactory implements EnumFactory { - public GuideResourcePurpose fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("example".equals(codeString)) - return GuideResourcePurpose.EXAMPLE; - if ("terminology".equals(codeString)) - return GuideResourcePurpose.TERMINOLOGY; - if ("profile".equals(codeString)) - return GuideResourcePurpose.PROFILE; - if ("extension".equals(codeString)) - return GuideResourcePurpose.EXTENSION; - if ("dictionary".equals(codeString)) - return GuideResourcePurpose.DICTIONARY; - if ("logical".equals(codeString)) - return GuideResourcePurpose.LOGICAL; - throw new IllegalArgumentException("Unknown GuideResourcePurpose code '"+codeString+"'"); - } - public Enumeration fromType(Base code) throws FHIRException { - if (code == null || code.isEmpty()) - return null; - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return null; - if ("example".equals(codeString)) - return new Enumeration(this, GuideResourcePurpose.EXAMPLE); - if ("terminology".equals(codeString)) - return new Enumeration(this, GuideResourcePurpose.TERMINOLOGY); - if ("profile".equals(codeString)) - return new Enumeration(this, GuideResourcePurpose.PROFILE); - if ("extension".equals(codeString)) - return new Enumeration(this, GuideResourcePurpose.EXTENSION); - if ("dictionary".equals(codeString)) - return new Enumeration(this, GuideResourcePurpose.DICTIONARY); - if ("logical".equals(codeString)) - return new Enumeration(this, GuideResourcePurpose.LOGICAL); - throw new FHIRException("Unknown GuideResourcePurpose code '"+codeString+"'"); - } - public String toCode(GuideResourcePurpose code) { - if (code == GuideResourcePurpose.EXAMPLE) - return "example"; - if (code == GuideResourcePurpose.TERMINOLOGY) - return "terminology"; - if (code == GuideResourcePurpose.PROFILE) - return "profile"; - if (code == GuideResourcePurpose.EXTENSION) - return "extension"; - if (code == GuideResourcePurpose.DICTIONARY) - return "dictionary"; - if (code == GuideResourcePurpose.LOGICAL) - return "logical"; - return "?"; - } - public String toSystem(GuideResourcePurpose code) { - return code.getSystem(); - } - } - public enum GuidePageKind { /** * This is a page of content that is included in the implementation guide. It has no particular function. @@ -477,7 +324,7 @@ public class ImplementationGuide extends DomainResource { * The name of an individual to contact regarding the implementation guide. */ @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the implementation guide." ) + @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the implementation guide." ) protected StringType name; /** @@ -646,8 +493,7 @@ public class ImplementationGuide extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); } public String fhirType() { @@ -838,8 +684,7 @@ public class ImplementationGuide extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (uri == null || uri.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, uri); } public String fhirType() { @@ -1092,8 +937,7 @@ public class ImplementationGuide extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (description == null || description.isEmpty()) - && (resource == null || resource.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, description, resource); } public String fhirType() { @@ -1106,11 +950,11 @@ public class ImplementationGuide extends DomainResource { @Block() public static class ImplementationGuidePackageResourceComponent extends BackboneElement implements IBaseBackboneElement { /** - * Why the resource is included in the guide. + * Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide. */ - @Child(name = "purpose", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="example | terminology | profile | extension | dictionary | logical", formalDefinition="Why the resource is included in the guide." ) - protected Enumeration purpose; + @Child(name = "example", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="If not an example, has it's normal meaning", formalDefinition="Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide." ) + protected BooleanType example; /** * A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name). @@ -1152,7 +996,7 @@ public class ImplementationGuide extends DomainResource { */ protected StructureDefinition exampleForTarget; - private static final long serialVersionUID = 428339533L; + private static final long serialVersionUID = 2085404852L; /** * Constructor @@ -1164,54 +1008,54 @@ public class ImplementationGuide extends DomainResource { /** * Constructor */ - public ImplementationGuidePackageResourceComponent(Enumeration purpose, Type source) { + public ImplementationGuidePackageResourceComponent(BooleanType example, Type source) { super(); - this.purpose = purpose; + this.example = example; this.source = source; } /** - * @return {@link #purpose} (Why the resource is included in the guide.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value + * @return {@link #example} (Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.). This is the underlying object with id, value and extensions. The accessor "getExample" gives direct access to the value */ - public Enumeration getPurposeElement() { - if (this.purpose == null) + public BooleanType getExampleElement() { + if (this.example == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.purpose"); + throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.example"); else if (Configuration.doAutoCreate()) - this.purpose = new Enumeration(new GuideResourcePurposeEnumFactory()); // bb - return this.purpose; + this.example = new BooleanType(); // bb + return this.example; } - public boolean hasPurposeElement() { - return this.purpose != null && !this.purpose.isEmpty(); + public boolean hasExampleElement() { + return this.example != null && !this.example.isEmpty(); } - public boolean hasPurpose() { - return this.purpose != null && !this.purpose.isEmpty(); + public boolean hasExample() { + return this.example != null && !this.example.isEmpty(); } /** - * @param value {@link #purpose} (Why the resource is included in the guide.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value + * @param value {@link #example} (Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.). This is the underlying object with id, value and extensions. The accessor "getExample" gives direct access to the value */ - public ImplementationGuidePackageResourceComponent setPurposeElement(Enumeration value) { - this.purpose = value; + public ImplementationGuidePackageResourceComponent setExampleElement(BooleanType value) { + this.example = value; return this; } /** - * @return Why the resource is included in the guide. + * @return Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide. */ - public GuideResourcePurpose getPurpose() { - return this.purpose == null ? null : this.purpose.getValue(); + public boolean getExample() { + return this.example == null || this.example.isEmpty() ? false : this.example.getValue(); } /** - * @param value Why the resource is included in the guide. + * @param value Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide. */ - public ImplementationGuidePackageResourceComponent setPurpose(GuideResourcePurpose value) { - if (this.purpose == null) - this.purpose = new Enumeration(new GuideResourcePurposeEnumFactory()); - this.purpose.setValue(value); + public ImplementationGuidePackageResourceComponent setExample(boolean value) { + if (this.example == null) + this.example = new BooleanType(); + this.example.setValue(value); return this; } @@ -1453,7 +1297,7 @@ public class ImplementationGuide extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("purpose", "code", "Why the resource is included in the guide.", 0, java.lang.Integer.MAX_VALUE, purpose)); + childrenList.add(new Property("example", "boolean", "Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.", 0, java.lang.Integer.MAX_VALUE, example)); childrenList.add(new Property("name", "string", "A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).", 0, java.lang.Integer.MAX_VALUE, name)); childrenList.add(new Property("description", "string", "A description of the reason that a resource has been included in the implementation guide.", 0, java.lang.Integer.MAX_VALUE, description)); childrenList.add(new Property("acronym", "string", "A short code that may be used to identify the resource throughout the implementation guide.", 0, java.lang.Integer.MAX_VALUE, acronym)); @@ -1463,8 +1307,8 @@ public class ImplementationGuide extends DomainResource { @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("purpose")) - this.purpose = new GuideResourcePurposeEnumFactory().fromType(value); // Enumeration + if (name.equals("example")) + this.example = castToBoolean(value); // BooleanType else if (name.equals("name")) this.name = castToString(value); // StringType else if (name.equals("description")) @@ -1481,8 +1325,8 @@ public class ImplementationGuide extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("purpose")) { - throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.purpose"); + if (name.equals("example")) { + throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.example"); } else if (name.equals("name")) { throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name"); @@ -1512,7 +1356,7 @@ public class ImplementationGuide extends DomainResource { public ImplementationGuidePackageResourceComponent copy() { ImplementationGuidePackageResourceComponent dst = new ImplementationGuidePackageResourceComponent(); copyValues(dst); - dst.purpose = purpose == null ? null : purpose.copy(); + dst.example = example == null ? null : example.copy(); dst.name = name == null ? null : name.copy(); dst.description = description == null ? null : description.copy(); dst.acronym = acronym == null ? null : acronym.copy(); @@ -1528,7 +1372,7 @@ public class ImplementationGuide extends DomainResource { if (!(other instanceof ImplementationGuidePackageResourceComponent)) return false; ImplementationGuidePackageResourceComponent o = (ImplementationGuidePackageResourceComponent) other; - return compareDeep(purpose, o.purpose, true) && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) + return compareDeep(example, o.example, true) && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(acronym, o.acronym, true) && compareDeep(source, o.source, true) && compareDeep(exampleFor, o.exampleFor, true) ; } @@ -1540,14 +1384,13 @@ public class ImplementationGuide extends DomainResource { if (!(other instanceof ImplementationGuidePackageResourceComponent)) return false; ImplementationGuidePackageResourceComponent o = (ImplementationGuidePackageResourceComponent) other; - return compareValues(purpose, o.purpose, true) && compareValues(name, o.name, true) && compareValues(description, o.description, true) + return compareValues(example, o.example, true) && compareValues(name, o.name, true) && compareValues(description, o.description, true) && compareValues(acronym, o.acronym, true); } public boolean isEmpty() { - return super.isEmpty() && (purpose == null || purpose.isEmpty()) && (name == null || name.isEmpty()) - && (description == null || description.isEmpty()) && (acronym == null || acronym.isEmpty()) - && (source == null || source.isEmpty()) && (exampleFor == null || exampleFor.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( example, name, description, acronym + , source, exampleFor); } public String fhirType() { @@ -1743,8 +1586,7 @@ public class ImplementationGuide extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (profile == null || profile.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, profile); } public String fhirType() { @@ -2264,9 +2106,8 @@ public class ImplementationGuide extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (source == null || source.isEmpty()) && (name == null || name.isEmpty()) - && (kind == null || kind.isEmpty()) && (type == null || type.isEmpty()) && (package_ == null || package_.isEmpty()) - && (format == null || format.isEmpty()) && (page == null || page.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( source, name, kind, type, package_ + , format, page); } public String fhirType() { @@ -2354,10 +2195,10 @@ public class ImplementationGuide extends DomainResource { protected StringType copyright; /** - * The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.3.0 for this version. + * The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version. */ @Child(name = "fhirVersion", type = {IdType.class}, order=11, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="FHIR Version this Implementation Guide targets", formalDefinition="The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.3.0 for this version." ) + @Description(shortDefinition="FHIR Version this Implementation Guide targets", formalDefinition="The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version." ) protected IdType fhirVersion; /** @@ -2921,7 +2762,7 @@ public class ImplementationGuide extends DomainResource { } /** - * @return {@link #fhirVersion} (The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.3.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value + * @return {@link #fhirVersion} (The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value */ public IdType getFhirVersionElement() { if (this.fhirVersion == null) @@ -2941,7 +2782,7 @@ public class ImplementationGuide extends DomainResource { } /** - * @param value {@link #fhirVersion} (The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.3.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value + * @param value {@link #fhirVersion} (The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value */ public ImplementationGuide setFhirVersionElement(IdType value) { this.fhirVersion = value; @@ -2949,14 +2790,14 @@ public class ImplementationGuide extends DomainResource { } /** - * @return The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.3.0 for this version. + * @return The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version. */ public String getFhirVersion() { return this.fhirVersion == null ? null : this.fhirVersion.getValue(); } /** - * @param value The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.3.0 for this version. + * @param value The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version. */ public ImplementationGuide setFhirVersion(String value) { if (Utilities.noString(value)) @@ -3180,7 +3021,7 @@ public class ImplementationGuide extends DomainResource { childrenList.add(new Property("description", "string", "A free text natural language description of the Implementation Guide and its use.", 0, java.lang.Integer.MAX_VALUE, description)); childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of implementation guides. The most common use of this element is to represent the country / jurisdiction for which this implementation guide was defined.", 0, java.lang.Integer.MAX_VALUE, useContext)); childrenList.add(new Property("copyright", "string", "A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.", 0, java.lang.Integer.MAX_VALUE, copyright)); - childrenList.add(new Property("fhirVersion", "id", "The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.3.0 for this version.", 0, java.lang.Integer.MAX_VALUE, fhirVersion)); + childrenList.add(new Property("fhirVersion", "id", "The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version.", 0, java.lang.Integer.MAX_VALUE, fhirVersion)); childrenList.add(new Property("dependency", "", "Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.", 0, java.lang.Integer.MAX_VALUE, dependency)); childrenList.add(new Property("package", "", "A logical group of resources. Logical groups can be used when building pages.", 0, java.lang.Integer.MAX_VALUE, package_)); childrenList.add(new Property("global", "", "A set of profiles that all resources covered by this implementation guide must conform to.", 0, java.lang.Integer.MAX_VALUE, global)); @@ -3371,14 +3212,9 @@ public class ImplementationGuide extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (url == null || url.isEmpty()) && (version == null || version.isEmpty()) - && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty()) - && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) - && (description == null || description.isEmpty()) && (useContext == null || useContext.isEmpty()) - && (copyright == null || copyright.isEmpty()) && (fhirVersion == null || fhirVersion.isEmpty()) - && (dependency == null || dependency.isEmpty()) && (package_ == null || package_.isEmpty()) - && (global == null || global.isEmpty()) && (binary == null || binary.isEmpty()) && (page == null || page.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, version, name, status, experimental + , publisher, contact, date, description, useContext, copyright, fhirVersion, dependency + , package_, global, binary, page); } @Override @@ -3426,6 +3262,32 @@ public class ImplementationGuide extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.UriClientParam DEPENDENCY = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_DEPENDENCY); + /** + * Search parameter: resource + *

+ * Description: Location of the resource
+ * Type: reference
+ * Path: ImplementationGuide.package.resource.source[x]
+ *

+ */ + @SearchParamDefinition(name="resource", path="ImplementationGuide.package.resource.source[x]", description="Location of the resource", type="reference" ) + public static final String SP_RESOURCE = "resource"; + /** + * Fluent Client search parameter constant for resource + *

+ * Description: Location of the resource
+ * Type: reference
+ * Path: ImplementationGuide.package.resource.source[x]
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RESOURCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RESOURCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "ImplementationGuide:resource". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_RESOURCE = new ca.uhn.fhir.model.api.Include("ImplementationGuide:resource").toLocked(); + /** * Search parameter: name *

diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Library.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Library.java index 79d71ba8079..b46d6b351a8 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Library.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Library.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,61 +39,1245 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * The Library resource provides a representation container for knowledge artifact component definitions. It is effectively an exposure of the header information for a CQL/ELM library. */ @ResourceDef(name="Library", profile="http://hl7.org/fhir/Profile/Library") public class Library extends DomainResource { - /** - * A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact. - */ - @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Logical identifier", formalDefinition="A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact." ) - protected List identifier; + @Block() + public static class LibraryModelComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name element defines the local name of the model as used within the library. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the model", formalDefinition="The name element defines the local name of the model as used within the library." ) + protected StringType name; + + /** + * The identifier element specifies the global, non-version-specific identifier for the model. + */ + @Child(name = "identifier", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The identifier of the model", formalDefinition="The identifier element specifies the global, non-version-specific identifier for the model." ) + protected StringType identifier; + + /** + * The version element, if present, identifies the specific version of the model to be used. If no version is specified, the most recent published version of the model is implied. + */ + @Child(name = "version", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The version of the model, if any", formalDefinition="The version element, if present, identifies the specific version of the model to be used. If no version is specified, the most recent published version of the model is implied." ) + protected StringType version; + + private static final long serialVersionUID = -862601139L; /** - * The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + * Constructor */ - @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The version of the module, if any", formalDefinition="The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification." ) - protected StringType version; + public LibraryModelComponent() { + super(); + } /** - * A reference to a ModuleMetadata resource containing publication, description, and supporting information for the library. + * Constructor */ - @Child(name = "moduleMetadata", type = {ModuleMetadata.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The metadata information for the library", formalDefinition="A reference to a ModuleMetadata resource containing publication, description, and supporting information for the library." ) - protected Reference moduleMetadata; + public LibraryModelComponent(StringType identifier) { + super(); + this.identifier = identifier; + } + + /** + * @return {@link #name} (The name element defines the local name of the model as used within the library.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LibraryModelComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name element defines the local name of the model as used within the library.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public LibraryModelComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name element defines the local name of the model as used within the library. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name element defines the local name of the model as used within the library. + */ + public LibraryModelComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #identifier} (The identifier element specifies the global, non-version-specific identifier for the model.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public StringType getIdentifierElement() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LibraryModelComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new StringType(); // bb + return this.identifier; + } + + public boolean hasIdentifierElement() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (The identifier element specifies the global, non-version-specific identifier for the model.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public LibraryModelComponent setIdentifierElement(StringType value) { + this.identifier = value; + return this; + } + + /** + * @return The identifier element specifies the global, non-version-specific identifier for the model. + */ + public String getIdentifier() { + return this.identifier == null ? null : this.identifier.getValue(); + } + + /** + * @param value The identifier element specifies the global, non-version-specific identifier for the model. + */ + public LibraryModelComponent setIdentifier(String value) { + if (this.identifier == null) + this.identifier = new StringType(); + this.identifier.setValue(value); + return this; + } + + /** + * @return {@link #version} (The version element, if present, identifies the specific version of the model to be used. If no version is specified, the most recent published version of the model is implied.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LibraryModelComponent.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version element, if present, identifies the specific version of the model to be used. If no version is specified, the most recent published version of the model is implied.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public LibraryModelComponent setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version element, if present, identifies the specific version of the model to be used. If no version is specified, the most recent published version of the model is implied. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version element, if present, identifies the specific version of the model to be used. If no version is specified, the most recent published version of the model is implied. + */ + public LibraryModelComponent setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name element defines the local name of the model as used within the library.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("identifier", "string", "The identifier element specifies the global, non-version-specific identifier for the model.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The version element, if present, identifies the specific version of the model to be used. If no version is specified, the most recent published version of the model is implied.", 0, java.lang.Integer.MAX_VALUE, version)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("identifier")) + this.identifier = castToString(value); // StringType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Library.name"); + } + else if (name.equals("identifier")) { + throw new FHIRException("Cannot call addChild on a primitive type Library.identifier"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type Library.version"); + } + else + return super.addChild(name); + } + + public LibraryModelComponent copy() { + LibraryModelComponent dst = new LibraryModelComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.version = version == null ? null : version.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof LibraryModelComponent)) + return false; + LibraryModelComponent o = (LibraryModelComponent) other; + return compareDeep(name, o.name, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof LibraryModelComponent)) + return false; + LibraryModelComponent o = (LibraryModelComponent) other; + return compareValues(name, o.name, true) && compareValues(identifier, o.identifier, true) && compareValues(version, o.version, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, identifier, version); + } + + public String fhirType() { + return "Library.model"; + + } + + } + + @Block() + public static class LibraryLibraryComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name element defines the local name of the referenced library. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the library", formalDefinition="The name element defines the local name of the referenced library." ) + protected StringType name; + + /** + * The identifier element specifies the global, non-version-specific identifier for the library. + */ + @Child(name = "identifier", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The identifier of the library", formalDefinition="The identifier element specifies the global, non-version-specific identifier for the library." ) + protected StringType identifier; + + /** + * The version element, if present, identifies the specific version of the library to be used. If no version is specified, the most recent published version of the library is implied. + */ + @Child(name = "version", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The version of the library, if any", formalDefinition="The version element, if present, identifies the specific version of the library to be used. If no version is specified, the most recent published version of the library is implied." ) + protected StringType version; + + /** + * The content of the referenced library as an Attachment, or a reference to the Library resource. If the document is an attachment, it may be a reference to a url from which the library document may be retrieved, or it may be directly embedded as a base-64 string. Either way, the content is expected to be a CQL or ELM document. + */ + @Child(name = "document", type = {Attachment.class, ModuleDefinition.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The content of the library", formalDefinition="The content of the referenced library as an Attachment, or a reference to the Library resource. If the document is an attachment, it may be a reference to a url from which the library document may be retrieved, or it may be directly embedded as a base-64 string. Either way, the content is expected to be a CQL or ELM document." ) + protected Type document; + + private static final long serialVersionUID = 1633488790L; /** - * The actual object that is the target of the reference (A reference to a ModuleMetadata resource containing publication, description, and supporting information for the library.) + * Constructor */ - protected ModuleMetadata moduleMetadataTarget; + public LibraryLibraryComponent() { + super(); + } /** - * A reference to a ModuleDefinition resource describing the header information for the library. + * Constructor */ - @Child(name = "moduleDefinition", type = {ModuleDefinition.class}, order=3, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="The header information for the library", formalDefinition="A reference to a ModuleDefinition resource describing the header information for the library." ) - protected Reference moduleDefinition; + public LibraryLibraryComponent(StringType identifier) { + super(); + this.identifier = identifier; + } + + /** + * @return {@link #name} (The name element defines the local name of the referenced library.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LibraryLibraryComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name element defines the local name of the referenced library.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public LibraryLibraryComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name element defines the local name of the referenced library. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name element defines the local name of the referenced library. + */ + public LibraryLibraryComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #identifier} (The identifier element specifies the global, non-version-specific identifier for the library.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public StringType getIdentifierElement() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LibraryLibraryComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new StringType(); // bb + return this.identifier; + } + + public boolean hasIdentifierElement() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (The identifier element specifies the global, non-version-specific identifier for the library.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public LibraryLibraryComponent setIdentifierElement(StringType value) { + this.identifier = value; + return this; + } + + /** + * @return The identifier element specifies the global, non-version-specific identifier for the library. + */ + public String getIdentifier() { + return this.identifier == null ? null : this.identifier.getValue(); + } + + /** + * @param value The identifier element specifies the global, non-version-specific identifier for the library. + */ + public LibraryLibraryComponent setIdentifier(String value) { + if (this.identifier == null) + this.identifier = new StringType(); + this.identifier.setValue(value); + return this; + } + + /** + * @return {@link #version} (The version element, if present, identifies the specific version of the library to be used. If no version is specified, the most recent published version of the library is implied.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LibraryLibraryComponent.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version element, if present, identifies the specific version of the library to be used. If no version is specified, the most recent published version of the library is implied.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public LibraryLibraryComponent setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version element, if present, identifies the specific version of the library to be used. If no version is specified, the most recent published version of the library is implied. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version element, if present, identifies the specific version of the library to be used. If no version is specified, the most recent published version of the library is implied. + */ + public LibraryLibraryComponent setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #document} (The content of the referenced library as an Attachment, or a reference to the Library resource. If the document is an attachment, it may be a reference to a url from which the library document may be retrieved, or it may be directly embedded as a base-64 string. Either way, the content is expected to be a CQL or ELM document.) + */ + public Type getDocument() { + return this.document; + } + + /** + * @return {@link #document} (The content of the referenced library as an Attachment, or a reference to the Library resource. If the document is an attachment, it may be a reference to a url from which the library document may be retrieved, or it may be directly embedded as a base-64 string. Either way, the content is expected to be a CQL or ELM document.) + */ + public Attachment getDocumentAttachment() throws FHIRException { + if (!(this.document instanceof Attachment)) + throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.document.getClass().getName()+" was encountered"); + return (Attachment) this.document; + } + + public boolean hasDocumentAttachment() { + return this.document instanceof Attachment; + } + + /** + * @return {@link #document} (The content of the referenced library as an Attachment, or a reference to the Library resource. If the document is an attachment, it may be a reference to a url from which the library document may be retrieved, or it may be directly embedded as a base-64 string. Either way, the content is expected to be a CQL or ELM document.) + */ + public Reference getDocumentReference() throws FHIRException { + if (!(this.document instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.document.getClass().getName()+" was encountered"); + return (Reference) this.document; + } + + public boolean hasDocumentReference() { + return this.document instanceof Reference; + } + + public boolean hasDocument() { + return this.document != null && !this.document.isEmpty(); + } + + /** + * @param value {@link #document} (The content of the referenced library as an Attachment, or a reference to the Library resource. If the document is an attachment, it may be a reference to a url from which the library document may be retrieved, or it may be directly embedded as a base-64 string. Either way, the content is expected to be a CQL or ELM document.) + */ + public LibraryLibraryComponent setDocument(Type value) { + this.document = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name element defines the local name of the referenced library.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("identifier", "string", "The identifier element specifies the global, non-version-specific identifier for the library.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The version element, if present, identifies the specific version of the library to be used. If no version is specified, the most recent published version of the library is implied.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("document[x]", "Attachment|Reference(ModuleDefinition)", "The content of the referenced library as an Attachment, or a reference to the Library resource. If the document is an attachment, it may be a reference to a url from which the library document may be retrieved, or it may be directly embedded as a base-64 string. Either way, the content is expected to be a CQL or ELM document.", 0, java.lang.Integer.MAX_VALUE, document)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("identifier")) + this.identifier = castToString(value); // StringType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("document[x]")) + this.document = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Library.name"); + } + else if (name.equals("identifier")) { + throw new FHIRException("Cannot call addChild on a primitive type Library.identifier"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type Library.version"); + } + else if (name.equals("documentAttachment")) { + this.document = new Attachment(); + return this.document; + } + else if (name.equals("documentReference")) { + this.document = new Reference(); + return this.document; + } + else + return super.addChild(name); + } + + public LibraryLibraryComponent copy() { + LibraryLibraryComponent dst = new LibraryLibraryComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.version = version == null ? null : version.copy(); + dst.document = document == null ? null : document.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof LibraryLibraryComponent)) + return false; + LibraryLibraryComponent o = (LibraryLibraryComponent) other; + return compareDeep(name, o.name, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) + && compareDeep(document, o.document, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof LibraryLibraryComponent)) + return false; + LibraryLibraryComponent o = (LibraryLibraryComponent) other; + return compareValues(name, o.name, true) && compareValues(identifier, o.identifier, true) && compareValues(version, o.version, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, identifier, version, document + ); + } + + public String fhirType() { + return "Library.library"; + + } + + } + + @Block() + public static class LibraryCodeSystemComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name element specifies the local name of the code system as used within the library. This name is also used when the code system is referenced from a value set element to determine the version of the code system to be used when computed the expansion of the value set definition. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the code system", formalDefinition="The name element specifies the local name of the code system as used within the library. This name is also used when the code system is referenced from a value set element to determine the version of the code system to be used when computed the expansion of the value set definition." ) + protected StringType name; + + /** + * The identifier element specifies the global, non-version-specific identifier for the code system. + */ + @Child(name = "identifier", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The identifier of the code system", formalDefinition="The identifier element specifies the global, non-version-specific identifier for the code system." ) + protected StringType identifier; + + /** + * The version element, if present, identifies the specific version of the library to be used. If no code system is specified, the most recent published version of the code system is implied. + */ + @Child(name = "version", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The version of the code system, if any", formalDefinition="The version element, if present, identifies the specific version of the library to be used. If no code system is specified, the most recent published version of the code system is implied." ) + protected StringType version; + + private static final long serialVersionUID = -862601139L; /** - * The actual object that is the target of the reference (A reference to a ModuleDefinition resource describing the header information for the library.) + * Constructor */ - protected ModuleDefinition moduleDefinitionTarget; + public LibraryCodeSystemComponent() { + super(); + } + + /** + * Constructor + */ + public LibraryCodeSystemComponent(StringType identifier) { + super(); + this.identifier = identifier; + } + + /** + * @return {@link #name} (The name element specifies the local name of the code system as used within the library. This name is also used when the code system is referenced from a value set element to determine the version of the code system to be used when computed the expansion of the value set definition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LibraryCodeSystemComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name element specifies the local name of the code system as used within the library. This name is also used when the code system is referenced from a value set element to determine the version of the code system to be used when computed the expansion of the value set definition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public LibraryCodeSystemComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name element specifies the local name of the code system as used within the library. This name is also used when the code system is referenced from a value set element to determine the version of the code system to be used when computed the expansion of the value set definition. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name element specifies the local name of the code system as used within the library. This name is also used when the code system is referenced from a value set element to determine the version of the code system to be used when computed the expansion of the value set definition. + */ + public LibraryCodeSystemComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #identifier} (The identifier element specifies the global, non-version-specific identifier for the code system.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public StringType getIdentifierElement() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LibraryCodeSystemComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new StringType(); // bb + return this.identifier; + } + + public boolean hasIdentifierElement() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (The identifier element specifies the global, non-version-specific identifier for the code system.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public LibraryCodeSystemComponent setIdentifierElement(StringType value) { + this.identifier = value; + return this; + } + + /** + * @return The identifier element specifies the global, non-version-specific identifier for the code system. + */ + public String getIdentifier() { + return this.identifier == null ? null : this.identifier.getValue(); + } + + /** + * @param value The identifier element specifies the global, non-version-specific identifier for the code system. + */ + public LibraryCodeSystemComponent setIdentifier(String value) { + if (this.identifier == null) + this.identifier = new StringType(); + this.identifier.setValue(value); + return this; + } + + /** + * @return {@link #version} (The version element, if present, identifies the specific version of the library to be used. If no code system is specified, the most recent published version of the code system is implied.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LibraryCodeSystemComponent.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version element, if present, identifies the specific version of the library to be used. If no code system is specified, the most recent published version of the code system is implied.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public LibraryCodeSystemComponent setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version element, if present, identifies the specific version of the library to be used. If no code system is specified, the most recent published version of the code system is implied. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version element, if present, identifies the specific version of the library to be used. If no code system is specified, the most recent published version of the code system is implied. + */ + public LibraryCodeSystemComponent setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name element specifies the local name of the code system as used within the library. This name is also used when the code system is referenced from a value set element to determine the version of the code system to be used when computed the expansion of the value set definition.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("identifier", "string", "The identifier element specifies the global, non-version-specific identifier for the code system.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The version element, if present, identifies the specific version of the library to be used. If no code system is specified, the most recent published version of the code system is implied.", 0, java.lang.Integer.MAX_VALUE, version)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("identifier")) + this.identifier = castToString(value); // StringType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Library.name"); + } + else if (name.equals("identifier")) { + throw new FHIRException("Cannot call addChild on a primitive type Library.identifier"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type Library.version"); + } + else + return super.addChild(name); + } + + public LibraryCodeSystemComponent copy() { + LibraryCodeSystemComponent dst = new LibraryCodeSystemComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.version = version == null ? null : version.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof LibraryCodeSystemComponent)) + return false; + LibraryCodeSystemComponent o = (LibraryCodeSystemComponent) other; + return compareDeep(name, o.name, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof LibraryCodeSystemComponent)) + return false; + LibraryCodeSystemComponent o = (LibraryCodeSystemComponent) other; + return compareValues(name, o.name, true) && compareValues(identifier, o.identifier, true) && compareValues(version, o.version, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, identifier, version); + } + + public String fhirType() { + return "Library.codeSystem"; + + } + + } + + @Block() + public static class LibraryValueSetComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name element specifies the local name of the value set used within the library. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the value set", formalDefinition="The name element specifies the local name of the value set used within the library." ) + protected StringType name; + + /** + * The identifier element specifies the global, non-version-specific identifier for the value set. + */ + @Child(name = "identifier", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The identifier of the value set", formalDefinition="The identifier element specifies the global, non-version-specific identifier for the value set." ) + protected StringType identifier; + + /** + * The version element, if present, determines the specific version of the value set definition that is used by the library. If no version is specified, the latest published version of the value set definition is implied. + */ + @Child(name = "version", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The version of the value set", formalDefinition="The version element, if present, determines the specific version of the value set definition that is used by the library. If no version is specified, the latest published version of the value set definition is implied." ) + protected StringType version; + + /** + * The codeSystem element determines which code system binding to use to compute the expansion of the value set definition. The codeSystem element specified here will correspond to a code system element, which is used to determine the code system version. + */ + @Child(name = "codeSystem", type = {StringType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The code system binding for this value set definition", formalDefinition="The codeSystem element determines which code system binding to use to compute the expansion of the value set definition. The codeSystem element specified here will correspond to a code system element, which is used to determine the code system version." ) + protected List codeSystem; + + private static final long serialVersionUID = 338950096L; + + /** + * Constructor + */ + public LibraryValueSetComponent() { + super(); + } + + /** + * Constructor + */ + public LibraryValueSetComponent(StringType identifier) { + super(); + this.identifier = identifier; + } + + /** + * @return {@link #name} (The name element specifies the local name of the value set used within the library.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LibraryValueSetComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name element specifies the local name of the value set used within the library.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public LibraryValueSetComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name element specifies the local name of the value set used within the library. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name element specifies the local name of the value set used within the library. + */ + public LibraryValueSetComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #identifier} (The identifier element specifies the global, non-version-specific identifier for the value set.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public StringType getIdentifierElement() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LibraryValueSetComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new StringType(); // bb + return this.identifier; + } + + public boolean hasIdentifierElement() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (The identifier element specifies the global, non-version-specific identifier for the value set.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value + */ + public LibraryValueSetComponent setIdentifierElement(StringType value) { + this.identifier = value; + return this; + } + + /** + * @return The identifier element specifies the global, non-version-specific identifier for the value set. + */ + public String getIdentifier() { + return this.identifier == null ? null : this.identifier.getValue(); + } + + /** + * @param value The identifier element specifies the global, non-version-specific identifier for the value set. + */ + public LibraryValueSetComponent setIdentifier(String value) { + if (this.identifier == null) + this.identifier = new StringType(); + this.identifier.setValue(value); + return this; + } + + /** + * @return {@link #version} (The version element, if present, determines the specific version of the value set definition that is used by the library. If no version is specified, the latest published version of the value set definition is implied.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create LibraryValueSetComponent.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The version element, if present, determines the specific version of the value set definition that is used by the library. If no version is specified, the latest published version of the value set definition is implied.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public LibraryValueSetComponent setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The version element, if present, determines the specific version of the value set definition that is used by the library. If no version is specified, the latest published version of the value set definition is implied. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The version element, if present, determines the specific version of the value set definition that is used by the library. If no version is specified, the latest published version of the value set definition is implied. + */ + public LibraryValueSetComponent setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #codeSystem} (The codeSystem element determines which code system binding to use to compute the expansion of the value set definition. The codeSystem element specified here will correspond to a code system element, which is used to determine the code system version.) + */ + public List getCodeSystem() { + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + return this.codeSystem; + } + + public boolean hasCodeSystem() { + if (this.codeSystem == null) + return false; + for (StringType item : this.codeSystem) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #codeSystem} (The codeSystem element determines which code system binding to use to compute the expansion of the value set definition. The codeSystem element specified here will correspond to a code system element, which is used to determine the code system version.) + */ + // syntactic sugar + public StringType addCodeSystemElement() {//2 + StringType t = new StringType(); + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + this.codeSystem.add(t); + return t; + } + + /** + * @param value {@link #codeSystem} (The codeSystem element determines which code system binding to use to compute the expansion of the value set definition. The codeSystem element specified here will correspond to a code system element, which is used to determine the code system version.) + */ + public LibraryValueSetComponent addCodeSystem(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + this.codeSystem.add(t); + return this; + } + + /** + * @param value {@link #codeSystem} (The codeSystem element determines which code system binding to use to compute the expansion of the value set definition. The codeSystem element specified here will correspond to a code system element, which is used to determine the code system version.) + */ + public boolean hasCodeSystem(String value) { + if (this.codeSystem == null) + return false; + for (StringType v : this.codeSystem) + if (v.equals(value)) // string + return true; + return false; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name element specifies the local name of the value set used within the library.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("identifier", "string", "The identifier element specifies the global, non-version-specific identifier for the value set.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The version element, if present, determines the specific version of the value set definition that is used by the library. If no version is specified, the latest published version of the value set definition is implied.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("codeSystem", "string", "The codeSystem element determines which code system binding to use to compute the expansion of the value set definition. The codeSystem element specified here will correspond to a code system element, which is used to determine the code system version.", 0, java.lang.Integer.MAX_VALUE, codeSystem)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("identifier")) + this.identifier = castToString(value); // StringType + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("codeSystem")) + this.getCodeSystem().add(castToString(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Library.name"); + } + else if (name.equals("identifier")) { + throw new FHIRException("Cannot call addChild on a primitive type Library.identifier"); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type Library.version"); + } + else if (name.equals("codeSystem")) { + throw new FHIRException("Cannot call addChild on a primitive type Library.codeSystem"); + } + else + return super.addChild(name); + } + + public LibraryValueSetComponent copy() { + LibraryValueSetComponent dst = new LibraryValueSetComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.version = version == null ? null : version.copy(); + if (codeSystem != null) { + dst.codeSystem = new ArrayList(); + for (StringType i : codeSystem) + dst.codeSystem.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof LibraryValueSetComponent)) + return false; + LibraryValueSetComponent o = (LibraryValueSetComponent) other; + return compareDeep(name, o.name, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) + && compareDeep(codeSystem, o.codeSystem, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof LibraryValueSetComponent)) + return false; + LibraryValueSetComponent o = (LibraryValueSetComponent) other; + return compareValues(name, o.name, true) && compareValues(identifier, o.identifier, true) && compareValues(version, o.version, true) + && compareValues(codeSystem, o.codeSystem, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, identifier, version, codeSystem + ); + } + + public String fhirType() { + return "Library.valueSet"; + + } + + } + + /** + * The metadata for the library, including publishing, life-cycle, version, documentation, and supporting evidence. + */ + @Child(name = "moduleMetadata", type = {ModuleMetadata.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The metadata information for the library", formalDefinition="The metadata for the library, including publishing, life-cycle, version, documentation, and supporting evidence." ) + protected ModuleMetadata moduleMetadata; + + /** + * A model element describes the model and version used by the library. + */ + @Child(name = "model", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A model used by the library", formalDefinition="A model element describes the model and version used by the library." ) + protected List model; + + /** + * A library element describes a library referenced by this library. + */ + @Child(name = "library", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A library referenced by this library", formalDefinition="A library element describes a library referenced by this library." ) + protected List library; + + /** + * A code system definition used within the library. + */ + @Child(name = "codeSystem", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A code system used by the library", formalDefinition="A code system definition used within the library." ) + protected List codeSystem; + + /** + * A value set definition referenced by the library. + */ + @Child(name = "valueSet", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="A value set used by the library", formalDefinition="A value set definition referenced by the library." ) + protected List valueSet; + + /** + * The parameter element defines parameters used by the library. + */ + @Child(name = "parameter", type = {ParameterDefinition.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Parameters defined by the library", formalDefinition="The parameter element defines parameters used by the library." ) + protected List parameter; + + /** + * The dataRequirement element specifies a data requirement used by some expression within the library. + */ + @Child(name = "dataRequirement", type = {DataRequirement.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Data requirements of the library", formalDefinition="The dataRequirement element specifies a data requirement used by some expression within the library." ) + protected List dataRequirement; /** * The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the content is expected to be a CQL or ELM document. */ - @Child(name = "document", type = {Attachment.class}, order=4, min=1, max=1, modifier=false, summary=false) + @Child(name = "document", type = {Attachment.class}, order=7, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="The content of the library", formalDefinition="The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the content is expected to be a CQL or ELM document." ) protected Attachment document; - private static final long serialVersionUID = 1670041401L; + private static final long serialVersionUID = 36997599L; /** * Constructor @@ -105,110 +1289,20 @@ public class Library extends DomainResource { /** * Constructor */ - public Library(Reference moduleDefinition, Attachment document) { + public Library(Attachment document) { super(); - this.moduleDefinition = moduleDefinition; this.document = document; } /** - * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + * @return {@link #moduleMetadata} (The metadata for the library, including publishing, life-cycle, version, documentation, and supporting evidence.) */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - // syntactic sugar - public Library addIdentifier(Identifier t) { //3 - if (t == null) - return this; - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return this; - } - - /** - * @return {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value - */ - public StringType getVersionElement() { - if (this.version == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Library.version"); - else if (Configuration.doAutoCreate()) - this.version = new StringType(); // bb - return this.version; - } - - public boolean hasVersionElement() { - return this.version != null && !this.version.isEmpty(); - } - - public boolean hasVersion() { - return this.version != null && !this.version.isEmpty(); - } - - /** - * @param value {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value - */ - public Library setVersionElement(StringType value) { - this.version = value; - return this; - } - - /** - * @return The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. - */ - public String getVersion() { - return this.version == null ? null : this.version.getValue(); - } - - /** - * @param value The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. - */ - public Library setVersion(String value) { - if (Utilities.noString(value)) - this.version = null; - else { - if (this.version == null) - this.version = new StringType(); - this.version.setValue(value); - } - return this; - } - - /** - * @return {@link #moduleMetadata} (A reference to a ModuleMetadata resource containing publication, description, and supporting information for the library.) - */ - public Reference getModuleMetadata() { + public ModuleMetadata getModuleMetadata() { if (this.moduleMetadata == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Library.moduleMetadata"); else if (Configuration.doAutoCreate()) - this.moduleMetadata = new Reference(); // cc + this.moduleMetadata = new ModuleMetadata(); // cc return this.moduleMetadata; } @@ -217,74 +1311,250 @@ public class Library extends DomainResource { } /** - * @param value {@link #moduleMetadata} (A reference to a ModuleMetadata resource containing publication, description, and supporting information for the library.) + * @param value {@link #moduleMetadata} (The metadata for the library, including publishing, life-cycle, version, documentation, and supporting evidence.) */ - public Library setModuleMetadata(Reference value) { + public Library setModuleMetadata(ModuleMetadata value) { this.moduleMetadata = value; return this; } /** - * @return {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource containing publication, description, and supporting information for the library.) + * @return {@link #model} (A model element describes the model and version used by the library.) */ - public ModuleMetadata getModuleMetadataTarget() { - if (this.moduleMetadataTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Library.moduleMetadata"); - else if (Configuration.doAutoCreate()) - this.moduleMetadataTarget = new ModuleMetadata(); // aa - return this.moduleMetadataTarget; + public List getModel() { + if (this.model == null) + this.model = new ArrayList(); + return this.model; + } + + public boolean hasModel() { + if (this.model == null) + return false; + for (LibraryModelComponent item : this.model) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource containing publication, description, and supporting information for the library.) + * @return {@link #model} (A model element describes the model and version used by the library.) */ - public Library setModuleMetadataTarget(ModuleMetadata value) { - this.moduleMetadataTarget = value; + // syntactic sugar + public LibraryModelComponent addModel() { //3 + LibraryModelComponent t = new LibraryModelComponent(); + if (this.model == null) + this.model = new ArrayList(); + this.model.add(t); + return t; + } + + // syntactic sugar + public Library addModel(LibraryModelComponent t) { //3 + if (t == null) + return this; + if (this.model == null) + this.model = new ArrayList(); + this.model.add(t); return this; } /** - * @return {@link #moduleDefinition} (A reference to a ModuleDefinition resource describing the header information for the library.) + * @return {@link #library} (A library element describes a library referenced by this library.) */ - public Reference getModuleDefinition() { - if (this.moduleDefinition == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Library.moduleDefinition"); - else if (Configuration.doAutoCreate()) - this.moduleDefinition = new Reference(); // cc - return this.moduleDefinition; + public List getLibrary() { + if (this.library == null) + this.library = new ArrayList(); + return this.library; } - public boolean hasModuleDefinition() { - return this.moduleDefinition != null && !this.moduleDefinition.isEmpty(); + public boolean hasLibrary() { + if (this.library == null) + return false; + for (LibraryLibraryComponent item : this.library) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #moduleDefinition} (A reference to a ModuleDefinition resource describing the header information for the library.) + * @return {@link #library} (A library element describes a library referenced by this library.) */ - public Library setModuleDefinition(Reference value) { - this.moduleDefinition = value; + // syntactic sugar + public LibraryLibraryComponent addLibrary() { //3 + LibraryLibraryComponent t = new LibraryLibraryComponent(); + if (this.library == null) + this.library = new ArrayList(); + this.library.add(t); + return t; + } + + // syntactic sugar + public Library addLibrary(LibraryLibraryComponent t) { //3 + if (t == null) + return this; + if (this.library == null) + this.library = new ArrayList(); + this.library.add(t); return this; } /** - * @return {@link #moduleDefinition} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a ModuleDefinition resource describing the header information for the library.) + * @return {@link #codeSystem} (A code system definition used within the library.) */ - public ModuleDefinition getModuleDefinitionTarget() { - if (this.moduleDefinitionTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Library.moduleDefinition"); - else if (Configuration.doAutoCreate()) - this.moduleDefinitionTarget = new ModuleDefinition(); // aa - return this.moduleDefinitionTarget; + public List getCodeSystem() { + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + return this.codeSystem; + } + + public boolean hasCodeSystem() { + if (this.codeSystem == null) + return false; + for (LibraryCodeSystemComponent item : this.codeSystem) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #moduleDefinition} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a ModuleDefinition resource describing the header information for the library.) + * @return {@link #codeSystem} (A code system definition used within the library.) */ - public Library setModuleDefinitionTarget(ModuleDefinition value) { - this.moduleDefinitionTarget = value; + // syntactic sugar + public LibraryCodeSystemComponent addCodeSystem() { //3 + LibraryCodeSystemComponent t = new LibraryCodeSystemComponent(); + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + this.codeSystem.add(t); + return t; + } + + // syntactic sugar + public Library addCodeSystem(LibraryCodeSystemComponent t) { //3 + if (t == null) + return this; + if (this.codeSystem == null) + this.codeSystem = new ArrayList(); + this.codeSystem.add(t); + return this; + } + + /** + * @return {@link #valueSet} (A value set definition referenced by the library.) + */ + public List getValueSet() { + if (this.valueSet == null) + this.valueSet = new ArrayList(); + return this.valueSet; + } + + public boolean hasValueSet() { + if (this.valueSet == null) + return false; + for (LibraryValueSetComponent item : this.valueSet) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #valueSet} (A value set definition referenced by the library.) + */ + // syntactic sugar + public LibraryValueSetComponent addValueSet() { //3 + LibraryValueSetComponent t = new LibraryValueSetComponent(); + if (this.valueSet == null) + this.valueSet = new ArrayList(); + this.valueSet.add(t); + return t; + } + + // syntactic sugar + public Library addValueSet(LibraryValueSetComponent t) { //3 + if (t == null) + return this; + if (this.valueSet == null) + this.valueSet = new ArrayList(); + this.valueSet.add(t); + return this; + } + + /** + * @return {@link #parameter} (The parameter element defines parameters used by the library.) + */ + public List getParameter() { + if (this.parameter == null) + this.parameter = new ArrayList(); + return this.parameter; + } + + public boolean hasParameter() { + if (this.parameter == null) + return false; + for (ParameterDefinition item : this.parameter) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #parameter} (The parameter element defines parameters used by the library.) + */ + // syntactic sugar + public ParameterDefinition addParameter() { //3 + ParameterDefinition t = new ParameterDefinition(); + if (this.parameter == null) + this.parameter = new ArrayList(); + this.parameter.add(t); + return t; + } + + // syntactic sugar + public Library addParameter(ParameterDefinition t) { //3 + if (t == null) + return this; + if (this.parameter == null) + this.parameter = new ArrayList(); + this.parameter.add(t); + return this; + } + + /** + * @return {@link #dataRequirement} (The dataRequirement element specifies a data requirement used by some expression within the library.) + */ + public List getDataRequirement() { + if (this.dataRequirement == null) + this.dataRequirement = new ArrayList(); + return this.dataRequirement; + } + + public boolean hasDataRequirement() { + if (this.dataRequirement == null) + return false; + for (DataRequirement item : this.dataRequirement) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dataRequirement} (The dataRequirement element specifies a data requirement used by some expression within the library.) + */ + // syntactic sugar + public DataRequirement addDataRequirement() { //3 + DataRequirement t = new DataRequirement(); + if (this.dataRequirement == null) + this.dataRequirement = new ArrayList(); + this.dataRequirement.add(t); + return t; + } + + // syntactic sugar + public Library addDataRequirement(DataRequirement t) { //3 + if (t == null) + return this; + if (this.dataRequirement == null) + this.dataRequirement = new ArrayList(); + this.dataRequirement.add(t); return this; } @@ -314,23 +1584,32 @@ public class Library extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("version", "string", "The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.", 0, java.lang.Integer.MAX_VALUE, version)); - childrenList.add(new Property("moduleMetadata", "Reference(ModuleMetadata)", "A reference to a ModuleMetadata resource containing publication, description, and supporting information for the library.", 0, java.lang.Integer.MAX_VALUE, moduleMetadata)); - childrenList.add(new Property("moduleDefinition", "Reference(ModuleDefinition)", "A reference to a ModuleDefinition resource describing the header information for the library.", 0, java.lang.Integer.MAX_VALUE, moduleDefinition)); + childrenList.add(new Property("moduleMetadata", "ModuleMetadata", "The metadata for the library, including publishing, life-cycle, version, documentation, and supporting evidence.", 0, java.lang.Integer.MAX_VALUE, moduleMetadata)); + childrenList.add(new Property("model", "", "A model element describes the model and version used by the library.", 0, java.lang.Integer.MAX_VALUE, model)); + childrenList.add(new Property("library", "", "A library element describes a library referenced by this library.", 0, java.lang.Integer.MAX_VALUE, library)); + childrenList.add(new Property("codeSystem", "", "A code system definition used within the library.", 0, java.lang.Integer.MAX_VALUE, codeSystem)); + childrenList.add(new Property("valueSet", "", "A value set definition referenced by the library.", 0, java.lang.Integer.MAX_VALUE, valueSet)); + childrenList.add(new Property("parameter", "ParameterDefinition", "The parameter element defines parameters used by the library.", 0, java.lang.Integer.MAX_VALUE, parameter)); + childrenList.add(new Property("dataRequirement", "DataRequirement", "The dataRequirement element specifies a data requirement used by some expression within the library.", 0, java.lang.Integer.MAX_VALUE, dataRequirement)); childrenList.add(new Property("document", "Attachment", "The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the content is expected to be a CQL or ELM document.", 0, java.lang.Integer.MAX_VALUE, document)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("identifier")) - this.getIdentifier().add(castToIdentifier(value)); - else if (name.equals("version")) - this.version = castToString(value); // StringType - else if (name.equals("moduleMetadata")) - this.moduleMetadata = castToReference(value); // Reference - else if (name.equals("moduleDefinition")) - this.moduleDefinition = castToReference(value); // Reference + if (name.equals("moduleMetadata")) + this.moduleMetadata = castToModuleMetadata(value); // ModuleMetadata + else if (name.equals("model")) + this.getModel().add((LibraryModelComponent) value); + else if (name.equals("library")) + this.getLibrary().add((LibraryLibraryComponent) value); + else if (name.equals("codeSystem")) + this.getCodeSystem().add((LibraryCodeSystemComponent) value); + else if (name.equals("valueSet")) + this.getValueSet().add((LibraryValueSetComponent) value); + else if (name.equals("parameter")) + this.getParameter().add(castToParameterDefinition(value)); + else if (name.equals("dataRequirement")) + this.getDataRequirement().add(castToDataRequirement(value)); else if (name.equals("document")) this.document = castToAttachment(value); // Attachment else @@ -339,19 +1618,27 @@ public class Library extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("identifier")) { - return addIdentifier(); - } - else if (name.equals("version")) { - throw new FHIRException("Cannot call addChild on a primitive type Library.version"); - } - else if (name.equals("moduleMetadata")) { - this.moduleMetadata = new Reference(); + if (name.equals("moduleMetadata")) { + this.moduleMetadata = new ModuleMetadata(); return this.moduleMetadata; } - else if (name.equals("moduleDefinition")) { - this.moduleDefinition = new Reference(); - return this.moduleDefinition; + else if (name.equals("model")) { + return addModel(); + } + else if (name.equals("library")) { + return addLibrary(); + } + else if (name.equals("codeSystem")) { + return addCodeSystem(); + } + else if (name.equals("valueSet")) { + return addValueSet(); + } + else if (name.equals("parameter")) { + return addParameter(); + } + else if (name.equals("dataRequirement")) { + return addDataRequirement(); } else if (name.equals("document")) { this.document = new Attachment(); @@ -369,14 +1656,37 @@ public class Library extends DomainResource { public Library copy() { Library dst = new Library(); copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.version = version == null ? null : version.copy(); dst.moduleMetadata = moduleMetadata == null ? null : moduleMetadata.copy(); - dst.moduleDefinition = moduleDefinition == null ? null : moduleDefinition.copy(); + if (model != null) { + dst.model = new ArrayList(); + for (LibraryModelComponent i : model) + dst.model.add(i.copy()); + }; + if (library != null) { + dst.library = new ArrayList(); + for (LibraryLibraryComponent i : library) + dst.library.add(i.copy()); + }; + if (codeSystem != null) { + dst.codeSystem = new ArrayList(); + for (LibraryCodeSystemComponent i : codeSystem) + dst.codeSystem.add(i.copy()); + }; + if (valueSet != null) { + dst.valueSet = new ArrayList(); + for (LibraryValueSetComponent i : valueSet) + dst.valueSet.add(i.copy()); + }; + if (parameter != null) { + dst.parameter = new ArrayList(); + for (ParameterDefinition i : parameter) + dst.parameter.add(i.copy()); + }; + if (dataRequirement != null) { + dst.dataRequirement = new ArrayList(); + for (DataRequirement i : dataRequirement) + dst.dataRequirement.add(i.copy()); + }; dst.document = document == null ? null : document.copy(); return dst; } @@ -392,9 +1702,10 @@ public class Library extends DomainResource { if (!(other instanceof Library)) return false; Library o = (Library) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(moduleMetadata, o.moduleMetadata, true) - && compareDeep(moduleDefinition, o.moduleDefinition, true) && compareDeep(document, o.document, true) - ; + return compareDeep(moduleMetadata, o.moduleMetadata, true) && compareDeep(model, o.model, true) + && compareDeep(library, o.library, true) && compareDeep(codeSystem, o.codeSystem, true) && compareDeep(valueSet, o.valueSet, true) + && compareDeep(parameter, o.parameter, true) && compareDeep(dataRequirement, o.dataRequirement, true) + && compareDeep(document, o.document, true); } @Override @@ -404,13 +1715,12 @@ public class Library extends DomainResource { if (!(other instanceof Library)) return false; Library o = (Library) other; - return compareValues(version, o.version, true); + return true; } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) - && (moduleMetadata == null || moduleMetadata.isEmpty()) && (moduleDefinition == null || moduleDefinition.isEmpty()) - && (document == null || document.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( moduleMetadata, model, library + , codeSystem, valueSet, parameter, dataRequirement, document); } @Override @@ -418,6 +1728,126 @@ public class Library extends DomainResource { return ResourceType.Library; } + /** + * Search parameter: identifier + *

+ * Description: Logical identifier for the module (e.g. CMS-143)
+ * Type: token
+ * Path: Library.moduleMetadata.identifier
+ *

+ */ + @SearchParamDefinition(name="identifier", path="Library.moduleMetadata.identifier", description="Logical identifier for the module (e.g. CMS-143)", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + /** + * Fluent Client search parameter constant for identifier + *

+ * Description: Logical identifier for the module (e.g. CMS-143)
+ * Type: token
+ * Path: Library.moduleMetadata.identifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); + + /** + * Search parameter: topic + *

+ * Description: Topics associated with the module
+ * Type: token
+ * Path: Library.moduleMetadata.topic
+ *

+ */ + @SearchParamDefinition(name="topic", path="Library.moduleMetadata.topic", description="Topics associated with the module", type="token" ) + public static final String SP_TOPIC = "topic"; + /** + * Fluent Client search parameter constant for topic + *

+ * Description: Topics associated with the module
+ * Type: token
+ * Path: Library.moduleMetadata.topic
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TOPIC); + + /** + * Search parameter: description + *

+ * Description: Text search against the description
+ * Type: string
+ * Path: Library.moduleMetadata.description
+ *

+ */ + @SearchParamDefinition(name="description", path="Library.moduleMetadata.description", description="Text search against the description", type="string" ) + public static final String SP_DESCRIPTION = "description"; + /** + * Fluent Client search parameter constant for description + *

+ * Description: Text search against the description
+ * Type: string
+ * Path: Library.moduleMetadata.description
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); + + /** + * Search parameter: title + *

+ * Description: Text search against the title
+ * Type: string
+ * Path: Library.moduleMetadata.title
+ *

+ */ + @SearchParamDefinition(name="title", path="Library.moduleMetadata.title", description="Text search against the title", type="string" ) + public static final String SP_TITLE = "title"; + /** + * Fluent Client search parameter constant for title + *

+ * Description: Text search against the title
+ * Type: string
+ * Path: Library.moduleMetadata.title
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); + + /** + * Search parameter: version + *

+ * Description: Version of the module (e.g. 1.0.0)
+ * Type: string
+ * Path: Library.moduleMetadata.version
+ *

+ */ + @SearchParamDefinition(name="version", path="Library.moduleMetadata.version", description="Version of the module (e.g. 1.0.0)", type="string" ) + public static final String SP_VERSION = "version"; + /** + * Fluent Client search parameter constant for version + *

+ * Description: Version of the module (e.g. 1.0.0)
+ * Type: string
+ * Path: Library.moduleMetadata.version
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam VERSION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_VERSION); + + /** + * Search parameter: status + *

+ * Description: Status of the module
+ * Type: token
+ * Path: Library.moduleMetadata.status
+ *

+ */ + @SearchParamDefinition(name="status", path="Library.moduleMetadata.status", description="Status of the module", type="token" ) + public static final String SP_STATUS = "status"; + /** + * Fluent Client search parameter constant for status + *

+ * Description: Status of the module
+ * Type: token
+ * Path: Library.moduleMetadata.status
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); + } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Linkage.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Linkage.java index 6d9f46b06db..90890dc5fc7 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Linkage.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Linkage.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Identifies two or more records (resource instances) that are referring to the same real-world "occurrence". */ @@ -312,8 +311,7 @@ public class Linkage extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (resource == null || resource.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, resource); } public String fhirType() { @@ -501,8 +499,7 @@ public class Linkage extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (author == null || author.isEmpty()) && (item == null || item.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( author, item); } @Override @@ -544,7 +541,7 @@ public class Linkage extends DomainResource { * Path: Linkage.author
*

*/ - @SearchParamDefinition(name="author", path="Linkage.author", description="Author of the Linkage", type="reference" ) + @SearchParamDefinition(name="author", path="Linkage.author", description="Author of the Linkage", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_AUTHOR = "author"; /** * Fluent Client search parameter constant for author diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ListResource.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ListResource.java index 075d23b502f..c3c4e6d5f5c 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ListResource.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ListResource.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A set of information summarized from a list of other resources. */ @@ -537,8 +536,7 @@ public class ListResource extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (flag == null || flag.isEmpty()) && (deleted == null || deleted.isEmpty()) - && (date == null || date.isEmpty()) && (item == null || item.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( flag, deleted, date, item); } public String fhirType() { @@ -1340,11 +1338,8 @@ public class ListResource extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) - && (mode == null || mode.isEmpty()) && (title == null || title.isEmpty()) && (code == null || code.isEmpty()) - && (subject == null || subject.isEmpty()) && (encounter == null || encounter.isEmpty()) && (date == null || date.isEmpty()) - && (source == null || source.isEmpty()) && (orderedBy == null || orderedBy.isEmpty()) && (note == null || note.isEmpty()) - && (entry == null || entry.isEmpty()) && (emptyReason == null || emptyReason.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, mode, title + , code, subject, encounter, date, source, orderedBy, note, entry, emptyReason); } @Override diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Location.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Location.java index 8e4c5d31aad..ef49ac4b103 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Location.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Location.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -40,9 +40,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained or accommodated. */ @@ -539,8 +538,8 @@ public class Location extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (longitude == null || longitude.isEmpty()) && (latitude == null || latitude.isEmpty()) - && (altitude == null || altitude.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( longitude, latitude, altitude + ); } public String fhirType() { @@ -575,7 +574,7 @@ public class Location extends DomainResource { * Description of the Location, which helps in finding or referencing the place. */ @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Description of the location", formalDefinition="Description of the Location, which helps in finding or referencing the place." ) + @Description(shortDefinition="Additional details about the location that could be displayed as further information to identify the location beyond its name", formalDefinition="Description of the Location, which helps in finding or referencing the place." ) protected StringType description; /** @@ -1268,12 +1267,9 @@ public class Location extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) - && (name == null || name.isEmpty()) && (description == null || description.isEmpty()) && (mode == null || mode.isEmpty()) - && (type == null || type.isEmpty()) && (telecom == null || telecom.isEmpty()) && (address == null || address.isEmpty()) - && (physicalType == null || physicalType.isEmpty()) && (position == null || position.isEmpty()) - && (managingOrganization == null || managingOrganization.isEmpty()) && (partOf == null || partOf.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, name, description + , mode, type, telecom, address, physicalType, position, managingOrganization, partOf + ); } @Override diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Measure.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Measure.java index 9c29e03686e..188640919d2 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Measure.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Measure.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,15 +39,220 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * The Measure resource provides the definition of a quality measure. */ @ResourceDef(name="Measure", profile="http://hl7.org/fhir/Profile/Measure") public class Measure extends DomainResource { + public enum MeasureScoring { + /** + * The measure score is defined using a proportion + */ + PROPORTION, + /** + * The measure score is defined using a ratio + */ + RATIO, + /** + * The score is defined by a calculation of some quantity + */ + CONTINUOUSVARIABLE, + /** + * The measure is a cohort definition + */ + COHORT, + /** + * added to help the parsers + */ + NULL; + public static MeasureScoring fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proportion".equals(codeString)) + return PROPORTION; + if ("ratio".equals(codeString)) + return RATIO; + if ("continuous-variable".equals(codeString)) + return CONTINUOUSVARIABLE; + if ("cohort".equals(codeString)) + return COHORT; + throw new FHIRException("Unknown MeasureScoring code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPORTION: return "proportion"; + case RATIO: return "ratio"; + case CONTINUOUSVARIABLE: return "continuous-variable"; + case COHORT: return "cohort"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PROPORTION: return "http://hl7.org/fhir/measure-scoring"; + case RATIO: return "http://hl7.org/fhir/measure-scoring"; + case CONTINUOUSVARIABLE: return "http://hl7.org/fhir/measure-scoring"; + case COHORT: return "http://hl7.org/fhir/measure-scoring"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PROPORTION: return "The measure score is defined using a proportion"; + case RATIO: return "The measure score is defined using a ratio"; + case CONTINUOUSVARIABLE: return "The score is defined by a calculation of some quantity"; + case COHORT: return "The measure is a cohort definition"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPORTION: return "Proportion"; + case RATIO: return "Ratio"; + case CONTINUOUSVARIABLE: return "Continuous Variable"; + case COHORT: return "Cohort"; + default: return "?"; + } + } + } + + public static class MeasureScoringEnumFactory implements EnumFactory { + public MeasureScoring fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("proportion".equals(codeString)) + return MeasureScoring.PROPORTION; + if ("ratio".equals(codeString)) + return MeasureScoring.RATIO; + if ("continuous-variable".equals(codeString)) + return MeasureScoring.CONTINUOUSVARIABLE; + if ("cohort".equals(codeString)) + return MeasureScoring.COHORT; + throw new IllegalArgumentException("Unknown MeasureScoring code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("proportion".equals(codeString)) + return new Enumeration(this, MeasureScoring.PROPORTION); + if ("ratio".equals(codeString)) + return new Enumeration(this, MeasureScoring.RATIO); + if ("continuous-variable".equals(codeString)) + return new Enumeration(this, MeasureScoring.CONTINUOUSVARIABLE); + if ("cohort".equals(codeString)) + return new Enumeration(this, MeasureScoring.COHORT); + throw new FHIRException("Unknown MeasureScoring code '"+codeString+"'"); + } + public String toCode(MeasureScoring code) { + if (code == MeasureScoring.PROPORTION) + return "proportion"; + if (code == MeasureScoring.RATIO) + return "ratio"; + if (code == MeasureScoring.CONTINUOUSVARIABLE) + return "continuous-variable"; + if (code == MeasureScoring.COHORT) + return "cohort"; + return "?"; + } + public String toSystem(MeasureScoring code) { + return code.getSystem(); + } + } + + public enum MeasureType { + /** + * The measure is a process measure + */ + PROCESS, + /** + * The measure is an outcome measure + */ + OUTCOME, + /** + * added to help the parsers + */ + NULL; + public static MeasureType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("process".equals(codeString)) + return PROCESS; + if ("outcome".equals(codeString)) + return OUTCOME; + throw new FHIRException("Unknown MeasureType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROCESS: return "process"; + case OUTCOME: return "outcome"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PROCESS: return "http://hl7.org/fhir/measure-type"; + case OUTCOME: return "http://hl7.org/fhir/measure-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PROCESS: return "The measure is a process measure"; + case OUTCOME: return "The measure is an outcome measure"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROCESS: return "Process"; + case OUTCOME: return "Outcome"; + default: return "?"; + } + } + } + + public static class MeasureTypeEnumFactory implements EnumFactory { + public MeasureType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("process".equals(codeString)) + return MeasureType.PROCESS; + if ("outcome".equals(codeString)) + return MeasureType.OUTCOME; + throw new IllegalArgumentException("Unknown MeasureType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("process".equals(codeString)) + return new Enumeration(this, MeasureType.PROCESS); + if ("outcome".equals(codeString)) + return new Enumeration(this, MeasureType.OUTCOME); + throw new FHIRException("Unknown MeasureType code '"+codeString+"'"); + } + public String toCode(MeasureType code) { + if (code == MeasureType.PROCESS) + return "process"; + if (code == MeasureType.OUTCOME) + return "outcome"; + return "?"; + } + public String toSystem(MeasureType code) { + return code.getSystem(); + } + } + public enum MeasurePopulationType { /** * The initial population for the measure @@ -247,51 +452,501 @@ public class Measure extends DomainResource { } } - @Block() - public static class MeasurePopulationComponent extends BackboneElement implements IBaseBackboneElement { + public enum MeasureDataUsage { /** - * The type of population criteria. + * The data is intended to be provided as additional information alongside the measure results */ - @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="initial-population | numerator | numerator-exclusion | denominator | denominator-exclusion | denominator-exception | measure-population | measure-population-exclusion | measure-score", formalDefinition="The type of population criteria." ) - protected Enumeration type; + SUPPLEMENTALDATA, + /** + * The data is intended to be used to calculate and apply a risk adjustment model for the measure + */ + RISKADJUSTMENTFACTOR, + /** + * added to help the parsers + */ + NULL; + public static MeasureDataUsage fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("supplemental-data".equals(codeString)) + return SUPPLEMENTALDATA; + if ("risk-adjustment-factor".equals(codeString)) + return RISKADJUSTMENTFACTOR; + throw new FHIRException("Unknown MeasureDataUsage code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SUPPLEMENTALDATA: return "supplemental-data"; + case RISKADJUSTMENTFACTOR: return "risk-adjustment-factor"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case SUPPLEMENTALDATA: return "http://hl7.org/fhir/measure-data-usage"; + case RISKADJUSTMENTFACTOR: return "http://hl7.org/fhir/measure-data-usage"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case SUPPLEMENTALDATA: return "The data is intended to be provided as additional information alongside the measure results"; + case RISKADJUSTMENTFACTOR: return "The data is intended to be used to calculate and apply a risk adjustment model for the measure"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SUPPLEMENTALDATA: return "Supplemental Data"; + case RISKADJUSTMENTFACTOR: return "Risk Adjustment Factor"; + default: return "?"; + } + } + } + + public static class MeasureDataUsageEnumFactory implements EnumFactory { + public MeasureDataUsage fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("supplemental-data".equals(codeString)) + return MeasureDataUsage.SUPPLEMENTALDATA; + if ("risk-adjustment-factor".equals(codeString)) + return MeasureDataUsage.RISKADJUSTMENTFACTOR; + throw new IllegalArgumentException("Unknown MeasureDataUsage code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("supplemental-data".equals(codeString)) + return new Enumeration(this, MeasureDataUsage.SUPPLEMENTALDATA); + if ("risk-adjustment-factor".equals(codeString)) + return new Enumeration(this, MeasureDataUsage.RISKADJUSTMENTFACTOR); + throw new FHIRException("Unknown MeasureDataUsage code '"+codeString+"'"); + } + public String toCode(MeasureDataUsage code) { + if (code == MeasureDataUsage.SUPPLEMENTALDATA) + return "supplemental-data"; + if (code == MeasureDataUsage.RISKADJUSTMENTFACTOR) + return "risk-adjustment-factor"; + return "?"; + } + public String toSystem(MeasureDataUsage code) { + return code.getSystem(); + } + } + + @Block() + public static class MeasureGroupComponent extends BackboneElement implements IBaseBackboneElement { + /** + * A unique identifier for the group. This identifier will used to report data for the group in the measure report. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Unique identifier", formalDefinition="A unique identifier for the group. This identifier will used to report data for the group in the measure report." ) + protected Identifier identifier; /** - * Optional name or short description of this population. + * Optional name or short description of this group. */ - @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Optional name or short description of this population." ) + @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Short name", formalDefinition="Optional name or short description of this group." ) protected StringType name; /** - * The human readable description of this population criteria. + * The human readable description of this population group. */ - @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The human readable description of this population criteria." ) + @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Summary description", formalDefinition="The human readable description of this population group." ) protected StringType description; /** - * The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria. + * A population criteria for the measure. */ - @Child(name = "criteria", type = {StringType.class}, order=4, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria." ) - protected StringType criteria; + @Child(name = "population", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Population criteria", formalDefinition="A population criteria for the measure." ) + protected List population; - private static final long serialVersionUID = 1825597517L; + /** + * The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library, or a valid FHIR Resource Path. + */ + @Child(name = "stratifier", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Stratifier criteria for the measure", formalDefinition="The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library, or a valid FHIR Resource Path." ) + protected List stratifier; + + private static final long serialVersionUID = 1287622059L; /** * Constructor */ - public MeasurePopulationComponent() { + public MeasureGroupComponent() { super(); } /** * Constructor */ - public MeasurePopulationComponent(Enumeration type, StringType criteria) { + public MeasureGroupComponent(Identifier identifier) { + super(); + this.identifier = identifier; + } + + /** + * @return {@link #identifier} (A unique identifier for the group. This identifier will used to report data for the group in the measure report.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureGroupComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (A unique identifier for the group. This identifier will used to report data for the group in the measure report.) + */ + public MeasureGroupComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #name} (Optional name or short description of this group.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureGroupComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Optional name or short description of this group.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public MeasureGroupComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return Optional name or short description of this group. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Optional name or short description of this group. + */ + public MeasureGroupComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (The human readable description of this population group.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureGroupComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (The human readable description of this population group.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public MeasureGroupComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return The human readable description of this population group. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value The human readable description of this population group. + */ + public MeasureGroupComponent setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #population} (A population criteria for the measure.) + */ + public List getPopulation() { + if (this.population == null) + this.population = new ArrayList(); + return this.population; + } + + public boolean hasPopulation() { + if (this.population == null) + return false; + for (MeasureGroupPopulationComponent item : this.population) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #population} (A population criteria for the measure.) + */ + // syntactic sugar + public MeasureGroupPopulationComponent addPopulation() { //3 + MeasureGroupPopulationComponent t = new MeasureGroupPopulationComponent(); + if (this.population == null) + this.population = new ArrayList(); + this.population.add(t); + return t; + } + + // syntactic sugar + public MeasureGroupComponent addPopulation(MeasureGroupPopulationComponent t) { //3 + if (t == null) + return this; + if (this.population == null) + this.population = new ArrayList(); + this.population.add(t); + return this; + } + + /** + * @return {@link #stratifier} (The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library, or a valid FHIR Resource Path.) + */ + public List getStratifier() { + if (this.stratifier == null) + this.stratifier = new ArrayList(); + return this.stratifier; + } + + public boolean hasStratifier() { + if (this.stratifier == null) + return false; + for (MeasureGroupStratifierComponent item : this.stratifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #stratifier} (The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library, or a valid FHIR Resource Path.) + */ + // syntactic sugar + public MeasureGroupStratifierComponent addStratifier() { //3 + MeasureGroupStratifierComponent t = new MeasureGroupStratifierComponent(); + if (this.stratifier == null) + this.stratifier = new ArrayList(); + this.stratifier.add(t); + return t; + } + + // syntactic sugar + public MeasureGroupComponent addStratifier(MeasureGroupStratifierComponent t) { //3 + if (t == null) + return this; + if (this.stratifier == null) + this.stratifier = new ArrayList(); + this.stratifier.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "A unique identifier for the group. This identifier will used to report data for the group in the measure report.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("name", "string", "Optional name or short description of this group.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("description", "string", "The human readable description of this population group.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("population", "", "A population criteria for the measure.", 0, java.lang.Integer.MAX_VALUE, population)); + childrenList.add(new Property("stratifier", "", "The stratifier criteria for the measure report, specified as either the name of a valid CQL expression defined within a referenced library, or a valid FHIR Resource Path.", 0, java.lang.Integer.MAX_VALUE, stratifier)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("population")) + this.getPopulation().add((MeasureGroupPopulationComponent) value); + else if (name.equals("stratifier")) + this.getStratifier().add((MeasureGroupStratifierComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.name"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.description"); + } + else if (name.equals("population")) { + return addPopulation(); + } + else if (name.equals("stratifier")) { + return addStratifier(); + } + else + return super.addChild(name); + } + + public MeasureGroupComponent copy() { + MeasureGroupComponent dst = new MeasureGroupComponent(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.name = name == null ? null : name.copy(); + dst.description = description == null ? null : description.copy(); + if (population != null) { + dst.population = new ArrayList(); + for (MeasureGroupPopulationComponent i : population) + dst.population.add(i.copy()); + }; + if (stratifier != null) { + dst.stratifier = new ArrayList(); + for (MeasureGroupStratifierComponent i : stratifier) + dst.stratifier.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MeasureGroupComponent)) + return false; + MeasureGroupComponent o = (MeasureGroupComponent) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) + && compareDeep(population, o.population, true) && compareDeep(stratifier, o.stratifier, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MeasureGroupComponent)) + return false; + MeasureGroupComponent o = (MeasureGroupComponent) other; + return compareValues(name, o.name, true) && compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, name, description + , population, stratifier); + } + + public String fhirType() { + return "Measure.group"; + + } + + } + + @Block() + public static class MeasureGroupPopulationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The type of population criteria. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="initial-population | numerator | numerator-exclusion | denominator | denominator-exclusion | denominator-exception | measure-population | measure-population-exclusion | measure-score", formalDefinition="The type of population criteria." ) + protected Enumeration type; + + /** + * A unique identifier for the population criteria. This identifier is used to report data against this criteria within the measure report. + */ + @Child(name = "identifier", type = {Identifier.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Unique identifier", formalDefinition="A unique identifier for the population criteria. This identifier is used to report data against this criteria within the measure report." ) + protected Identifier identifier; + + /** + * Optional name or short description of this population. + */ + @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Short name", formalDefinition="Optional name or short description of this population." ) + protected StringType name; + + /** + * The human readable description of this population criteria. + */ + @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The human readable description of this population criteria", formalDefinition="The human readable description of this population criteria." ) + protected StringType description; + + /** + * The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria. + */ + @Child(name = "criteria", type = {StringType.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria", formalDefinition="The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria." ) + protected StringType criteria; + + private static final long serialVersionUID = 1158202275L; + + /** + * Constructor + */ + public MeasureGroupPopulationComponent() { + super(); + } + + /** + * Constructor + */ + public MeasureGroupPopulationComponent(Enumeration type, Identifier identifier, StringType criteria) { super(); this.type = type; + this.identifier = identifier; this.criteria = criteria; } @@ -301,7 +956,7 @@ public class Measure extends DomainResource { public Enumeration getTypeElement() { if (this.type == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MeasurePopulationComponent.type"); + throw new Error("Attempt to auto-create MeasureGroupPopulationComponent.type"); else if (Configuration.doAutoCreate()) this.type = new Enumeration(new MeasurePopulationTypeEnumFactory()); // bb return this.type; @@ -318,7 +973,7 @@ public class Measure extends DomainResource { /** * @param value {@link #type} (The type of population criteria.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value */ - public MeasurePopulationComponent setTypeElement(Enumeration value) { + public MeasureGroupPopulationComponent setTypeElement(Enumeration value) { this.type = value; return this; } @@ -333,20 +988,44 @@ public class Measure extends DomainResource { /** * @param value The type of population criteria. */ - public MeasurePopulationComponent setType(MeasurePopulationType value) { + public MeasureGroupPopulationComponent setType(MeasurePopulationType value) { if (this.type == null) this.type = new Enumeration(new MeasurePopulationTypeEnumFactory()); this.type.setValue(value); return this; } + /** + * @return {@link #identifier} (A unique identifier for the population criteria. This identifier is used to report data against this criteria within the measure report.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureGroupPopulationComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (A unique identifier for the population criteria. This identifier is used to report data against this criteria within the measure report.) + */ + public MeasureGroupPopulationComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + /** * @return {@link #name} (Optional name or short description of this population.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ public StringType getNameElement() { if (this.name == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MeasurePopulationComponent.name"); + throw new Error("Attempt to auto-create MeasureGroupPopulationComponent.name"); else if (Configuration.doAutoCreate()) this.name = new StringType(); // bb return this.name; @@ -363,7 +1042,7 @@ public class Measure extends DomainResource { /** * @param value {@link #name} (Optional name or short description of this population.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ - public MeasurePopulationComponent setNameElement(StringType value) { + public MeasureGroupPopulationComponent setNameElement(StringType value) { this.name = value; return this; } @@ -378,7 +1057,7 @@ public class Measure extends DomainResource { /** * @param value Optional name or short description of this population. */ - public MeasurePopulationComponent setName(String value) { + public MeasureGroupPopulationComponent setName(String value) { if (Utilities.noString(value)) this.name = null; else { @@ -395,7 +1074,7 @@ public class Measure extends DomainResource { public StringType getDescriptionElement() { if (this.description == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MeasurePopulationComponent.description"); + throw new Error("Attempt to auto-create MeasureGroupPopulationComponent.description"); else if (Configuration.doAutoCreate()) this.description = new StringType(); // bb return this.description; @@ -412,7 +1091,7 @@ public class Measure extends DomainResource { /** * @param value {@link #description} (The human readable description of this population criteria.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value */ - public MeasurePopulationComponent setDescriptionElement(StringType value) { + public MeasureGroupPopulationComponent setDescriptionElement(StringType value) { this.description = value; return this; } @@ -427,7 +1106,7 @@ public class Measure extends DomainResource { /** * @param value The human readable description of this population criteria. */ - public MeasurePopulationComponent setDescription(String value) { + public MeasureGroupPopulationComponent setDescription(String value) { if (Utilities.noString(value)) this.description = null; else { @@ -444,7 +1123,7 @@ public class Measure extends DomainResource { public StringType getCriteriaElement() { if (this.criteria == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MeasurePopulationComponent.criteria"); + throw new Error("Attempt to auto-create MeasureGroupPopulationComponent.criteria"); else if (Configuration.doAutoCreate()) this.criteria = new StringType(); // bb return this.criteria; @@ -461,7 +1140,7 @@ public class Measure extends DomainResource { /** * @param value {@link #criteria} (The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria.). This is the underlying object with id, value and extensions. The accessor "getCriteria" gives direct access to the value */ - public MeasurePopulationComponent setCriteriaElement(StringType value) { + public MeasureGroupPopulationComponent setCriteriaElement(StringType value) { this.criteria = value; return this; } @@ -476,7 +1155,7 @@ public class Measure extends DomainResource { /** * @param value The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria. */ - public MeasurePopulationComponent setCriteria(String value) { + public MeasureGroupPopulationComponent setCriteria(String value) { if (this.criteria == null) this.criteria = new StringType(); this.criteria.setValue(value); @@ -486,6 +1165,7 @@ public class Measure extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("type", "code", "The type of population criteria.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("identifier", "Identifier", "A unique identifier for the population criteria. This identifier is used to report data against this criteria within the measure report.", 0, java.lang.Integer.MAX_VALUE, identifier)); childrenList.add(new Property("name", "string", "Optional name or short description of this population.", 0, java.lang.Integer.MAX_VALUE, name)); childrenList.add(new Property("description", "string", "The human readable description of this population criteria.", 0, java.lang.Integer.MAX_VALUE, description)); childrenList.add(new Property("criteria", "string", "The name of a valid referenced CQL expression (may be namespaced) that defines this population criteria.", 0, java.lang.Integer.MAX_VALUE, criteria)); @@ -495,6 +1175,8 @@ public class Measure extends DomainResource { public void setProperty(String name, Base value) throws FHIRException { if (name.equals("type")) this.type = new MeasurePopulationTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier else if (name.equals("name")) this.name = castToString(value); // StringType else if (name.equals("description")) @@ -510,6 +1192,10 @@ public class Measure extends DomainResource { if (name.equals("type")) { throw new FHIRException("Cannot call addChild on a primitive type Measure.type"); } + else if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } else if (name.equals("name")) { throw new FHIRException("Cannot call addChild on a primitive type Measure.name"); } @@ -523,10 +1209,11 @@ public class Measure extends DomainResource { return super.addChild(name); } - public MeasurePopulationComponent copy() { - MeasurePopulationComponent dst = new MeasurePopulationComponent(); + public MeasureGroupPopulationComponent copy() { + MeasureGroupPopulationComponent dst = new MeasureGroupPopulationComponent(); copyValues(dst); dst.type = type == null ? null : type.copy(); + dst.identifier = identifier == null ? null : identifier.copy(); dst.name = name == null ? null : name.copy(); dst.description = description == null ? null : description.copy(); dst.criteria = criteria == null ? null : criteria.copy(); @@ -537,67 +1224,597 @@ public class Measure extends DomainResource { public boolean equalsDeep(Base other) { if (!super.equalsDeep(other)) return false; - if (!(other instanceof MeasurePopulationComponent)) + if (!(other instanceof MeasureGroupPopulationComponent)) return false; - MeasurePopulationComponent o = (MeasurePopulationComponent) other; - return compareDeep(type, o.type, true) && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) - && compareDeep(criteria, o.criteria, true); + MeasureGroupPopulationComponent o = (MeasureGroupPopulationComponent) other; + return compareDeep(type, o.type, true) && compareDeep(identifier, o.identifier, true) && compareDeep(name, o.name, true) + && compareDeep(description, o.description, true) && compareDeep(criteria, o.criteria, true); } @Override public boolean equalsShallow(Base other) { if (!super.equalsShallow(other)) return false; - if (!(other instanceof MeasurePopulationComponent)) + if (!(other instanceof MeasureGroupPopulationComponent)) return false; - MeasurePopulationComponent o = (MeasurePopulationComponent) other; + MeasureGroupPopulationComponent o = (MeasureGroupPopulationComponent) other; return compareValues(type, o.type, true) && compareValues(name, o.name, true) && compareValues(description, o.description, true) && compareValues(criteria, o.criteria, true); } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (name == null || name.isEmpty()) - && (description == null || description.isEmpty()) && (criteria == null || criteria.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, identifier, name, description + , criteria); } public String fhirType() { - return "Measure.population"; + return "Measure.group.population"; + + } + + } + + @Block() + public static class MeasureGroupStratifierComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The identifier for the stratifier used to coordinate the reported data back to this stratifier. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The identifier for the stratifier used to coordinate the reported data back to this stratifier", formalDefinition="The identifier for the stratifier used to coordinate the reported data back to this stratifier." ) + protected Identifier identifier; + + /** + * The criteria for the stratifier. This must be the name of an expression defined within a referenced library. + */ + @Child(name = "criteria", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Stratifier criteria", formalDefinition="The criteria for the stratifier. This must be the name of an expression defined within a referenced library." ) + protected StringType criteria; + + /** + * The path to an element that defines the stratifier, specified as a valid FHIR resource path. + */ + @Child(name = "path", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Path to the stratifier", formalDefinition="The path to an element that defines the stratifier, specified as a valid FHIR resource path." ) + protected StringType path; + + private static final long serialVersionUID = -196134448L; + + /** + * Constructor + */ + public MeasureGroupStratifierComponent() { + super(); + } + + /** + * Constructor + */ + public MeasureGroupStratifierComponent(Identifier identifier) { + super(); + this.identifier = identifier; + } + + /** + * @return {@link #identifier} (The identifier for the stratifier used to coordinate the reported data back to this stratifier.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureGroupStratifierComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (The identifier for the stratifier used to coordinate the reported data back to this stratifier.) + */ + public MeasureGroupStratifierComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #criteria} (The criteria for the stratifier. This must be the name of an expression defined within a referenced library.). This is the underlying object with id, value and extensions. The accessor "getCriteria" gives direct access to the value + */ + public StringType getCriteriaElement() { + if (this.criteria == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureGroupStratifierComponent.criteria"); + else if (Configuration.doAutoCreate()) + this.criteria = new StringType(); // bb + return this.criteria; + } + + public boolean hasCriteriaElement() { + return this.criteria != null && !this.criteria.isEmpty(); + } + + public boolean hasCriteria() { + return this.criteria != null && !this.criteria.isEmpty(); + } + + /** + * @param value {@link #criteria} (The criteria for the stratifier. This must be the name of an expression defined within a referenced library.). This is the underlying object with id, value and extensions. The accessor "getCriteria" gives direct access to the value + */ + public MeasureGroupStratifierComponent setCriteriaElement(StringType value) { + this.criteria = value; + return this; + } + + /** + * @return The criteria for the stratifier. This must be the name of an expression defined within a referenced library. + */ + public String getCriteria() { + return this.criteria == null ? null : this.criteria.getValue(); + } + + /** + * @param value The criteria for the stratifier. This must be the name of an expression defined within a referenced library. + */ + public MeasureGroupStratifierComponent setCriteria(String value) { + if (Utilities.noString(value)) + this.criteria = null; + else { + if (this.criteria == null) + this.criteria = new StringType(); + this.criteria.setValue(value); + } + return this; + } + + /** + * @return {@link #path} (The path to an element that defines the stratifier, specified as a valid FHIR resource path.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public StringType getPathElement() { + if (this.path == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureGroupStratifierComponent.path"); + else if (Configuration.doAutoCreate()) + this.path = new StringType(); // bb + return this.path; + } + + public boolean hasPathElement() { + return this.path != null && !this.path.isEmpty(); + } + + public boolean hasPath() { + return this.path != null && !this.path.isEmpty(); + } + + /** + * @param value {@link #path} (The path to an element that defines the stratifier, specified as a valid FHIR resource path.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public MeasureGroupStratifierComponent setPathElement(StringType value) { + this.path = value; + return this; + } + + /** + * @return The path to an element that defines the stratifier, specified as a valid FHIR resource path. + */ + public String getPath() { + return this.path == null ? null : this.path.getValue(); + } + + /** + * @param value The path to an element that defines the stratifier, specified as a valid FHIR resource path. + */ + public MeasureGroupStratifierComponent setPath(String value) { + if (Utilities.noString(value)) + this.path = null; + else { + if (this.path == null) + this.path = new StringType(); + this.path.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "The identifier for the stratifier used to coordinate the reported data back to this stratifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("criteria", "string", "The criteria for the stratifier. This must be the name of an expression defined within a referenced library.", 0, java.lang.Integer.MAX_VALUE, criteria)); + childrenList.add(new Property("path", "string", "The path to an element that defines the stratifier, specified as a valid FHIR resource path.", 0, java.lang.Integer.MAX_VALUE, path)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("criteria")) + this.criteria = castToString(value); // StringType + else if (name.equals("path")) + this.path = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("criteria")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.criteria"); + } + else if (name.equals("path")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.path"); + } + else + return super.addChild(name); + } + + public MeasureGroupStratifierComponent copy() { + MeasureGroupStratifierComponent dst = new MeasureGroupStratifierComponent(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.criteria = criteria == null ? null : criteria.copy(); + dst.path = path == null ? null : path.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MeasureGroupStratifierComponent)) + return false; + MeasureGroupStratifierComponent o = (MeasureGroupStratifierComponent) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(criteria, o.criteria, true) && compareDeep(path, o.path, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MeasureGroupStratifierComponent)) + return false; + MeasureGroupStratifierComponent o = (MeasureGroupStratifierComponent) other; + return compareValues(criteria, o.criteria, true) && compareValues(path, o.path, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, criteria, path); + } + + public String fhirType() { + return "Measure.group.stratifier"; + + } + + } + + @Block() + public static class MeasureSupplementalDataComponent extends BackboneElement implements IBaseBackboneElement { + /** + * An identifier for the supplemental data. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Identifier, unique within the measure", formalDefinition="An identifier for the supplemental data." ) + protected Identifier identifier; + + /** + * An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation. + */ + @Child(name = "usage", type = {CodeType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="supplemental-data | risk-adjustment-factor", formalDefinition="An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation." ) + protected List> usage; + + /** + * The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element. + */ + @Child(name = "criteria", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Supplemental data criteria", formalDefinition="The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element." ) + protected StringType criteria; + + /** + * The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path. + */ + @Child(name = "path", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Path to the supplemental data element", formalDefinition="The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path." ) + protected StringType path; + + private static final long serialVersionUID = 1666728717L; + + /** + * Constructor + */ + public MeasureSupplementalDataComponent() { + super(); + } + + /** + * Constructor + */ + public MeasureSupplementalDataComponent(Identifier identifier) { + super(); + this.identifier = identifier; + } + + /** + * @return {@link #identifier} (An identifier for the supplemental data.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureSupplementalDataComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (An identifier for the supplemental data.) + */ + public MeasureSupplementalDataComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #usage} (An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.) + */ + public List> getUsage() { + if (this.usage == null) + this.usage = new ArrayList>(); + return this.usage; + } + + public boolean hasUsage() { + if (this.usage == null) + return false; + for (Enumeration item : this.usage) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #usage} (An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.) + */ + // syntactic sugar + public Enumeration addUsageElement() {//2 + Enumeration t = new Enumeration(new MeasureDataUsageEnumFactory()); + if (this.usage == null) + this.usage = new ArrayList>(); + this.usage.add(t); + return t; + } + + /** + * @param value {@link #usage} (An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.) + */ + public MeasureSupplementalDataComponent addUsage(MeasureDataUsage value) { //1 + Enumeration t = new Enumeration(new MeasureDataUsageEnumFactory()); + t.setValue(value); + if (this.usage == null) + this.usage = new ArrayList>(); + this.usage.add(t); + return this; + } + + /** + * @param value {@link #usage} (An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.) + */ + public boolean hasUsage(MeasureDataUsage value) { + if (this.usage == null) + return false; + for (Enumeration v : this.usage) + if (v.equals(value)) // code + return true; + return false; + } + + /** + * @return {@link #criteria} (The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element.). This is the underlying object with id, value and extensions. The accessor "getCriteria" gives direct access to the value + */ + public StringType getCriteriaElement() { + if (this.criteria == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureSupplementalDataComponent.criteria"); + else if (Configuration.doAutoCreate()) + this.criteria = new StringType(); // bb + return this.criteria; + } + + public boolean hasCriteriaElement() { + return this.criteria != null && !this.criteria.isEmpty(); + } + + public boolean hasCriteria() { + return this.criteria != null && !this.criteria.isEmpty(); + } + + /** + * @param value {@link #criteria} (The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element.). This is the underlying object with id, value and extensions. The accessor "getCriteria" gives direct access to the value + */ + public MeasureSupplementalDataComponent setCriteriaElement(StringType value) { + this.criteria = value; + return this; + } + + /** + * @return The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element. + */ + public String getCriteria() { + return this.criteria == null ? null : this.criteria.getValue(); + } + + /** + * @param value The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element. + */ + public MeasureSupplementalDataComponent setCriteria(String value) { + if (Utilities.noString(value)) + this.criteria = null; + else { + if (this.criteria == null) + this.criteria = new StringType(); + this.criteria.setValue(value); + } + return this; + } + + /** + * @return {@link #path} (The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public StringType getPathElement() { + if (this.path == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureSupplementalDataComponent.path"); + else if (Configuration.doAutoCreate()) + this.path = new StringType(); // bb + return this.path; + } + + public boolean hasPathElement() { + return this.path != null && !this.path.isEmpty(); + } + + public boolean hasPath() { + return this.path != null && !this.path.isEmpty(); + } + + /** + * @param value {@link #path} (The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value + */ + public MeasureSupplementalDataComponent setPathElement(StringType value) { + this.path = value; + return this; + } + + /** + * @return The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path. + */ + public String getPath() { + return this.path == null ? null : this.path.getValue(); + } + + /** + * @param value The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path. + */ + public MeasureSupplementalDataComponent setPath(String value) { + if (Utilities.noString(value)) + this.path = null; + else { + if (this.path == null) + this.path = new StringType(); + this.path.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "An identifier for the supplemental data.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("usage", "code", "An indicator of the intended usage for the supplemental data element. Supplemental data indicates the data is additional information requested to augment the measure information. Risk adjustment factor indicates the data is additional information used to calculate risk adjustment factors when applying a risk model to the measure calculation.", 0, java.lang.Integer.MAX_VALUE, usage)); + childrenList.add(new Property("criteria", "string", "The criteria for the supplemental data. This must be the name of a valid expression defined within a referenced library, and defines the data to be returned for this element.", 0, java.lang.Integer.MAX_VALUE, criteria)); + childrenList.add(new Property("path", "string", "The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.", 0, java.lang.Integer.MAX_VALUE, path)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("usage")) + this.getUsage().add(new MeasureDataUsageEnumFactory().fromType(value)); + else if (name.equals("criteria")) + this.criteria = castToString(value); // StringType + else if (name.equals("path")) + this.path = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("usage")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.usage"); + } + else if (name.equals("criteria")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.criteria"); + } + else if (name.equals("path")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.path"); + } + else + return super.addChild(name); + } + + public MeasureSupplementalDataComponent copy() { + MeasureSupplementalDataComponent dst = new MeasureSupplementalDataComponent(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + if (usage != null) { + dst.usage = new ArrayList>(); + for (Enumeration i : usage) + dst.usage.add(i.copy()); + }; + dst.criteria = criteria == null ? null : criteria.copy(); + dst.path = path == null ? null : path.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MeasureSupplementalDataComponent)) + return false; + MeasureSupplementalDataComponent o = (MeasureSupplementalDataComponent) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(usage, o.usage, true) && compareDeep(criteria, o.criteria, true) + && compareDeep(path, o.path, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MeasureSupplementalDataComponent)) + return false; + MeasureSupplementalDataComponent o = (MeasureSupplementalDataComponent) other; + return compareValues(usage, o.usage, true) && compareValues(criteria, o.criteria, true) && compareValues(path, o.path, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, usage, criteria, path + ); + } + + public String fhirType() { + return "Measure.supplementalData"; } } /** - * A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact. + * The metadata for the measure, including publishing, life-cycle, version, documentation, and supporting evidence. */ - @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Logical identifier", formalDefinition="A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact." ) - protected List identifier; - - /** - * The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. - */ - @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The version of the module, if any", formalDefinition="The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification." ) - protected StringType version; - - /** - * A reference to a ModuleMetadata resource that describes the metadata for the measure. - */ - @Child(name = "moduleMetadata", type = {ModuleMetadata.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Metadata for the measure", formalDefinition="A reference to a ModuleMetadata resource that describes the metadata for the measure." ) - protected Reference moduleMetadata; - - /** - * The actual object that is the target of the reference (A reference to a ModuleMetadata resource that describes the metadata for the measure.) - */ - protected ModuleMetadata moduleMetadataTarget; + @Child(name = "moduleMetadata", type = {ModuleMetadata.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Metadata for the measure", formalDefinition="The metadata for the measure, including publishing, life-cycle, version, documentation, and supporting evidence." ) + protected ModuleMetadata moduleMetadata; /** * A reference to a Library resource containing the formal logic used by the measure. */ - @Child(name = "library", type = {Library.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "library", type = {Library.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Logic used by the measure", formalDefinition="A reference to a Library resource containing the formal logic used by the measure." ) protected List library; /** @@ -607,27 +1824,97 @@ public class Measure extends DomainResource { /** - * The measure populations. + * A disclaimer for the use of the measure. */ - @Child(name = "population", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The measure populations." ) - protected List population; + @Child(name = "disclaimer", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Disclaimer for the measure", formalDefinition="A disclaimer for the use of the measure." ) + protected MarkdownType disclaimer; /** - * The stratifier criteria for the measure report, specified as either the name of a valid referenced CQL expression or a valid FHIR Resource Path. + * The measure scoring type, e.g. proportion, CV. */ - @Child(name = "stratifier", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The stratifier criteria for the measure report, specified as either the name of a valid referenced CQL expression or a valid FHIR Resource Path." ) - protected List stratifier; + @Child(name = "scoring", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="proportion | ratio | continuous-variable | cohort", formalDefinition="The measure scoring type, e.g. proportion, CV." ) + protected Enumeration scoring; /** - * The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path. + * The measure type, e.g. process, outcome. */ - @Child(name = "supplementalData", type = {StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path." ) - protected List supplementalData; + @Child(name = "type", type = {CodeType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="process | outcome", formalDefinition="The measure type, e.g. process, outcome." ) + protected List> type; - private static final long serialVersionUID = -1534387963L; + /** + * A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results. + */ + @Child(name = "riskAdjustment", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="How is risk adjustment applied for this measure", formalDefinition="A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results." ) + protected StringType riskAdjustment; + + /** + * A description of the rate aggregation for the measure. + */ + @Child(name = "rateAggregation", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="How is rate aggregation performed for this measure", formalDefinition="A description of the rate aggregation for the measure." ) + protected StringType rateAggregation; + + /** + * The rationale for the measure. + */ + @Child(name = "rationale", type = {MarkdownType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Why does this measure exist", formalDefinition="The rationale for the measure." ) + protected MarkdownType rationale; + + /** + * The clinical recommendation statement for the measure. + */ + @Child(name = "clinicalRecommendationStatement", type = {MarkdownType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Clinical recommendation", formalDefinition="The clinical recommendation statement for the measure." ) + protected MarkdownType clinicalRecommendationStatement; + + /** + * Improvement notation for the measure, e.g. higher score indicates better quality. + */ + @Child(name = "improvementNotation", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Improvement notation for the measure, e.g. higher score indicates better quality", formalDefinition="Improvement notation for the measure, e.g. higher score indicates better quality." ) + protected StringType improvementNotation; + + /** + * A narrative description of the complete measure calculation. + */ + @Child(name = "definition", type = {MarkdownType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="A natural language definition of the measure", formalDefinition="A narrative description of the complete measure calculation." ) + protected MarkdownType definition; + + /** + * Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure. + */ + @Child(name = "guidance", type = {MarkdownType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The guidance for the measure", formalDefinition="Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure." ) + protected MarkdownType guidance; + + /** + * The measure set, e.g. Preventive Care and Screening. + */ + @Child(name = "set", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The measure set, e.g. Preventive Care and Screening", formalDefinition="The measure set, e.g. Preventive Care and Screening." ) + protected StringType set; + + /** + * A group of population criteria for the measure. + */ + @Child(name = "group", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Population criteria group", formalDefinition="A group of population criteria for the measure." ) + protected List group; + + /** + * The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path. + */ + @Child(name = "supplementalData", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Supplemental data", formalDefinition="The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path." ) + protected List supplementalData; + + private static final long serialVersionUID = -1000974672L; /** * Constructor @@ -637,103 +1924,14 @@ public class Measure extends DomainResource { } /** - * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) + * @return {@link #moduleMetadata} (The metadata for the measure, including publishing, life-cycle, version, documentation, and supporting evidence.) */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - // syntactic sugar - public Measure addIdentifier(Identifier t) { //3 - if (t == null) - return this; - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return this; - } - - /** - * @return {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value - */ - public StringType getVersionElement() { - if (this.version == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Measure.version"); - else if (Configuration.doAutoCreate()) - this.version = new StringType(); // bb - return this.version; - } - - public boolean hasVersionElement() { - return this.version != null && !this.version.isEmpty(); - } - - public boolean hasVersion() { - return this.version != null && !this.version.isEmpty(); - } - - /** - * @param value {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value - */ - public Measure setVersionElement(StringType value) { - this.version = value; - return this; - } - - /** - * @return The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. - */ - public String getVersion() { - return this.version == null ? null : this.version.getValue(); - } - - /** - * @param value The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. - */ - public Measure setVersion(String value) { - if (Utilities.noString(value)) - this.version = null; - else { - if (this.version == null) - this.version = new StringType(); - this.version.setValue(value); - } - return this; - } - - /** - * @return {@link #moduleMetadata} (A reference to a ModuleMetadata resource that describes the metadata for the measure.) - */ - public Reference getModuleMetadata() { + public ModuleMetadata getModuleMetadata() { if (this.moduleMetadata == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Measure.moduleMetadata"); else if (Configuration.doAutoCreate()) - this.moduleMetadata = new Reference(); // cc + this.moduleMetadata = new ModuleMetadata(); // cc return this.moduleMetadata; } @@ -742,33 +1940,13 @@ public class Measure extends DomainResource { } /** - * @param value {@link #moduleMetadata} (A reference to a ModuleMetadata resource that describes the metadata for the measure.) + * @param value {@link #moduleMetadata} (The metadata for the measure, including publishing, life-cycle, version, documentation, and supporting evidence.) */ - public Measure setModuleMetadata(Reference value) { + public Measure setModuleMetadata(ModuleMetadata value) { this.moduleMetadata = value; return this; } - /** - * @return {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource that describes the metadata for the measure.) - */ - public ModuleMetadata getModuleMetadataTarget() { - if (this.moduleMetadataTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Measure.moduleMetadata"); - else if (Configuration.doAutoCreate()) - this.moduleMetadataTarget = new ModuleMetadata(); // aa - return this.moduleMetadataTarget; - } - - /** - * @param value {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource that describes the metadata for the measure.) - */ - public Measure setModuleMetadataTarget(ModuleMetadata value) { - this.moduleMetadataTarget = value; - return this; - } - /** * @return {@link #library} (A reference to a Library resource containing the formal logic used by the measure.) */ @@ -831,207 +2009,731 @@ public class Measure extends DomainResource { } /** - * @return {@link #population} (The measure populations.) + * @return {@link #disclaimer} (A disclaimer for the use of the measure.). This is the underlying object with id, value and extensions. The accessor "getDisclaimer" gives direct access to the value */ - public List getPopulation() { - if (this.population == null) - this.population = new ArrayList(); - return this.population; + public MarkdownType getDisclaimerElement() { + if (this.disclaimer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Measure.disclaimer"); + else if (Configuration.doAutoCreate()) + this.disclaimer = new MarkdownType(); // bb + return this.disclaimer; } - public boolean hasPopulation() { - if (this.population == null) + public boolean hasDisclaimerElement() { + return this.disclaimer != null && !this.disclaimer.isEmpty(); + } + + public boolean hasDisclaimer() { + return this.disclaimer != null && !this.disclaimer.isEmpty(); + } + + /** + * @param value {@link #disclaimer} (A disclaimer for the use of the measure.). This is the underlying object with id, value and extensions. The accessor "getDisclaimer" gives direct access to the value + */ + public Measure setDisclaimerElement(MarkdownType value) { + this.disclaimer = value; + return this; + } + + /** + * @return A disclaimer for the use of the measure. + */ + public String getDisclaimer() { + return this.disclaimer == null ? null : this.disclaimer.getValue(); + } + + /** + * @param value A disclaimer for the use of the measure. + */ + public Measure setDisclaimer(String value) { + if (value == null) + this.disclaimer = null; + else { + if (this.disclaimer == null) + this.disclaimer = new MarkdownType(); + this.disclaimer.setValue(value); + } + return this; + } + + /** + * @return {@link #scoring} (The measure scoring type, e.g. proportion, CV.). This is the underlying object with id, value and extensions. The accessor "getScoring" gives direct access to the value + */ + public Enumeration getScoringElement() { + if (this.scoring == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Measure.scoring"); + else if (Configuration.doAutoCreate()) + this.scoring = new Enumeration(new MeasureScoringEnumFactory()); // bb + return this.scoring; + } + + public boolean hasScoringElement() { + return this.scoring != null && !this.scoring.isEmpty(); + } + + public boolean hasScoring() { + return this.scoring != null && !this.scoring.isEmpty(); + } + + /** + * @param value {@link #scoring} (The measure scoring type, e.g. proportion, CV.). This is the underlying object with id, value and extensions. The accessor "getScoring" gives direct access to the value + */ + public Measure setScoringElement(Enumeration value) { + this.scoring = value; + return this; + } + + /** + * @return The measure scoring type, e.g. proportion, CV. + */ + public MeasureScoring getScoring() { + return this.scoring == null ? null : this.scoring.getValue(); + } + + /** + * @param value The measure scoring type, e.g. proportion, CV. + */ + public Measure setScoring(MeasureScoring value) { + if (value == null) + this.scoring = null; + else { + if (this.scoring == null) + this.scoring = new Enumeration(new MeasureScoringEnumFactory()); + this.scoring.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (The measure type, e.g. process, outcome.) + */ + public List> getType() { + if (this.type == null) + this.type = new ArrayList>(); + return this.type; + } + + public boolean hasType() { + if (this.type == null) return false; - for (MeasurePopulationComponent item : this.population) + for (Enumeration item : this.type) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #population} (The measure populations.) + * @return {@link #type} (The measure type, e.g. process, outcome.) */ // syntactic sugar - public MeasurePopulationComponent addPopulation() { //3 - MeasurePopulationComponent t = new MeasurePopulationComponent(); - if (this.population == null) - this.population = new ArrayList(); - this.population.add(t); + public Enumeration addTypeElement() {//2 + Enumeration t = new Enumeration(new MeasureTypeEnumFactory()); + if (this.type == null) + this.type = new ArrayList>(); + this.type.add(t); + return t; + } + + /** + * @param value {@link #type} (The measure type, e.g. process, outcome.) + */ + public Measure addType(MeasureType value) { //1 + Enumeration t = new Enumeration(new MeasureTypeEnumFactory()); + t.setValue(value); + if (this.type == null) + this.type = new ArrayList>(); + this.type.add(t); + return this; + } + + /** + * @param value {@link #type} (The measure type, e.g. process, outcome.) + */ + public boolean hasType(MeasureType value) { + if (this.type == null) + return false; + for (Enumeration v : this.type) + if (v.equals(value)) // code + return true; + return false; + } + + /** + * @return {@link #riskAdjustment} (A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.). This is the underlying object with id, value and extensions. The accessor "getRiskAdjustment" gives direct access to the value + */ + public StringType getRiskAdjustmentElement() { + if (this.riskAdjustment == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Measure.riskAdjustment"); + else if (Configuration.doAutoCreate()) + this.riskAdjustment = new StringType(); // bb + return this.riskAdjustment; + } + + public boolean hasRiskAdjustmentElement() { + return this.riskAdjustment != null && !this.riskAdjustment.isEmpty(); + } + + public boolean hasRiskAdjustment() { + return this.riskAdjustment != null && !this.riskAdjustment.isEmpty(); + } + + /** + * @param value {@link #riskAdjustment} (A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.). This is the underlying object with id, value and extensions. The accessor "getRiskAdjustment" gives direct access to the value + */ + public Measure setRiskAdjustmentElement(StringType value) { + this.riskAdjustment = value; + return this; + } + + /** + * @return A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results. + */ + public String getRiskAdjustment() { + return this.riskAdjustment == null ? null : this.riskAdjustment.getValue(); + } + + /** + * @param value A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results. + */ + public Measure setRiskAdjustment(String value) { + if (Utilities.noString(value)) + this.riskAdjustment = null; + else { + if (this.riskAdjustment == null) + this.riskAdjustment = new StringType(); + this.riskAdjustment.setValue(value); + } + return this; + } + + /** + * @return {@link #rateAggregation} (A description of the rate aggregation for the measure.). This is the underlying object with id, value and extensions. The accessor "getRateAggregation" gives direct access to the value + */ + public StringType getRateAggregationElement() { + if (this.rateAggregation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Measure.rateAggregation"); + else if (Configuration.doAutoCreate()) + this.rateAggregation = new StringType(); // bb + return this.rateAggregation; + } + + public boolean hasRateAggregationElement() { + return this.rateAggregation != null && !this.rateAggregation.isEmpty(); + } + + public boolean hasRateAggregation() { + return this.rateAggregation != null && !this.rateAggregation.isEmpty(); + } + + /** + * @param value {@link #rateAggregation} (A description of the rate aggregation for the measure.). This is the underlying object with id, value and extensions. The accessor "getRateAggregation" gives direct access to the value + */ + public Measure setRateAggregationElement(StringType value) { + this.rateAggregation = value; + return this; + } + + /** + * @return A description of the rate aggregation for the measure. + */ + public String getRateAggregation() { + return this.rateAggregation == null ? null : this.rateAggregation.getValue(); + } + + /** + * @param value A description of the rate aggregation for the measure. + */ + public Measure setRateAggregation(String value) { + if (Utilities.noString(value)) + this.rateAggregation = null; + else { + if (this.rateAggregation == null) + this.rateAggregation = new StringType(); + this.rateAggregation.setValue(value); + } + return this; + } + + /** + * @return {@link #rationale} (The rationale for the measure.). This is the underlying object with id, value and extensions. The accessor "getRationale" gives direct access to the value + */ + public MarkdownType getRationaleElement() { + if (this.rationale == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Measure.rationale"); + else if (Configuration.doAutoCreate()) + this.rationale = new MarkdownType(); // bb + return this.rationale; + } + + public boolean hasRationaleElement() { + return this.rationale != null && !this.rationale.isEmpty(); + } + + public boolean hasRationale() { + return this.rationale != null && !this.rationale.isEmpty(); + } + + /** + * @param value {@link #rationale} (The rationale for the measure.). This is the underlying object with id, value and extensions. The accessor "getRationale" gives direct access to the value + */ + public Measure setRationaleElement(MarkdownType value) { + this.rationale = value; + return this; + } + + /** + * @return The rationale for the measure. + */ + public String getRationale() { + return this.rationale == null ? null : this.rationale.getValue(); + } + + /** + * @param value The rationale for the measure. + */ + public Measure setRationale(String value) { + if (value == null) + this.rationale = null; + else { + if (this.rationale == null) + this.rationale = new MarkdownType(); + this.rationale.setValue(value); + } + return this; + } + + /** + * @return {@link #clinicalRecommendationStatement} (The clinical recommendation statement for the measure.). This is the underlying object with id, value and extensions. The accessor "getClinicalRecommendationStatement" gives direct access to the value + */ + public MarkdownType getClinicalRecommendationStatementElement() { + if (this.clinicalRecommendationStatement == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Measure.clinicalRecommendationStatement"); + else if (Configuration.doAutoCreate()) + this.clinicalRecommendationStatement = new MarkdownType(); // bb + return this.clinicalRecommendationStatement; + } + + public boolean hasClinicalRecommendationStatementElement() { + return this.clinicalRecommendationStatement != null && !this.clinicalRecommendationStatement.isEmpty(); + } + + public boolean hasClinicalRecommendationStatement() { + return this.clinicalRecommendationStatement != null && !this.clinicalRecommendationStatement.isEmpty(); + } + + /** + * @param value {@link #clinicalRecommendationStatement} (The clinical recommendation statement for the measure.). This is the underlying object with id, value and extensions. The accessor "getClinicalRecommendationStatement" gives direct access to the value + */ + public Measure setClinicalRecommendationStatementElement(MarkdownType value) { + this.clinicalRecommendationStatement = value; + return this; + } + + /** + * @return The clinical recommendation statement for the measure. + */ + public String getClinicalRecommendationStatement() { + return this.clinicalRecommendationStatement == null ? null : this.clinicalRecommendationStatement.getValue(); + } + + /** + * @param value The clinical recommendation statement for the measure. + */ + public Measure setClinicalRecommendationStatement(String value) { + if (value == null) + this.clinicalRecommendationStatement = null; + else { + if (this.clinicalRecommendationStatement == null) + this.clinicalRecommendationStatement = new MarkdownType(); + this.clinicalRecommendationStatement.setValue(value); + } + return this; + } + + /** + * @return {@link #improvementNotation} (Improvement notation for the measure, e.g. higher score indicates better quality.). This is the underlying object with id, value and extensions. The accessor "getImprovementNotation" gives direct access to the value + */ + public StringType getImprovementNotationElement() { + if (this.improvementNotation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Measure.improvementNotation"); + else if (Configuration.doAutoCreate()) + this.improvementNotation = new StringType(); // bb + return this.improvementNotation; + } + + public boolean hasImprovementNotationElement() { + return this.improvementNotation != null && !this.improvementNotation.isEmpty(); + } + + public boolean hasImprovementNotation() { + return this.improvementNotation != null && !this.improvementNotation.isEmpty(); + } + + /** + * @param value {@link #improvementNotation} (Improvement notation for the measure, e.g. higher score indicates better quality.). This is the underlying object with id, value and extensions. The accessor "getImprovementNotation" gives direct access to the value + */ + public Measure setImprovementNotationElement(StringType value) { + this.improvementNotation = value; + return this; + } + + /** + * @return Improvement notation for the measure, e.g. higher score indicates better quality. + */ + public String getImprovementNotation() { + return this.improvementNotation == null ? null : this.improvementNotation.getValue(); + } + + /** + * @param value Improvement notation for the measure, e.g. higher score indicates better quality. + */ + public Measure setImprovementNotation(String value) { + if (Utilities.noString(value)) + this.improvementNotation = null; + else { + if (this.improvementNotation == null) + this.improvementNotation = new StringType(); + this.improvementNotation.setValue(value); + } + return this; + } + + /** + * @return {@link #definition} (A narrative description of the complete measure calculation.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value + */ + public MarkdownType getDefinitionElement() { + if (this.definition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Measure.definition"); + else if (Configuration.doAutoCreate()) + this.definition = new MarkdownType(); // bb + return this.definition; + } + + public boolean hasDefinitionElement() { + return this.definition != null && !this.definition.isEmpty(); + } + + public boolean hasDefinition() { + return this.definition != null && !this.definition.isEmpty(); + } + + /** + * @param value {@link #definition} (A narrative description of the complete measure calculation.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value + */ + public Measure setDefinitionElement(MarkdownType value) { + this.definition = value; + return this; + } + + /** + * @return A narrative description of the complete measure calculation. + */ + public String getDefinition() { + return this.definition == null ? null : this.definition.getValue(); + } + + /** + * @param value A narrative description of the complete measure calculation. + */ + public Measure setDefinition(String value) { + if (value == null) + this.definition = null; + else { + if (this.definition == null) + this.definition = new MarkdownType(); + this.definition.setValue(value); + } + return this; + } + + /** + * @return {@link #guidance} (Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.). This is the underlying object with id, value and extensions. The accessor "getGuidance" gives direct access to the value + */ + public MarkdownType getGuidanceElement() { + if (this.guidance == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Measure.guidance"); + else if (Configuration.doAutoCreate()) + this.guidance = new MarkdownType(); // bb + return this.guidance; + } + + public boolean hasGuidanceElement() { + return this.guidance != null && !this.guidance.isEmpty(); + } + + public boolean hasGuidance() { + return this.guidance != null && !this.guidance.isEmpty(); + } + + /** + * @param value {@link #guidance} (Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.). This is the underlying object with id, value and extensions. The accessor "getGuidance" gives direct access to the value + */ + public Measure setGuidanceElement(MarkdownType value) { + this.guidance = value; + return this; + } + + /** + * @return Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure. + */ + public String getGuidance() { + return this.guidance == null ? null : this.guidance.getValue(); + } + + /** + * @param value Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure. + */ + public Measure setGuidance(String value) { + if (value == null) + this.guidance = null; + else { + if (this.guidance == null) + this.guidance = new MarkdownType(); + this.guidance.setValue(value); + } + return this; + } + + /** + * @return {@link #set} (The measure set, e.g. Preventive Care and Screening.). This is the underlying object with id, value and extensions. The accessor "getSet" gives direct access to the value + */ + public StringType getSetElement() { + if (this.set == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Measure.set"); + else if (Configuration.doAutoCreate()) + this.set = new StringType(); // bb + return this.set; + } + + public boolean hasSetElement() { + return this.set != null && !this.set.isEmpty(); + } + + public boolean hasSet() { + return this.set != null && !this.set.isEmpty(); + } + + /** + * @param value {@link #set} (The measure set, e.g. Preventive Care and Screening.). This is the underlying object with id, value and extensions. The accessor "getSet" gives direct access to the value + */ + public Measure setSetElement(StringType value) { + this.set = value; + return this; + } + + /** + * @return The measure set, e.g. Preventive Care and Screening. + */ + public String getSet() { + return this.set == null ? null : this.set.getValue(); + } + + /** + * @param value The measure set, e.g. Preventive Care and Screening. + */ + public Measure setSet(String value) { + if (Utilities.noString(value)) + this.set = null; + else { + if (this.set == null) + this.set = new StringType(); + this.set.setValue(value); + } + return this; + } + + /** + * @return {@link #group} (A group of population criteria for the measure.) + */ + public List getGroup() { + if (this.group == null) + this.group = new ArrayList(); + return this.group; + } + + public boolean hasGroup() { + if (this.group == null) + return false; + for (MeasureGroupComponent item : this.group) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #group} (A group of population criteria for the measure.) + */ + // syntactic sugar + public MeasureGroupComponent addGroup() { //3 + MeasureGroupComponent t = new MeasureGroupComponent(); + if (this.group == null) + this.group = new ArrayList(); + this.group.add(t); return t; } // syntactic sugar - public Measure addPopulation(MeasurePopulationComponent t) { //3 + public Measure addGroup(MeasureGroupComponent t) { //3 if (t == null) return this; - if (this.population == null) - this.population = new ArrayList(); - this.population.add(t); + if (this.group == null) + this.group = new ArrayList(); + this.group.add(t); return this; } /** - * @return {@link #stratifier} (The stratifier criteria for the measure report, specified as either the name of a valid referenced CQL expression or a valid FHIR Resource Path.) + * @return {@link #supplementalData} (The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.) */ - public List getStratifier() { - if (this.stratifier == null) - this.stratifier = new ArrayList(); - return this.stratifier; - } - - public boolean hasStratifier() { - if (this.stratifier == null) - return false; - for (StringType item : this.stratifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #stratifier} (The stratifier criteria for the measure report, specified as either the name of a valid referenced CQL expression or a valid FHIR Resource Path.) - */ - // syntactic sugar - public StringType addStratifierElement() {//2 - StringType t = new StringType(); - if (this.stratifier == null) - this.stratifier = new ArrayList(); - this.stratifier.add(t); - return t; - } - - /** - * @param value {@link #stratifier} (The stratifier criteria for the measure report, specified as either the name of a valid referenced CQL expression or a valid FHIR Resource Path.) - */ - public Measure addStratifier(String value) { //1 - StringType t = new StringType(); - t.setValue(value); - if (this.stratifier == null) - this.stratifier = new ArrayList(); - this.stratifier.add(t); - return this; - } - - /** - * @param value {@link #stratifier} (The stratifier criteria for the measure report, specified as either the name of a valid referenced CQL expression or a valid FHIR Resource Path.) - */ - public boolean hasStratifier(String value) { - if (this.stratifier == null) - return false; - for (StringType v : this.stratifier) - if (v.equals(value)) // string - return true; - return false; - } - - /** - * @return {@link #supplementalData} (The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.) - */ - public List getSupplementalData() { + public List getSupplementalData() { if (this.supplementalData == null) - this.supplementalData = new ArrayList(); + this.supplementalData = new ArrayList(); return this.supplementalData; } public boolean hasSupplementalData() { if (this.supplementalData == null) return false; - for (StringType item : this.supplementalData) + for (MeasureSupplementalDataComponent item : this.supplementalData) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #supplementalData} (The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.) + * @return {@link #supplementalData} (The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.) */ // syntactic sugar - public StringType addSupplementalDataElement() {//2 - StringType t = new StringType(); + public MeasureSupplementalDataComponent addSupplementalData() { //3 + MeasureSupplementalDataComponent t = new MeasureSupplementalDataComponent(); if (this.supplementalData == null) - this.supplementalData = new ArrayList(); + this.supplementalData = new ArrayList(); this.supplementalData.add(t); return t; } - /** - * @param value {@link #supplementalData} (The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.) - */ - public Measure addSupplementalData(String value) { //1 - StringType t = new StringType(); - t.setValue(value); + // syntactic sugar + public Measure addSupplementalData(MeasureSupplementalDataComponent t) { //3 + if (t == null) + return this; if (this.supplementalData == null) - this.supplementalData = new ArrayList(); + this.supplementalData = new ArrayList(); this.supplementalData.add(t); return this; } - /** - * @param value {@link #supplementalData} (The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.) - */ - public boolean hasSupplementalData(String value) { - if (this.supplementalData == null) - return false; - for (StringType v : this.supplementalData) - if (v.equals(value)) // string - return true; - return false; - } - protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("version", "string", "The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.", 0, java.lang.Integer.MAX_VALUE, version)); - childrenList.add(new Property("moduleMetadata", "Reference(ModuleMetadata)", "A reference to a ModuleMetadata resource that describes the metadata for the measure.", 0, java.lang.Integer.MAX_VALUE, moduleMetadata)); + childrenList.add(new Property("moduleMetadata", "ModuleMetadata", "The metadata for the measure, including publishing, life-cycle, version, documentation, and supporting evidence.", 0, java.lang.Integer.MAX_VALUE, moduleMetadata)); childrenList.add(new Property("library", "Reference(Library)", "A reference to a Library resource containing the formal logic used by the measure.", 0, java.lang.Integer.MAX_VALUE, library)); - childrenList.add(new Property("population", "", "The measure populations.", 0, java.lang.Integer.MAX_VALUE, population)); - childrenList.add(new Property("stratifier", "string", "The stratifier criteria for the measure report, specified as either the name of a valid referenced CQL expression or a valid FHIR Resource Path.", 0, java.lang.Integer.MAX_VALUE, stratifier)); - childrenList.add(new Property("supplementalData", "string", "The supplemental data to be supplied as part of the measure response, specified as a valid FHIR Resource Path.", 0, java.lang.Integer.MAX_VALUE, supplementalData)); + childrenList.add(new Property("disclaimer", "markdown", "A disclaimer for the use of the measure.", 0, java.lang.Integer.MAX_VALUE, disclaimer)); + childrenList.add(new Property("scoring", "code", "The measure scoring type, e.g. proportion, CV.", 0, java.lang.Integer.MAX_VALUE, scoring)); + childrenList.add(new Property("type", "code", "The measure type, e.g. process, outcome.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("riskAdjustment", "string", "A description of the risk adjustment factors that may impact the resulting score for the measure and how they may be accounted for when computing and reporting measure results.", 0, java.lang.Integer.MAX_VALUE, riskAdjustment)); + childrenList.add(new Property("rateAggregation", "string", "A description of the rate aggregation for the measure.", 0, java.lang.Integer.MAX_VALUE, rateAggregation)); + childrenList.add(new Property("rationale", "markdown", "The rationale for the measure.", 0, java.lang.Integer.MAX_VALUE, rationale)); + childrenList.add(new Property("clinicalRecommendationStatement", "markdown", "The clinical recommendation statement for the measure.", 0, java.lang.Integer.MAX_VALUE, clinicalRecommendationStatement)); + childrenList.add(new Property("improvementNotation", "string", "Improvement notation for the measure, e.g. higher score indicates better quality.", 0, java.lang.Integer.MAX_VALUE, improvementNotation)); + childrenList.add(new Property("definition", "markdown", "A narrative description of the complete measure calculation.", 0, java.lang.Integer.MAX_VALUE, definition)); + childrenList.add(new Property("guidance", "markdown", "Additional guidance for the measure including how it can be used in a clinical context, and the intent of the measure.", 0, java.lang.Integer.MAX_VALUE, guidance)); + childrenList.add(new Property("set", "string", "The measure set, e.g. Preventive Care and Screening.", 0, java.lang.Integer.MAX_VALUE, set)); + childrenList.add(new Property("group", "", "A group of population criteria for the measure.", 0, java.lang.Integer.MAX_VALUE, group)); + childrenList.add(new Property("supplementalData", "", "The supplemental data criteria for the measure report, specified as either the name of a valid CQL expression within a referenced library, or a valid FHIR Resource Path.", 0, java.lang.Integer.MAX_VALUE, supplementalData)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("identifier")) - this.getIdentifier().add(castToIdentifier(value)); - else if (name.equals("version")) - this.version = castToString(value); // StringType - else if (name.equals("moduleMetadata")) - this.moduleMetadata = castToReference(value); // Reference + if (name.equals("moduleMetadata")) + this.moduleMetadata = castToModuleMetadata(value); // ModuleMetadata else if (name.equals("library")) this.getLibrary().add(castToReference(value)); - else if (name.equals("population")) - this.getPopulation().add((MeasurePopulationComponent) value); - else if (name.equals("stratifier")) - this.getStratifier().add(castToString(value)); + else if (name.equals("disclaimer")) + this.disclaimer = castToMarkdown(value); // MarkdownType + else if (name.equals("scoring")) + this.scoring = new MeasureScoringEnumFactory().fromType(value); // Enumeration + else if (name.equals("type")) + this.getType().add(new MeasureTypeEnumFactory().fromType(value)); + else if (name.equals("riskAdjustment")) + this.riskAdjustment = castToString(value); // StringType + else if (name.equals("rateAggregation")) + this.rateAggregation = castToString(value); // StringType + else if (name.equals("rationale")) + this.rationale = castToMarkdown(value); // MarkdownType + else if (name.equals("clinicalRecommendationStatement")) + this.clinicalRecommendationStatement = castToMarkdown(value); // MarkdownType + else if (name.equals("improvementNotation")) + this.improvementNotation = castToString(value); // StringType + else if (name.equals("definition")) + this.definition = castToMarkdown(value); // MarkdownType + else if (name.equals("guidance")) + this.guidance = castToMarkdown(value); // MarkdownType + else if (name.equals("set")) + this.set = castToString(value); // StringType + else if (name.equals("group")) + this.getGroup().add((MeasureGroupComponent) value); else if (name.equals("supplementalData")) - this.getSupplementalData().add(castToString(value)); + this.getSupplementalData().add((MeasureSupplementalDataComponent) value); else super.setProperty(name, value); } @Override public Base addChild(String name) throws FHIRException { - if (name.equals("identifier")) { - return addIdentifier(); - } - else if (name.equals("version")) { - throw new FHIRException("Cannot call addChild on a primitive type Measure.version"); - } - else if (name.equals("moduleMetadata")) { - this.moduleMetadata = new Reference(); + if (name.equals("moduleMetadata")) { + this.moduleMetadata = new ModuleMetadata(); return this.moduleMetadata; } else if (name.equals("library")) { return addLibrary(); } - else if (name.equals("population")) { - return addPopulation(); + else if (name.equals("disclaimer")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.disclaimer"); } - else if (name.equals("stratifier")) { - throw new FHIRException("Cannot call addChild on a primitive type Measure.stratifier"); + else if (name.equals("scoring")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.scoring"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.type"); + } + else if (name.equals("riskAdjustment")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.riskAdjustment"); + } + else if (name.equals("rateAggregation")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.rateAggregation"); + } + else if (name.equals("rationale")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.rationale"); + } + else if (name.equals("clinicalRecommendationStatement")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.clinicalRecommendationStatement"); + } + else if (name.equals("improvementNotation")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.improvementNotation"); + } + else if (name.equals("definition")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.definition"); + } + else if (name.equals("guidance")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.guidance"); + } + else if (name.equals("set")) { + throw new FHIRException("Cannot call addChild on a primitive type Measure.set"); + } + else if (name.equals("group")) { + return addGroup(); } else if (name.equals("supplementalData")) { - throw new FHIRException("Cannot call addChild on a primitive type Measure.supplementalData"); + return addSupplementalData(); } else return super.addChild(name); @@ -1045,31 +2747,35 @@ public class Measure extends DomainResource { public Measure copy() { Measure dst = new Measure(); copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.version = version == null ? null : version.copy(); dst.moduleMetadata = moduleMetadata == null ? null : moduleMetadata.copy(); if (library != null) { dst.library = new ArrayList(); for (Reference i : library) dst.library.add(i.copy()); }; - if (population != null) { - dst.population = new ArrayList(); - for (MeasurePopulationComponent i : population) - dst.population.add(i.copy()); + dst.disclaimer = disclaimer == null ? null : disclaimer.copy(); + dst.scoring = scoring == null ? null : scoring.copy(); + if (type != null) { + dst.type = new ArrayList>(); + for (Enumeration i : type) + dst.type.add(i.copy()); }; - if (stratifier != null) { - dst.stratifier = new ArrayList(); - for (StringType i : stratifier) - dst.stratifier.add(i.copy()); + dst.riskAdjustment = riskAdjustment == null ? null : riskAdjustment.copy(); + dst.rateAggregation = rateAggregation == null ? null : rateAggregation.copy(); + dst.rationale = rationale == null ? null : rationale.copy(); + dst.clinicalRecommendationStatement = clinicalRecommendationStatement == null ? null : clinicalRecommendationStatement.copy(); + dst.improvementNotation = improvementNotation == null ? null : improvementNotation.copy(); + dst.definition = definition == null ? null : definition.copy(); + dst.guidance = guidance == null ? null : guidance.copy(); + dst.set = set == null ? null : set.copy(); + if (group != null) { + dst.group = new ArrayList(); + for (MeasureGroupComponent i : group) + dst.group.add(i.copy()); }; if (supplementalData != null) { - dst.supplementalData = new ArrayList(); - for (StringType i : supplementalData) + dst.supplementalData = new ArrayList(); + for (MeasureSupplementalDataComponent i : supplementalData) dst.supplementalData.add(i.copy()); }; return dst; @@ -1086,8 +2792,12 @@ public class Measure extends DomainResource { if (!(other instanceof Measure)) return false; Measure o = (Measure) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(moduleMetadata, o.moduleMetadata, true) - && compareDeep(library, o.library, true) && compareDeep(population, o.population, true) && compareDeep(stratifier, o.stratifier, true) + return compareDeep(moduleMetadata, o.moduleMetadata, true) && compareDeep(library, o.library, true) + && compareDeep(disclaimer, o.disclaimer, true) && compareDeep(scoring, o.scoring, true) && compareDeep(type, o.type, true) + && compareDeep(riskAdjustment, o.riskAdjustment, true) && compareDeep(rateAggregation, o.rateAggregation, true) + && compareDeep(rationale, o.rationale, true) && compareDeep(clinicalRecommendationStatement, o.clinicalRecommendationStatement, true) + && compareDeep(improvementNotation, o.improvementNotation, true) && compareDeep(definition, o.definition, true) + && compareDeep(guidance, o.guidance, true) && compareDeep(set, o.set, true) && compareDeep(group, o.group, true) && compareDeep(supplementalData, o.supplementalData, true); } @@ -1098,15 +2808,17 @@ public class Measure extends DomainResource { if (!(other instanceof Measure)) return false; Measure o = (Measure) other; - return compareValues(version, o.version, true) && compareValues(stratifier, o.stratifier, true) && compareValues(supplementalData, o.supplementalData, true) - ; + return compareValues(disclaimer, o.disclaimer, true) && compareValues(scoring, o.scoring, true) && compareValues(type, o.type, true) + && compareValues(riskAdjustment, o.riskAdjustment, true) && compareValues(rateAggregation, o.rateAggregation, true) + && compareValues(rationale, o.rationale, true) && compareValues(clinicalRecommendationStatement, o.clinicalRecommendationStatement, true) + && compareValues(improvementNotation, o.improvementNotation, true) && compareValues(definition, o.definition, true) + && compareValues(guidance, o.guidance, true) && compareValues(set, o.set, true); } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) - && (moduleMetadata == null || moduleMetadata.isEmpty()) && (library == null || library.isEmpty()) - && (population == null || population.isEmpty()) && (stratifier == null || stratifier.isEmpty()) - && (supplementalData == null || supplementalData.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( moduleMetadata, library, disclaimer + , scoring, type, riskAdjustment, rateAggregation, rationale, clinicalRecommendationStatement + , improvementNotation, definition, guidance, set, group, supplementalData); } @Override @@ -1114,6 +2826,126 @@ public class Measure extends DomainResource { return ResourceType.Measure; } + /** + * Search parameter: identifier + *

+ * Description: Logical identifier for the module (e.g. CMS-143)
+ * Type: token
+ * Path: Measure.moduleMetadata.identifier
+ *

+ */ + @SearchParamDefinition(name="identifier", path="Measure.moduleMetadata.identifier", description="Logical identifier for the module (e.g. CMS-143)", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + /** + * Fluent Client search parameter constant for identifier + *

+ * Description: Logical identifier for the module (e.g. CMS-143)
+ * Type: token
+ * Path: Measure.moduleMetadata.identifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); + + /** + * Search parameter: topic + *

+ * Description: Topics associated with the module
+ * Type: token
+ * Path: Measure.moduleMetadata.topic
+ *

+ */ + @SearchParamDefinition(name="topic", path="Measure.moduleMetadata.topic", description="Topics associated with the module", type="token" ) + public static final String SP_TOPIC = "topic"; + /** + * Fluent Client search parameter constant for topic + *

+ * Description: Topics associated with the module
+ * Type: token
+ * Path: Measure.moduleMetadata.topic
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TOPIC); + + /** + * Search parameter: description + *

+ * Description: Text search against the description
+ * Type: string
+ * Path: Measure.moduleMetadata.description
+ *

+ */ + @SearchParamDefinition(name="description", path="Measure.moduleMetadata.description", description="Text search against the description", type="string" ) + public static final String SP_DESCRIPTION = "description"; + /** + * Fluent Client search parameter constant for description + *

+ * Description: Text search against the description
+ * Type: string
+ * Path: Measure.moduleMetadata.description
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); + + /** + * Search parameter: title + *

+ * Description: Text search against the title
+ * Type: string
+ * Path: Measure.moduleMetadata.title
+ *

+ */ + @SearchParamDefinition(name="title", path="Measure.moduleMetadata.title", description="Text search against the title", type="string" ) + public static final String SP_TITLE = "title"; + /** + * Fluent Client search parameter constant for title + *

+ * Description: Text search against the title
+ * Type: string
+ * Path: Measure.moduleMetadata.title
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); + + /** + * Search parameter: version + *

+ * Description: Version of the module (e.g. 1.0.0)
+ * Type: string
+ * Path: Measure.moduleMetadata.version
+ *

+ */ + @SearchParamDefinition(name="version", path="Measure.moduleMetadata.version", description="Version of the module (e.g. 1.0.0)", type="string" ) + public static final String SP_VERSION = "version"; + /** + * Fluent Client search parameter constant for version + *

+ * Description: Version of the module (e.g. 1.0.0)
+ * Type: string
+ * Path: Measure.moduleMetadata.version
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam VERSION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_VERSION); + + /** + * Search parameter: status + *

+ * Description: Status of the module
+ * Type: token
+ * Path: Measure.moduleMetadata.status
+ *

+ */ + @SearchParamDefinition(name="status", path="Measure.moduleMetadata.status", description="Status of the module", type="token" ) + public static final String SP_STATUS = "status"; + /** + * Fluent Client search parameter constant for status + *

+ * Description: Status of the module
+ * Type: token
+ * Path: Measure.moduleMetadata.status
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); + } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MeasureReport.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MeasureReport.java new file mode 100644 index 00000000000..acfb641b094 --- /dev/null +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MeasureReport.java @@ -0,0 +1,2648 @@ +package org.hl7.fhir.dstu3.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 + +import java.util.*; + +import java.math.*; +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; +/** + * The MeasureReport resource contains the results of evaluating a measure. + */ +@ResourceDef(name="MeasureReport", profile="http://hl7.org/fhir/Profile/MeasureReport") +public class MeasureReport extends DomainResource { + + public enum MeasureReportType { + /** + * An individual report that provides information on the performance for a given measure with respect to a single patient + */ + INDIVIDUAL, + /** + * A patient list report that includes a listing of patients that satisfied each population criteria in the measure + */ + PATIENTLIST, + /** + * A summary report that returns the number of patients in each population criteria for the measure + */ + SUMMARY, + /** + * added to help the parsers + */ + NULL; + public static MeasureReportType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("individual".equals(codeString)) + return INDIVIDUAL; + if ("patient-list".equals(codeString)) + return PATIENTLIST; + if ("summary".equals(codeString)) + return SUMMARY; + throw new FHIRException("Unknown MeasureReportType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case INDIVIDUAL: return "individual"; + case PATIENTLIST: return "patient-list"; + case SUMMARY: return "summary"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case INDIVIDUAL: return "http://hl7.org/fhir/measure-report-type"; + case PATIENTLIST: return "http://hl7.org/fhir/measure-report-type"; + case SUMMARY: return "http://hl7.org/fhir/measure-report-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case INDIVIDUAL: return "An individual report that provides information on the performance for a given measure with respect to a single patient"; + case PATIENTLIST: return "A patient list report that includes a listing of patients that satisfied each population criteria in the measure"; + case SUMMARY: return "A summary report that returns the number of patients in each population criteria for the measure"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case INDIVIDUAL: return "Individual"; + case PATIENTLIST: return "Patient List"; + case SUMMARY: return "Summary"; + default: return "?"; + } + } + } + + public static class MeasureReportTypeEnumFactory implements EnumFactory { + public MeasureReportType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("individual".equals(codeString)) + return MeasureReportType.INDIVIDUAL; + if ("patient-list".equals(codeString)) + return MeasureReportType.PATIENTLIST; + if ("summary".equals(codeString)) + return MeasureReportType.SUMMARY; + throw new IllegalArgumentException("Unknown MeasureReportType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("individual".equals(codeString)) + return new Enumeration(this, MeasureReportType.INDIVIDUAL); + if ("patient-list".equals(codeString)) + return new Enumeration(this, MeasureReportType.PATIENTLIST); + if ("summary".equals(codeString)) + return new Enumeration(this, MeasureReportType.SUMMARY); + throw new FHIRException("Unknown MeasureReportType code '"+codeString+"'"); + } + public String toCode(MeasureReportType code) { + if (code == MeasureReportType.INDIVIDUAL) + return "individual"; + if (code == MeasureReportType.PATIENTLIST) + return "patient-list"; + if (code == MeasureReportType.SUMMARY) + return "summary"; + return "?"; + } + public String toSystem(MeasureReportType code) { + return code.getSystem(); + } + } + + public enum MeasureReportStatus { + /** + * The report is complete and ready for use + */ + COMPLETE, + /** + * The report is currently being generated + */ + PENDING, + /** + * An error occurred attempting to generate the report + */ + ERROR, + /** + * added to help the parsers + */ + NULL; + public static MeasureReportStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return COMPLETE; + if ("pending".equals(codeString)) + return PENDING; + if ("error".equals(codeString)) + return ERROR; + throw new FHIRException("Unknown MeasureReportStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case COMPLETE: return "complete"; + case PENDING: return "pending"; + case ERROR: return "error"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case COMPLETE: return "http://hl7.org/fhir/measure-report-status"; + case PENDING: return "http://hl7.org/fhir/measure-report-status"; + case ERROR: return "http://hl7.org/fhir/measure-report-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case COMPLETE: return "The report is complete and ready for use"; + case PENDING: return "The report is currently being generated"; + case ERROR: return "An error occurred attempting to generate the report"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case COMPLETE: return "Complete"; + case PENDING: return "Pending"; + case ERROR: return "Error"; + default: return "?"; + } + } + } + + public static class MeasureReportStatusEnumFactory implements EnumFactory { + public MeasureReportStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return MeasureReportStatus.COMPLETE; + if ("pending".equals(codeString)) + return MeasureReportStatus.PENDING; + if ("error".equals(codeString)) + return MeasureReportStatus.ERROR; + throw new IllegalArgumentException("Unknown MeasureReportStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("complete".equals(codeString)) + return new Enumeration(this, MeasureReportStatus.COMPLETE); + if ("pending".equals(codeString)) + return new Enumeration(this, MeasureReportStatus.PENDING); + if ("error".equals(codeString)) + return new Enumeration(this, MeasureReportStatus.ERROR); + throw new FHIRException("Unknown MeasureReportStatus code '"+codeString+"'"); + } + public String toCode(MeasureReportStatus code) { + if (code == MeasureReportStatus.COMPLETE) + return "complete"; + if (code == MeasureReportStatus.PENDING) + return "pending"; + if (code == MeasureReportStatus.ERROR) + return "error"; + return "?"; + } + public String toSystem(MeasureReportStatus code) { + return code.getSystem(); + } + } + + @Block() + public static class MeasureReportGroupComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The identifier of the population group as defined in the measure definition. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Identifier of the population group being reported", formalDefinition="The identifier of the population group as defined in the measure definition." ) + protected Identifier identifier; + + /** + * The populations that make up the population group, one for each type of population appropriate for the measure. + */ + @Child(name = "population", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The populations in the group", formalDefinition="The populations that make up the population group, one for each type of population appropriate for the measure." ) + protected List population; + + /** + * The measure score. + */ + @Child(name = "measureScore", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The measure score", formalDefinition="The measure score." ) + protected DecimalType measureScore; + + /** + * When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure. + */ + @Child(name = "stratifier", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Stratification results", formalDefinition="When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure." ) + protected List stratifier; + + /** + * Supplemental data elements for the measure provide additional information requested by the measure for each patient involved in the populations. + */ + @Child(name = "supplementalData", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Supplemental data elements for the measure", formalDefinition="Supplemental data elements for the measure provide additional information requested by the measure for each patient involved in the populations." ) + protected List supplementalData; + + private static final long serialVersionUID = -832029515L; + + /** + * Constructor + */ + public MeasureReportGroupComponent() { + super(); + } + + /** + * Constructor + */ + public MeasureReportGroupComponent(Identifier identifier) { + super(); + this.identifier = identifier; + } + + /** + * @return {@link #identifier} (The identifier of the population group as defined in the measure definition.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (The identifier of the population group as defined in the measure definition.) + */ + public MeasureReportGroupComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #population} (The populations that make up the population group, one for each type of population appropriate for the measure.) + */ + public List getPopulation() { + if (this.population == null) + this.population = new ArrayList(); + return this.population; + } + + public boolean hasPopulation() { + if (this.population == null) + return false; + for (MeasureReportGroupPopulationComponent item : this.population) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #population} (The populations that make up the population group, one for each type of population appropriate for the measure.) + */ + // syntactic sugar + public MeasureReportGroupPopulationComponent addPopulation() { //3 + MeasureReportGroupPopulationComponent t = new MeasureReportGroupPopulationComponent(); + if (this.population == null) + this.population = new ArrayList(); + this.population.add(t); + return t; + } + + // syntactic sugar + public MeasureReportGroupComponent addPopulation(MeasureReportGroupPopulationComponent t) { //3 + if (t == null) + return this; + if (this.population == null) + this.population = new ArrayList(); + this.population.add(t); + return this; + } + + /** + * @return {@link #measureScore} (The measure score.). This is the underlying object with id, value and extensions. The accessor "getMeasureScore" gives direct access to the value + */ + public DecimalType getMeasureScoreElement() { + if (this.measureScore == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupComponent.measureScore"); + else if (Configuration.doAutoCreate()) + this.measureScore = new DecimalType(); // bb + return this.measureScore; + } + + public boolean hasMeasureScoreElement() { + return this.measureScore != null && !this.measureScore.isEmpty(); + } + + public boolean hasMeasureScore() { + return this.measureScore != null && !this.measureScore.isEmpty(); + } + + /** + * @param value {@link #measureScore} (The measure score.). This is the underlying object with id, value and extensions. The accessor "getMeasureScore" gives direct access to the value + */ + public MeasureReportGroupComponent setMeasureScoreElement(DecimalType value) { + this.measureScore = value; + return this; + } + + /** + * @return The measure score. + */ + public BigDecimal getMeasureScore() { + return this.measureScore == null ? null : this.measureScore.getValue(); + } + + /** + * @param value The measure score. + */ + public MeasureReportGroupComponent setMeasureScore(BigDecimal value) { + if (value == null) + this.measureScore = null; + else { + if (this.measureScore == null) + this.measureScore = new DecimalType(); + this.measureScore.setValue(value); + } + return this; + } + + /** + * @param value The measure score. + */ + public MeasureReportGroupComponent setMeasureScore(long value) { + this.measureScore = new DecimalType(); + this.measureScore.setValue(value); + return this; + } + + /** + * @param value The measure score. + */ + public MeasureReportGroupComponent setMeasureScore(double value) { + this.measureScore = new DecimalType(); + this.measureScore.setValue(value); + return this; + } + + /** + * @return {@link #stratifier} (When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.) + */ + public List getStratifier() { + if (this.stratifier == null) + this.stratifier = new ArrayList(); + return this.stratifier; + } + + public boolean hasStratifier() { + if (this.stratifier == null) + return false; + for (MeasureReportGroupStratifierComponent item : this.stratifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #stratifier} (When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.) + */ + // syntactic sugar + public MeasureReportGroupStratifierComponent addStratifier() { //3 + MeasureReportGroupStratifierComponent t = new MeasureReportGroupStratifierComponent(); + if (this.stratifier == null) + this.stratifier = new ArrayList(); + this.stratifier.add(t); + return t; + } + + // syntactic sugar + public MeasureReportGroupComponent addStratifier(MeasureReportGroupStratifierComponent t) { //3 + if (t == null) + return this; + if (this.stratifier == null) + this.stratifier = new ArrayList(); + this.stratifier.add(t); + return this; + } + + /** + * @return {@link #supplementalData} (Supplemental data elements for the measure provide additional information requested by the measure for each patient involved in the populations.) + */ + public List getSupplementalData() { + if (this.supplementalData == null) + this.supplementalData = new ArrayList(); + return this.supplementalData; + } + + public boolean hasSupplementalData() { + if (this.supplementalData == null) + return false; + for (MeasureReportGroupSupplementalDataComponent item : this.supplementalData) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #supplementalData} (Supplemental data elements for the measure provide additional information requested by the measure for each patient involved in the populations.) + */ + // syntactic sugar + public MeasureReportGroupSupplementalDataComponent addSupplementalData() { //3 + MeasureReportGroupSupplementalDataComponent t = new MeasureReportGroupSupplementalDataComponent(); + if (this.supplementalData == null) + this.supplementalData = new ArrayList(); + this.supplementalData.add(t); + return t; + } + + // syntactic sugar + public MeasureReportGroupComponent addSupplementalData(MeasureReportGroupSupplementalDataComponent t) { //3 + if (t == null) + return this; + if (this.supplementalData == null) + this.supplementalData = new ArrayList(); + this.supplementalData.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "The identifier of the population group as defined in the measure definition.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("population", "", "The populations that make up the population group, one for each type of population appropriate for the measure.", 0, java.lang.Integer.MAX_VALUE, population)); + childrenList.add(new Property("measureScore", "decimal", "The measure score.", 0, java.lang.Integer.MAX_VALUE, measureScore)); + childrenList.add(new Property("stratifier", "", "When a measure includes multiple stratifiers, there will be a stratifier group for each stratifier defined by the measure.", 0, java.lang.Integer.MAX_VALUE, stratifier)); + childrenList.add(new Property("supplementalData", "", "Supplemental data elements for the measure provide additional information requested by the measure for each patient involved in the populations.", 0, java.lang.Integer.MAX_VALUE, supplementalData)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("population")) + this.getPopulation().add((MeasureReportGroupPopulationComponent) value); + else if (name.equals("measureScore")) + this.measureScore = castToDecimal(value); // DecimalType + else if (name.equals("stratifier")) + this.getStratifier().add((MeasureReportGroupStratifierComponent) value); + else if (name.equals("supplementalData")) + this.getSupplementalData().add((MeasureReportGroupSupplementalDataComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("population")) { + return addPopulation(); + } + else if (name.equals("measureScore")) { + throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.measureScore"); + } + else if (name.equals("stratifier")) { + return addStratifier(); + } + else if (name.equals("supplementalData")) { + return addSupplementalData(); + } + else + return super.addChild(name); + } + + public MeasureReportGroupComponent copy() { + MeasureReportGroupComponent dst = new MeasureReportGroupComponent(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + if (population != null) { + dst.population = new ArrayList(); + for (MeasureReportGroupPopulationComponent i : population) + dst.population.add(i.copy()); + }; + dst.measureScore = measureScore == null ? null : measureScore.copy(); + if (stratifier != null) { + dst.stratifier = new ArrayList(); + for (MeasureReportGroupStratifierComponent i : stratifier) + dst.stratifier.add(i.copy()); + }; + if (supplementalData != null) { + dst.supplementalData = new ArrayList(); + for (MeasureReportGroupSupplementalDataComponent i : supplementalData) + dst.supplementalData.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MeasureReportGroupComponent)) + return false; + MeasureReportGroupComponent o = (MeasureReportGroupComponent) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(population, o.population, true) + && compareDeep(measureScore, o.measureScore, true) && compareDeep(stratifier, o.stratifier, true) + && compareDeep(supplementalData, o.supplementalData, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MeasureReportGroupComponent)) + return false; + MeasureReportGroupComponent o = (MeasureReportGroupComponent) other; + return compareValues(measureScore, o.measureScore, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, population, measureScore + , stratifier, supplementalData); + } + + public String fhirType() { + return "MeasureReport.group"; + + } + + } + + @Block() + public static class MeasureReportGroupPopulationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The type of the population. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="initial-population | numerator | numerator-exclusion | denominator | denominator-exclusion | denominator-exception | measure-population | measure-population-exclusion | measure-score", formalDefinition="The type of the population." ) + protected CodeType type; + + /** + * The number of members of the population. + */ + @Child(name = "count", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Size of the population", formalDefinition="The number of members of the population." ) + protected IntegerType count; + + /** + * This element refers to a List of patient level MeasureReport resources, one for each patient in this population. + */ + @Child(name = "patients", type = {ListResource.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="For patient-list reports, the patients in this population", formalDefinition="This element refers to a List of patient level MeasureReport resources, one for each patient in this population." ) + protected Reference patients; + + /** + * The actual object that is the target of the reference (This element refers to a List of patient level MeasureReport resources, one for each patient in this population.) + */ + protected ListResource patientsTarget; + + private static final long serialVersionUID = 407500224L; + + /** + * Constructor + */ + public MeasureReportGroupPopulationComponent() { + super(); + } + + /** + * Constructor + */ + public MeasureReportGroupPopulationComponent(CodeType type) { + super(); + this.type = type; + } + + /** + * @return {@link #type} (The type of the population.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public CodeType getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupPopulationComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeType(); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of the population.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public MeasureReportGroupPopulationComponent setTypeElement(CodeType value) { + this.type = value; + return this; + } + + /** + * @return The type of the population. + */ + public String getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of the population. + */ + public MeasureReportGroupPopulationComponent setType(String value) { + if (this.type == null) + this.type = new CodeType(); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #count} (The number of members of the population.). This is the underlying object with id, value and extensions. The accessor "getCount" gives direct access to the value + */ + public IntegerType getCountElement() { + if (this.count == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupPopulationComponent.count"); + else if (Configuration.doAutoCreate()) + this.count = new IntegerType(); // bb + return this.count; + } + + public boolean hasCountElement() { + return this.count != null && !this.count.isEmpty(); + } + + public boolean hasCount() { + return this.count != null && !this.count.isEmpty(); + } + + /** + * @param value {@link #count} (The number of members of the population.). This is the underlying object with id, value and extensions. The accessor "getCount" gives direct access to the value + */ + public MeasureReportGroupPopulationComponent setCountElement(IntegerType value) { + this.count = value; + return this; + } + + /** + * @return The number of members of the population. + */ + public int getCount() { + return this.count == null || this.count.isEmpty() ? 0 : this.count.getValue(); + } + + /** + * @param value The number of members of the population. + */ + public MeasureReportGroupPopulationComponent setCount(int value) { + if (this.count == null) + this.count = new IntegerType(); + this.count.setValue(value); + return this; + } + + /** + * @return {@link #patients} (This element refers to a List of patient level MeasureReport resources, one for each patient in this population.) + */ + public Reference getPatients() { + if (this.patients == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupPopulationComponent.patients"); + else if (Configuration.doAutoCreate()) + this.patients = new Reference(); // cc + return this.patients; + } + + public boolean hasPatients() { + return this.patients != null && !this.patients.isEmpty(); + } + + /** + * @param value {@link #patients} (This element refers to a List of patient level MeasureReport resources, one for each patient in this population.) + */ + public MeasureReportGroupPopulationComponent setPatients(Reference value) { + this.patients = value; + return this; + } + + /** + * @return {@link #patients} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (This element refers to a List of patient level MeasureReport resources, one for each patient in this population.) + */ + public ListResource getPatientsTarget() { + if (this.patientsTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupPopulationComponent.patients"); + else if (Configuration.doAutoCreate()) + this.patientsTarget = new ListResource(); // aa + return this.patientsTarget; + } + + /** + * @param value {@link #patients} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (This element refers to a List of patient level MeasureReport resources, one for each patient in this population.) + */ + public MeasureReportGroupPopulationComponent setPatientsTarget(ListResource value) { + this.patientsTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "The type of the population.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("count", "integer", "The number of members of the population.", 0, java.lang.Integer.MAX_VALUE, count)); + childrenList.add(new Property("patients", "Reference(List)", "This element refers to a List of patient level MeasureReport resources, one for each patient in this population.", 0, java.lang.Integer.MAX_VALUE, patients)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCode(value); // CodeType + else if (name.equals("count")) + this.count = castToInteger(value); // IntegerType + else if (name.equals("patients")) + this.patients = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.type"); + } + else if (name.equals("count")) { + throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.count"); + } + else if (name.equals("patients")) { + this.patients = new Reference(); + return this.patients; + } + else + return super.addChild(name); + } + + public MeasureReportGroupPopulationComponent copy() { + MeasureReportGroupPopulationComponent dst = new MeasureReportGroupPopulationComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.count = count == null ? null : count.copy(); + dst.patients = patients == null ? null : patients.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MeasureReportGroupPopulationComponent)) + return false; + MeasureReportGroupPopulationComponent o = (MeasureReportGroupPopulationComponent) other; + return compareDeep(type, o.type, true) && compareDeep(count, o.count, true) && compareDeep(patients, o.patients, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MeasureReportGroupPopulationComponent)) + return false; + MeasureReportGroupPopulationComponent o = (MeasureReportGroupPopulationComponent) other; + return compareValues(type, o.type, true) && compareValues(count, o.count, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, count, patients); + } + + public String fhirType() { + return "MeasureReport.group.population"; + + } + + } + + @Block() + public static class MeasureReportGroupStratifierComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The identifier of this stratifier, as defined in the measure definition. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Identifier of the stratifier", formalDefinition="The identifier of this stratifier, as defined in the measure definition." ) + protected Identifier identifier; + + /** + * This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value. + */ + @Child(name = "group", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Stratum results, one for each unique value in the stratifier", formalDefinition="This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value." ) + protected List group; + + private static final long serialVersionUID = -229867715L; + + /** + * Constructor + */ + public MeasureReportGroupStratifierComponent() { + super(); + } + + /** + * Constructor + */ + public MeasureReportGroupStratifierComponent(Identifier identifier) { + super(); + this.identifier = identifier; + } + + /** + * @return {@link #identifier} (The identifier of this stratifier, as defined in the measure definition.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupStratifierComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (The identifier of this stratifier, as defined in the measure definition.) + */ + public MeasureReportGroupStratifierComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #group} (This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.) + */ + public List getGroup() { + if (this.group == null) + this.group = new ArrayList(); + return this.group; + } + + public boolean hasGroup() { + if (this.group == null) + return false; + for (MeasureReportGroupStratifierGroupComponent item : this.group) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #group} (This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.) + */ + // syntactic sugar + public MeasureReportGroupStratifierGroupComponent addGroup() { //3 + MeasureReportGroupStratifierGroupComponent t = new MeasureReportGroupStratifierGroupComponent(); + if (this.group == null) + this.group = new ArrayList(); + this.group.add(t); + return t; + } + + // syntactic sugar + public MeasureReportGroupStratifierComponent addGroup(MeasureReportGroupStratifierGroupComponent t) { //3 + if (t == null) + return this; + if (this.group == null) + this.group = new ArrayList(); + this.group.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "The identifier of this stratifier, as defined in the measure definition.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("group", "", "This element contains the results for a single stratum within the stratifier. For example, when stratifying on administrative gender, there will be four strata, one for each possible gender value.", 0, java.lang.Integer.MAX_VALUE, group)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("group")) + this.getGroup().add((MeasureReportGroupStratifierGroupComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("group")) { + return addGroup(); + } + else + return super.addChild(name); + } + + public MeasureReportGroupStratifierComponent copy() { + MeasureReportGroupStratifierComponent dst = new MeasureReportGroupStratifierComponent(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + if (group != null) { + dst.group = new ArrayList(); + for (MeasureReportGroupStratifierGroupComponent i : group) + dst.group.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MeasureReportGroupStratifierComponent)) + return false; + MeasureReportGroupStratifierComponent o = (MeasureReportGroupStratifierComponent) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(group, o.group, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MeasureReportGroupStratifierComponent)) + return false; + MeasureReportGroupStratifierComponent o = (MeasureReportGroupStratifierComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, group); + } + + public String fhirType() { + return "MeasureReport.group.stratifier"; + + } + + } + + @Block() + public static class MeasureReportGroupStratifierGroupComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The value for this stratum, expressed as a string. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique. + */ + @Child(name = "value", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The stratum value, e.g. male", formalDefinition="The value for this stratum, expressed as a string. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique." ) + protected StringType value; + + /** + * The populations that make up the stratum, one for each type of population appropriate to the measure. + */ + @Child(name = "population", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Population results in this stratum", formalDefinition="The populations that make up the stratum, one for each type of population appropriate to the measure." ) + protected List population; + + /** + * The measure score for this stratum. + */ + @Child(name = "measureScore", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The measure score", formalDefinition="The measure score for this stratum." ) + protected DecimalType measureScore; + + private static final long serialVersionUID = -1663404087L; + + /** + * Constructor + */ + public MeasureReportGroupStratifierGroupComponent() { + super(); + } + + /** + * Constructor + */ + public MeasureReportGroupStratifierGroupComponent(StringType value) { + super(); + this.value = value; + } + + /** + * @return {@link #value} (The value for this stratum, expressed as a string. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public StringType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupStratifierGroupComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new StringType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The value for this stratum, expressed as a string. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public MeasureReportGroupStratifierGroupComponent setValueElement(StringType value) { + this.value = value; + return this; + } + + /** + * @return The value for this stratum, expressed as a string. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique. + */ + public String getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value The value for this stratum, expressed as a string. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique. + */ + public MeasureReportGroupStratifierGroupComponent setValue(String value) { + if (this.value == null) + this.value = new StringType(); + this.value.setValue(value); + return this; + } + + /** + * @return {@link #population} (The populations that make up the stratum, one for each type of population appropriate to the measure.) + */ + public List getPopulation() { + if (this.population == null) + this.population = new ArrayList(); + return this.population; + } + + public boolean hasPopulation() { + if (this.population == null) + return false; + for (MeasureReportGroupStratifierGroupPopulationComponent item : this.population) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #population} (The populations that make up the stratum, one for each type of population appropriate to the measure.) + */ + // syntactic sugar + public MeasureReportGroupStratifierGroupPopulationComponent addPopulation() { //3 + MeasureReportGroupStratifierGroupPopulationComponent t = new MeasureReportGroupStratifierGroupPopulationComponent(); + if (this.population == null) + this.population = new ArrayList(); + this.population.add(t); + return t; + } + + // syntactic sugar + public MeasureReportGroupStratifierGroupComponent addPopulation(MeasureReportGroupStratifierGroupPopulationComponent t) { //3 + if (t == null) + return this; + if (this.population == null) + this.population = new ArrayList(); + this.population.add(t); + return this; + } + + /** + * @return {@link #measureScore} (The measure score for this stratum.). This is the underlying object with id, value and extensions. The accessor "getMeasureScore" gives direct access to the value + */ + public DecimalType getMeasureScoreElement() { + if (this.measureScore == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupStratifierGroupComponent.measureScore"); + else if (Configuration.doAutoCreate()) + this.measureScore = new DecimalType(); // bb + return this.measureScore; + } + + public boolean hasMeasureScoreElement() { + return this.measureScore != null && !this.measureScore.isEmpty(); + } + + public boolean hasMeasureScore() { + return this.measureScore != null && !this.measureScore.isEmpty(); + } + + /** + * @param value {@link #measureScore} (The measure score for this stratum.). This is the underlying object with id, value and extensions. The accessor "getMeasureScore" gives direct access to the value + */ + public MeasureReportGroupStratifierGroupComponent setMeasureScoreElement(DecimalType value) { + this.measureScore = value; + return this; + } + + /** + * @return The measure score for this stratum. + */ + public BigDecimal getMeasureScore() { + return this.measureScore == null ? null : this.measureScore.getValue(); + } + + /** + * @param value The measure score for this stratum. + */ + public MeasureReportGroupStratifierGroupComponent setMeasureScore(BigDecimal value) { + if (value == null) + this.measureScore = null; + else { + if (this.measureScore == null) + this.measureScore = new DecimalType(); + this.measureScore.setValue(value); + } + return this; + } + + /** + * @param value The measure score for this stratum. + */ + public MeasureReportGroupStratifierGroupComponent setMeasureScore(long value) { + this.measureScore = new DecimalType(); + this.measureScore.setValue(value); + return this; + } + + /** + * @param value The measure score for this stratum. + */ + public MeasureReportGroupStratifierGroupComponent setMeasureScore(double value) { + this.measureScore = new DecimalType(); + this.measureScore.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("value", "string", "The value for this stratum, expressed as a string. When defining stratifiers on complex values, the value must be rendered such that the value for each stratum within the stratifier is unique.", 0, java.lang.Integer.MAX_VALUE, value)); + childrenList.add(new Property("population", "", "The populations that make up the stratum, one for each type of population appropriate to the measure.", 0, java.lang.Integer.MAX_VALUE, population)); + childrenList.add(new Property("measureScore", "decimal", "The measure score for this stratum.", 0, java.lang.Integer.MAX_VALUE, measureScore)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("value")) + this.value = castToString(value); // StringType + else if (name.equals("population")) + this.getPopulation().add((MeasureReportGroupStratifierGroupPopulationComponent) value); + else if (name.equals("measureScore")) + this.measureScore = castToDecimal(value); // DecimalType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.value"); + } + else if (name.equals("population")) { + return addPopulation(); + } + else if (name.equals("measureScore")) { + throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.measureScore"); + } + else + return super.addChild(name); + } + + public MeasureReportGroupStratifierGroupComponent copy() { + MeasureReportGroupStratifierGroupComponent dst = new MeasureReportGroupStratifierGroupComponent(); + copyValues(dst); + dst.value = value == null ? null : value.copy(); + if (population != null) { + dst.population = new ArrayList(); + for (MeasureReportGroupStratifierGroupPopulationComponent i : population) + dst.population.add(i.copy()); + }; + dst.measureScore = measureScore == null ? null : measureScore.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MeasureReportGroupStratifierGroupComponent)) + return false; + MeasureReportGroupStratifierGroupComponent o = (MeasureReportGroupStratifierGroupComponent) other; + return compareDeep(value, o.value, true) && compareDeep(population, o.population, true) && compareDeep(measureScore, o.measureScore, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MeasureReportGroupStratifierGroupComponent)) + return false; + MeasureReportGroupStratifierGroupComponent o = (MeasureReportGroupStratifierGroupComponent) other; + return compareValues(value, o.value, true) && compareValues(measureScore, o.measureScore, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value, population, measureScore + ); + } + + public String fhirType() { + return "MeasureReport.group.stratifier.group"; + + } + + } + + @Block() + public static class MeasureReportGroupStratifierGroupPopulationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The type of the population. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="initial-population | numerator | numerator-exclusion | denominator | denominator-exclusion | denominator-exception | measure-population | measure-population-exclusion | measure-score", formalDefinition="The type of the population." ) + protected CodeType type; + + /** + * The number of members of the population in this stratum. + */ + @Child(name = "count", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Size of the population", formalDefinition="The number of members of the population in this stratum." ) + protected IntegerType count; + + /** + * This element refers to a List of patient level MeasureReport resources, one for each patient in this population in this stratum. + */ + @Child(name = "patients", type = {ListResource.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="For patient-list reports, the patients in this population", formalDefinition="This element refers to a List of patient level MeasureReport resources, one for each patient in this population in this stratum." ) + protected Reference patients; + + /** + * The actual object that is the target of the reference (This element refers to a List of patient level MeasureReport resources, one for each patient in this population in this stratum.) + */ + protected ListResource patientsTarget; + + private static final long serialVersionUID = 407500224L; + + /** + * Constructor + */ + public MeasureReportGroupStratifierGroupPopulationComponent() { + super(); + } + + /** + * Constructor + */ + public MeasureReportGroupStratifierGroupPopulationComponent(CodeType type) { + super(); + this.type = type; + } + + /** + * @return {@link #type} (The type of the population.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public CodeType getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupStratifierGroupPopulationComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeType(); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of the population.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public MeasureReportGroupStratifierGroupPopulationComponent setTypeElement(CodeType value) { + this.type = value; + return this; + } + + /** + * @return The type of the population. + */ + public String getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of the population. + */ + public MeasureReportGroupStratifierGroupPopulationComponent setType(String value) { + if (this.type == null) + this.type = new CodeType(); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #count} (The number of members of the population in this stratum.). This is the underlying object with id, value and extensions. The accessor "getCount" gives direct access to the value + */ + public IntegerType getCountElement() { + if (this.count == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupStratifierGroupPopulationComponent.count"); + else if (Configuration.doAutoCreate()) + this.count = new IntegerType(); // bb + return this.count; + } + + public boolean hasCountElement() { + return this.count != null && !this.count.isEmpty(); + } + + public boolean hasCount() { + return this.count != null && !this.count.isEmpty(); + } + + /** + * @param value {@link #count} (The number of members of the population in this stratum.). This is the underlying object with id, value and extensions. The accessor "getCount" gives direct access to the value + */ + public MeasureReportGroupStratifierGroupPopulationComponent setCountElement(IntegerType value) { + this.count = value; + return this; + } + + /** + * @return The number of members of the population in this stratum. + */ + public int getCount() { + return this.count == null || this.count.isEmpty() ? 0 : this.count.getValue(); + } + + /** + * @param value The number of members of the population in this stratum. + */ + public MeasureReportGroupStratifierGroupPopulationComponent setCount(int value) { + if (this.count == null) + this.count = new IntegerType(); + this.count.setValue(value); + return this; + } + + /** + * @return {@link #patients} (This element refers to a List of patient level MeasureReport resources, one for each patient in this population in this stratum.) + */ + public Reference getPatients() { + if (this.patients == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupStratifierGroupPopulationComponent.patients"); + else if (Configuration.doAutoCreate()) + this.patients = new Reference(); // cc + return this.patients; + } + + public boolean hasPatients() { + return this.patients != null && !this.patients.isEmpty(); + } + + /** + * @param value {@link #patients} (This element refers to a List of patient level MeasureReport resources, one for each patient in this population in this stratum.) + */ + public MeasureReportGroupStratifierGroupPopulationComponent setPatients(Reference value) { + this.patients = value; + return this; + } + + /** + * @return {@link #patients} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (This element refers to a List of patient level MeasureReport resources, one for each patient in this population in this stratum.) + */ + public ListResource getPatientsTarget() { + if (this.patientsTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupStratifierGroupPopulationComponent.patients"); + else if (Configuration.doAutoCreate()) + this.patientsTarget = new ListResource(); // aa + return this.patientsTarget; + } + + /** + * @param value {@link #patients} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (This element refers to a List of patient level MeasureReport resources, one for each patient in this population in this stratum.) + */ + public MeasureReportGroupStratifierGroupPopulationComponent setPatientsTarget(ListResource value) { + this.patientsTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "The type of the population.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("count", "integer", "The number of members of the population in this stratum.", 0, java.lang.Integer.MAX_VALUE, count)); + childrenList.add(new Property("patients", "Reference(List)", "This element refers to a List of patient level MeasureReport resources, one for each patient in this population in this stratum.", 0, java.lang.Integer.MAX_VALUE, patients)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = castToCode(value); // CodeType + else if (name.equals("count")) + this.count = castToInteger(value); // IntegerType + else if (name.equals("patients")) + this.patients = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.type"); + } + else if (name.equals("count")) { + throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.count"); + } + else if (name.equals("patients")) { + this.patients = new Reference(); + return this.patients; + } + else + return super.addChild(name); + } + + public MeasureReportGroupStratifierGroupPopulationComponent copy() { + MeasureReportGroupStratifierGroupPopulationComponent dst = new MeasureReportGroupStratifierGroupPopulationComponent(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.count = count == null ? null : count.copy(); + dst.patients = patients == null ? null : patients.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MeasureReportGroupStratifierGroupPopulationComponent)) + return false; + MeasureReportGroupStratifierGroupPopulationComponent o = (MeasureReportGroupStratifierGroupPopulationComponent) other; + return compareDeep(type, o.type, true) && compareDeep(count, o.count, true) && compareDeep(patients, o.patients, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MeasureReportGroupStratifierGroupPopulationComponent)) + return false; + MeasureReportGroupStratifierGroupPopulationComponent o = (MeasureReportGroupStratifierGroupPopulationComponent) other; + return compareValues(type, o.type, true) && compareValues(count, o.count, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, count, patients); + } + + public String fhirType() { + return "MeasureReport.group.stratifier.group.population"; + + } + + } + + @Block() + public static class MeasureReportGroupSupplementalDataComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The identifier of the supplemental data element as defined in the measure. + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Identifier of the supplemental data element", formalDefinition="The identifier of the supplemental data element as defined in the measure." ) + protected Identifier identifier; + + /** + * This element contains the results for a single value within the supplemental data. For example, when reporting supplemental data for administrative gender, there will be four groups, one for each possible gender value. + */ + @Child(name = "group", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Supplemental data results, one for each unique supplemental data value", formalDefinition="This element contains the results for a single value within the supplemental data. For example, when reporting supplemental data for administrative gender, there will be four groups, one for each possible gender value." ) + protected List group; + + private static final long serialVersionUID = -1254392714L; + + /** + * Constructor + */ + public MeasureReportGroupSupplementalDataComponent() { + super(); + } + + /** + * Constructor + */ + public MeasureReportGroupSupplementalDataComponent(Identifier identifier) { + super(); + this.identifier = identifier; + } + + /** + * @return {@link #identifier} (The identifier of the supplemental data element as defined in the measure.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupSupplementalDataComponent.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (The identifier of the supplemental data element as defined in the measure.) + */ + public MeasureReportGroupSupplementalDataComponent setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #group} (This element contains the results for a single value within the supplemental data. For example, when reporting supplemental data for administrative gender, there will be four groups, one for each possible gender value.) + */ + public List getGroup() { + if (this.group == null) + this.group = new ArrayList(); + return this.group; + } + + public boolean hasGroup() { + if (this.group == null) + return false; + for (MeasureReportGroupSupplementalDataGroupComponent item : this.group) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #group} (This element contains the results for a single value within the supplemental data. For example, when reporting supplemental data for administrative gender, there will be four groups, one for each possible gender value.) + */ + // syntactic sugar + public MeasureReportGroupSupplementalDataGroupComponent addGroup() { //3 + MeasureReportGroupSupplementalDataGroupComponent t = new MeasureReportGroupSupplementalDataGroupComponent(); + if (this.group == null) + this.group = new ArrayList(); + this.group.add(t); + return t; + } + + // syntactic sugar + public MeasureReportGroupSupplementalDataComponent addGroup(MeasureReportGroupSupplementalDataGroupComponent t) { //3 + if (t == null) + return this; + if (this.group == null) + this.group = new ArrayList(); + this.group.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "The identifier of the supplemental data element as defined in the measure.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("group", "", "This element contains the results for a single value within the supplemental data. For example, when reporting supplemental data for administrative gender, there will be four groups, one for each possible gender value.", 0, java.lang.Integer.MAX_VALUE, group)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("group")) + this.getGroup().add((MeasureReportGroupSupplementalDataGroupComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("group")) { + return addGroup(); + } + else + return super.addChild(name); + } + + public MeasureReportGroupSupplementalDataComponent copy() { + MeasureReportGroupSupplementalDataComponent dst = new MeasureReportGroupSupplementalDataComponent(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + if (group != null) { + dst.group = new ArrayList(); + for (MeasureReportGroupSupplementalDataGroupComponent i : group) + dst.group.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MeasureReportGroupSupplementalDataComponent)) + return false; + MeasureReportGroupSupplementalDataComponent o = (MeasureReportGroupSupplementalDataComponent) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(group, o.group, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MeasureReportGroupSupplementalDataComponent)) + return false; + MeasureReportGroupSupplementalDataComponent o = (MeasureReportGroupSupplementalDataComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, group); + } + + public String fhirType() { + return "MeasureReport.group.supplementalData"; + + } + + } + + @Block() + public static class MeasureReportGroupSupplementalDataGroupComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The value for this supplemental data element, expressed as a string. When defining supplemental data on complex values, the value must be rendered such that the value for each group within the supplemental data element is unique. + */ + @Child(name = "value", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="The data value, e.g. male", formalDefinition="The value for this supplemental data element, expressed as a string. When defining supplemental data on complex values, the value must be rendered such that the value for each group within the supplemental data element is unique." ) + protected StringType value; + + /** + * The number of members in the supplemental data group. + */ + @Child(name = "count", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Number of members in the group", formalDefinition="The number of members in the supplemental data group." ) + protected IntegerType count; + + /** + * This element refers to a List of patient level MeasureReport resources, one for each patient in this population. + */ + @Child(name = "patients", type = {ListResource.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="For patient-list reports, the patients in this population", formalDefinition="This element refers to a List of patient level MeasureReport resources, one for each patient in this population." ) + protected Reference patients; + + /** + * The actual object that is the target of the reference (This element refers to a List of patient level MeasureReport resources, one for each patient in this population.) + */ + protected ListResource patientsTarget; + + private static final long serialVersionUID = 1011446829L; + + /** + * Constructor + */ + public MeasureReportGroupSupplementalDataGroupComponent() { + super(); + } + + /** + * Constructor + */ + public MeasureReportGroupSupplementalDataGroupComponent(StringType value) { + super(); + this.value = value; + } + + /** + * @return {@link #value} (The value for this supplemental data element, expressed as a string. When defining supplemental data on complex values, the value must be rendered such that the value for each group within the supplemental data element is unique.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public StringType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupSupplementalDataGroupComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new StringType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The value for this supplemental data element, expressed as a string. When defining supplemental data on complex values, the value must be rendered such that the value for each group within the supplemental data element is unique.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public MeasureReportGroupSupplementalDataGroupComponent setValueElement(StringType value) { + this.value = value; + return this; + } + + /** + * @return The value for this supplemental data element, expressed as a string. When defining supplemental data on complex values, the value must be rendered such that the value for each group within the supplemental data element is unique. + */ + public String getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value The value for this supplemental data element, expressed as a string. When defining supplemental data on complex values, the value must be rendered such that the value for each group within the supplemental data element is unique. + */ + public MeasureReportGroupSupplementalDataGroupComponent setValue(String value) { + if (this.value == null) + this.value = new StringType(); + this.value.setValue(value); + return this; + } + + /** + * @return {@link #count} (The number of members in the supplemental data group.). This is the underlying object with id, value and extensions. The accessor "getCount" gives direct access to the value + */ + public IntegerType getCountElement() { + if (this.count == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupSupplementalDataGroupComponent.count"); + else if (Configuration.doAutoCreate()) + this.count = new IntegerType(); // bb + return this.count; + } + + public boolean hasCountElement() { + return this.count != null && !this.count.isEmpty(); + } + + public boolean hasCount() { + return this.count != null && !this.count.isEmpty(); + } + + /** + * @param value {@link #count} (The number of members in the supplemental data group.). This is the underlying object with id, value and extensions. The accessor "getCount" gives direct access to the value + */ + public MeasureReportGroupSupplementalDataGroupComponent setCountElement(IntegerType value) { + this.count = value; + return this; + } + + /** + * @return The number of members in the supplemental data group. + */ + public int getCount() { + return this.count == null || this.count.isEmpty() ? 0 : this.count.getValue(); + } + + /** + * @param value The number of members in the supplemental data group. + */ + public MeasureReportGroupSupplementalDataGroupComponent setCount(int value) { + if (this.count == null) + this.count = new IntegerType(); + this.count.setValue(value); + return this; + } + + /** + * @return {@link #patients} (This element refers to a List of patient level MeasureReport resources, one for each patient in this population.) + */ + public Reference getPatients() { + if (this.patients == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupSupplementalDataGroupComponent.patients"); + else if (Configuration.doAutoCreate()) + this.patients = new Reference(); // cc + return this.patients; + } + + public boolean hasPatients() { + return this.patients != null && !this.patients.isEmpty(); + } + + /** + * @param value {@link #patients} (This element refers to a List of patient level MeasureReport resources, one for each patient in this population.) + */ + public MeasureReportGroupSupplementalDataGroupComponent setPatients(Reference value) { + this.patients = value; + return this; + } + + /** + * @return {@link #patients} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (This element refers to a List of patient level MeasureReport resources, one for each patient in this population.) + */ + public ListResource getPatientsTarget() { + if (this.patientsTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReportGroupSupplementalDataGroupComponent.patients"); + else if (Configuration.doAutoCreate()) + this.patientsTarget = new ListResource(); // aa + return this.patientsTarget; + } + + /** + * @param value {@link #patients} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (This element refers to a List of patient level MeasureReport resources, one for each patient in this population.) + */ + public MeasureReportGroupSupplementalDataGroupComponent setPatientsTarget(ListResource value) { + this.patientsTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("value", "string", "The value for this supplemental data element, expressed as a string. When defining supplemental data on complex values, the value must be rendered such that the value for each group within the supplemental data element is unique.", 0, java.lang.Integer.MAX_VALUE, value)); + childrenList.add(new Property("count", "integer", "The number of members in the supplemental data group.", 0, java.lang.Integer.MAX_VALUE, count)); + childrenList.add(new Property("patients", "Reference(List)", "This element refers to a List of patient level MeasureReport resources, one for each patient in this population.", 0, java.lang.Integer.MAX_VALUE, patients)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("value")) + this.value = castToString(value); // StringType + else if (name.equals("count")) + this.count = castToInteger(value); // IntegerType + else if (name.equals("patients")) + this.patients = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.value"); + } + else if (name.equals("count")) { + throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.count"); + } + else if (name.equals("patients")) { + this.patients = new Reference(); + return this.patients; + } + else + return super.addChild(name); + } + + public MeasureReportGroupSupplementalDataGroupComponent copy() { + MeasureReportGroupSupplementalDataGroupComponent dst = new MeasureReportGroupSupplementalDataGroupComponent(); + copyValues(dst); + dst.value = value == null ? null : value.copy(); + dst.count = count == null ? null : count.copy(); + dst.patients = patients == null ? null : patients.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MeasureReportGroupSupplementalDataGroupComponent)) + return false; + MeasureReportGroupSupplementalDataGroupComponent o = (MeasureReportGroupSupplementalDataGroupComponent) other; + return compareDeep(value, o.value, true) && compareDeep(count, o.count, true) && compareDeep(patients, o.patients, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MeasureReportGroupSupplementalDataGroupComponent)) + return false; + MeasureReportGroupSupplementalDataGroupComponent o = (MeasureReportGroupSupplementalDataGroupComponent) other; + return compareValues(value, o.value, true) && compareValues(count, o.count, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value, count, patients); + } + + public String fhirType() { + return "MeasureReport.group.supplementalData.group"; + + } + + } + + /** + * A reference to the Measure that was evaluated to produce this report. + */ + @Child(name = "measure", type = {Measure.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Measure that was evaluated", formalDefinition="A reference to the Measure that was evaluated to produce this report." ) + protected Reference measure; + + /** + * The actual object that is the target of the reference (A reference to the Measure that was evaluated to produce this report.) + */ + protected Measure measureTarget; + + /** + * The type of measure report. This may be an individual report, which provides a single patient's score for the measure, a patient listing, which returns the list of patients that meet the various criteria in the measure, or a summary report, which returns a population count for each criteria in the measure. + */ + @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="individual | patient-list | summary", formalDefinition="The type of measure report. This may be an individual report, which provides a single patient's score for the measure, a patient listing, which returns the list of patients that meet the various criteria in the measure, or a summary report, which returns a population count for each criteria in the measure." ) + protected Enumeration type; + + /** + * Optional Patient if the report was requested for a single patient. + */ + @Child(name = "patient", type = {Patient.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Optional Patient", formalDefinition="Optional Patient if the report was requested for a single patient." ) + protected Reference patient; + + /** + * The actual object that is the target of the reference (Optional Patient if the report was requested for a single patient.) + */ + protected Patient patientTarget; + + /** + * The reporting period for which the report was calculated. + */ + @Child(name = "period", type = {Period.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reporting period", formalDefinition="The reporting period for which the report was calculated." ) + protected Period period; + + /** + * The report status. No data will be available until the report status is complete. + */ + @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="complete | pending | error", formalDefinition="The report status. No data will be available until the report status is complete." ) + protected Enumeration status; + + /** + * The date this measure report was generated. + */ + @Child(name = "date", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date the report was generated", formalDefinition="The date this measure report was generated." ) + protected DateTimeType date; + + /** + * Reporting Organization. + */ + @Child(name = "reportingOrganization", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reporting Organization", formalDefinition="Reporting Organization." ) + protected Reference reportingOrganization; + + /** + * The actual object that is the target of the reference (Reporting Organization.) + */ + protected Organization reportingOrganizationTarget; + + /** + * The results of the calculation, one for each population group in the measure. + */ + @Child(name = "group", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Measure results for each group", formalDefinition="The results of the calculation, one for each population group in the measure." ) + protected List group; + + /** + * A reference to a Bundle containing the Resources that were used in the evaluation of this report. + */ + @Child(name = "evaluatedResources", type = {Bundle.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Evaluated Resources", formalDefinition="A reference to a Bundle containing the Resources that were used in the evaluation of this report." ) + protected Reference evaluatedResources; + + /** + * The actual object that is the target of the reference (A reference to a Bundle containing the Resources that were used in the evaluation of this report.) + */ + protected Bundle evaluatedResourcesTarget; + + private static final long serialVersionUID = -891268298L; + + /** + * Constructor + */ + public MeasureReport() { + super(); + } + + /** + * Constructor + */ + public MeasureReport(Reference measure, Enumeration type, Period period, Enumeration status) { + super(); + this.measure = measure; + this.type = type; + this.period = period; + this.status = status; + } + + /** + * @return {@link #measure} (A reference to the Measure that was evaluated to produce this report.) + */ + public Reference getMeasure() { + if (this.measure == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReport.measure"); + else if (Configuration.doAutoCreate()) + this.measure = new Reference(); // cc + return this.measure; + } + + public boolean hasMeasure() { + return this.measure != null && !this.measure.isEmpty(); + } + + /** + * @param value {@link #measure} (A reference to the Measure that was evaluated to produce this report.) + */ + public MeasureReport setMeasure(Reference value) { + this.measure = value; + return this; + } + + /** + * @return {@link #measure} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to the Measure that was evaluated to produce this report.) + */ + public Measure getMeasureTarget() { + if (this.measureTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReport.measure"); + else if (Configuration.doAutoCreate()) + this.measureTarget = new Measure(); // aa + return this.measureTarget; + } + + /** + * @param value {@link #measure} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to the Measure that was evaluated to produce this report.) + */ + public MeasureReport setMeasureTarget(Measure value) { + this.measureTarget = value; + return this; + } + + /** + * @return {@link #type} (The type of measure report. This may be an individual report, which provides a single patient's score for the measure, a patient listing, which returns the list of patients that meet the various criteria in the measure, or a summary report, which returns a population count for each criteria in the measure.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReport.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new MeasureReportTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of measure report. This may be an individual report, which provides a single patient's score for the measure, a patient listing, which returns the list of patients that meet the various criteria in the measure, or a summary report, which returns a population count for each criteria in the measure.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public MeasureReport setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return The type of measure report. This may be an individual report, which provides a single patient's score for the measure, a patient listing, which returns the list of patients that meet the various criteria in the measure, or a summary report, which returns a population count for each criteria in the measure. + */ + public MeasureReportType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of measure report. This may be an individual report, which provides a single patient's score for the measure, a patient listing, which returns the list of patients that meet the various criteria in the measure, or a summary report, which returns a population count for each criteria in the measure. + */ + public MeasureReport setType(MeasureReportType value) { + if (this.type == null) + this.type = new Enumeration(new MeasureReportTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #patient} (Optional Patient if the report was requested for a single patient.) + */ + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReport.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; + } + + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); + } + + /** + * @param value {@link #patient} (Optional Patient if the report was requested for a single patient.) + */ + public MeasureReport setPatient(Reference value) { + this.patient = value; + return this; + } + + /** + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Optional Patient if the report was requested for a single patient.) + */ + public Patient getPatientTarget() { + if (this.patientTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReport.patient"); + else if (Configuration.doAutoCreate()) + this.patientTarget = new Patient(); // aa + return this.patientTarget; + } + + /** + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Optional Patient if the report was requested for a single patient.) + */ + public MeasureReport setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #period} (The reporting period for which the report was calculated.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReport.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The reporting period for which the report was calculated.) + */ + public MeasureReport setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #status} (The report status. No data will be available until the report status is complete.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReport.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new MeasureReportStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The report status. No data will be available until the report status is complete.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public MeasureReport setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The report status. No data will be available until the report status is complete. + */ + public MeasureReportStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The report status. No data will be available until the report status is complete. + */ + public MeasureReport setStatus(MeasureReportStatus value) { + if (this.status == null) + this.status = new Enumeration(new MeasureReportStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #date} (The date this measure report was generated.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReport.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date this measure report was generated.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public MeasureReport setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date this measure report was generated. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date this measure report was generated. + */ + public MeasureReport setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #reportingOrganization} (Reporting Organization.) + */ + public Reference getReportingOrganization() { + if (this.reportingOrganization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReport.reportingOrganization"); + else if (Configuration.doAutoCreate()) + this.reportingOrganization = new Reference(); // cc + return this.reportingOrganization; + } + + public boolean hasReportingOrganization() { + return this.reportingOrganization != null && !this.reportingOrganization.isEmpty(); + } + + /** + * @param value {@link #reportingOrganization} (Reporting Organization.) + */ + public MeasureReport setReportingOrganization(Reference value) { + this.reportingOrganization = value; + return this; + } + + /** + * @return {@link #reportingOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reporting Organization.) + */ + public Organization getReportingOrganizationTarget() { + if (this.reportingOrganizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReport.reportingOrganization"); + else if (Configuration.doAutoCreate()) + this.reportingOrganizationTarget = new Organization(); // aa + return this.reportingOrganizationTarget; + } + + /** + * @param value {@link #reportingOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reporting Organization.) + */ + public MeasureReport setReportingOrganizationTarget(Organization value) { + this.reportingOrganizationTarget = value; + return this; + } + + /** + * @return {@link #group} (The results of the calculation, one for each population group in the measure.) + */ + public List getGroup() { + if (this.group == null) + this.group = new ArrayList(); + return this.group; + } + + public boolean hasGroup() { + if (this.group == null) + return false; + for (MeasureReportGroupComponent item : this.group) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #group} (The results of the calculation, one for each population group in the measure.) + */ + // syntactic sugar + public MeasureReportGroupComponent addGroup() { //3 + MeasureReportGroupComponent t = new MeasureReportGroupComponent(); + if (this.group == null) + this.group = new ArrayList(); + this.group.add(t); + return t; + } + + // syntactic sugar + public MeasureReport addGroup(MeasureReportGroupComponent t) { //3 + if (t == null) + return this; + if (this.group == null) + this.group = new ArrayList(); + this.group.add(t); + return this; + } + + /** + * @return {@link #evaluatedResources} (A reference to a Bundle containing the Resources that were used in the evaluation of this report.) + */ + public Reference getEvaluatedResources() { + if (this.evaluatedResources == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReport.evaluatedResources"); + else if (Configuration.doAutoCreate()) + this.evaluatedResources = new Reference(); // cc + return this.evaluatedResources; + } + + public boolean hasEvaluatedResources() { + return this.evaluatedResources != null && !this.evaluatedResources.isEmpty(); + } + + /** + * @param value {@link #evaluatedResources} (A reference to a Bundle containing the Resources that were used in the evaluation of this report.) + */ + public MeasureReport setEvaluatedResources(Reference value) { + this.evaluatedResources = value; + return this; + } + + /** + * @return {@link #evaluatedResources} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a Bundle containing the Resources that were used in the evaluation of this report.) + */ + public Bundle getEvaluatedResourcesTarget() { + if (this.evaluatedResourcesTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create MeasureReport.evaluatedResources"); + else if (Configuration.doAutoCreate()) + this.evaluatedResourcesTarget = new Bundle(); // aa + return this.evaluatedResourcesTarget; + } + + /** + * @param value {@link #evaluatedResources} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a Bundle containing the Resources that were used in the evaluation of this report.) + */ + public MeasureReport setEvaluatedResourcesTarget(Bundle value) { + this.evaluatedResourcesTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("measure", "Reference(Measure)", "A reference to the Measure that was evaluated to produce this report.", 0, java.lang.Integer.MAX_VALUE, measure)); + childrenList.add(new Property("type", "code", "The type of measure report. This may be an individual report, which provides a single patient's score for the measure, a patient listing, which returns the list of patients that meet the various criteria in the measure, or a summary report, which returns a population count for each criteria in the measure.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("patient", "Reference(Patient)", "Optional Patient if the report was requested for a single patient.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("period", "Period", "The reporting period for which the report was calculated.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("status", "code", "The report status. No data will be available until the report status is complete.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("date", "dateTime", "The date this measure report was generated.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("reportingOrganization", "Reference(Organization)", "Reporting Organization.", 0, java.lang.Integer.MAX_VALUE, reportingOrganization)); + childrenList.add(new Property("group", "", "The results of the calculation, one for each population group in the measure.", 0, java.lang.Integer.MAX_VALUE, group)); + childrenList.add(new Property("evaluatedResources", "Reference(Bundle)", "A reference to a Bundle containing the Resources that were used in the evaluation of this report.", 0, java.lang.Integer.MAX_VALUE, evaluatedResources)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("measure")) + this.measure = castToReference(value); // Reference + else if (name.equals("type")) + this.type = new MeasureReportTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("status")) + this.status = new MeasureReportStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("reportingOrganization")) + this.reportingOrganization = castToReference(value); // Reference + else if (name.equals("group")) + this.getGroup().add((MeasureReportGroupComponent) value); + else if (name.equals("evaluatedResources")) + this.evaluatedResources = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("measure")) { + this.measure = new Reference(); + return this.measure; + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.type"); + } + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.status"); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type MeasureReport.date"); + } + else if (name.equals("reportingOrganization")) { + this.reportingOrganization = new Reference(); + return this.reportingOrganization; + } + else if (name.equals("group")) { + return addGroup(); + } + else if (name.equals("evaluatedResources")) { + this.evaluatedResources = new Reference(); + return this.evaluatedResources; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "MeasureReport"; + + } + + public MeasureReport copy() { + MeasureReport dst = new MeasureReport(); + copyValues(dst); + dst.measure = measure == null ? null : measure.copy(); + dst.type = type == null ? null : type.copy(); + dst.patient = patient == null ? null : patient.copy(); + dst.period = period == null ? null : period.copy(); + dst.status = status == null ? null : status.copy(); + dst.date = date == null ? null : date.copy(); + dst.reportingOrganization = reportingOrganization == null ? null : reportingOrganization.copy(); + if (group != null) { + dst.group = new ArrayList(); + for (MeasureReportGroupComponent i : group) + dst.group.add(i.copy()); + }; + dst.evaluatedResources = evaluatedResources == null ? null : evaluatedResources.copy(); + return dst; + } + + protected MeasureReport typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof MeasureReport)) + return false; + MeasureReport o = (MeasureReport) other; + return compareDeep(measure, o.measure, true) && compareDeep(type, o.type, true) && compareDeep(patient, o.patient, true) + && compareDeep(period, o.period, true) && compareDeep(status, o.status, true) && compareDeep(date, o.date, true) + && compareDeep(reportingOrganization, o.reportingOrganization, true) && compareDeep(group, o.group, true) + && compareDeep(evaluatedResources, o.evaluatedResources, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof MeasureReport)) + return false; + MeasureReport o = (MeasureReport) other; + return compareValues(type, o.type, true) && compareValues(status, o.status, true) && compareValues(date, o.date, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( measure, type, patient, period + , status, date, reportingOrganization, group, evaluatedResources); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.MeasureReport; + } + + /** + * Search parameter: patient + *

+ * Description: The identity of a patient to search for individual measure report results for
+ * Type: reference
+ * Path: MeasureReport.patient
+ *

+ */ + @SearchParamDefinition(name="patient", path="MeasureReport.patient", description="The identity of a patient to search for individual measure report results for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) + public static final String SP_PATIENT = "patient"; + /** + * Fluent Client search parameter constant for patient + *

+ * Description: The identity of a patient to search for individual measure report results for
+ * Type: reference
+ * Path: MeasureReport.patient
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "MeasureReport:patient". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("MeasureReport:patient").toLocked(); + + +} + diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Media.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Media.java index b95bbae5b07..f1a1ee08234 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Media.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Media.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference. */ @@ -883,11 +882,8 @@ public class Media extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (type == null || type.isEmpty()) - && (subtype == null || subtype.isEmpty()) && (view == null || view.isEmpty()) && (subject == null || subject.isEmpty()) - && (operator == null || operator.isEmpty()) && (deviceName == null || deviceName.isEmpty()) - && (height == null || height.isEmpty()) && (width == null || width.isEmpty()) && (frames == null || frames.isEmpty()) - && (duration == null || duration.isEmpty()) && (content == null || content.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, type, subtype, view + , subject, operator, deviceName, height, width, frames, duration, content); } @Override @@ -983,7 +979,7 @@ public class Media extends DomainResource { * Path: Media.subject
*

*/ - @SearchParamDefinition(name="subject", path="Media.subject", description="Who/What this Media is a record of", type="reference" ) + @SearchParamDefinition(name="subject", path="Media.subject", description="Who/What this Media is a record of", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject @@ -1055,7 +1051,7 @@ public class Media extends DomainResource { * Path: Media.operator
*

*/ - @SearchParamDefinition(name="operator", path="Media.operator", description="The person who generated the image", type="reference" ) + @SearchParamDefinition(name="operator", path="Media.operator", description="The person who generated the image", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_OPERATOR = "operator"; /** * Fluent Client search parameter constant for operator diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Medication.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Medication.java index c5d96bfeba4..2e834ff0fc5 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Medication.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Medication.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication. */ @@ -258,8 +257,7 @@ public class Medication extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (form == null || form.isEmpty()) && (ingredient == null || ingredient.isEmpty()) - && (batch == null || batch.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( form, ingredient, batch); } public String fhirType() { @@ -274,14 +272,9 @@ public class Medication extends DomainResource { /** * The actual ingredient - either a substance (simple ingredient) or another medication. */ - @Child(name = "item", type = {Substance.class, Medication.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Child(name = "item", type = {CodeableConcept.class, Substance.class, Medication.class}, order=1, min=1, max=1, modifier=false, summary=false) @Description(shortDefinition="The product contained", formalDefinition="The actual ingredient - either a substance (simple ingredient) or another medication." ) - protected Reference item; - - /** - * The actual object that is the target of the reference (The actual ingredient - either a substance (simple ingredient) or another medication.) - */ - protected Resource itemTarget; + protected Type item; /** * Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet. @@ -290,7 +283,7 @@ public class Medication extends DomainResource { @Description(shortDefinition="Quantity of ingredient present", formalDefinition="Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet." ) protected Ratio amount; - private static final long serialVersionUID = -1217232889L; + private static final long serialVersionUID = -651644952L; /** * Constructor @@ -302,7 +295,7 @@ public class Medication extends DomainResource { /** * Constructor */ - public MedicationProductIngredientComponent(Reference item) { + public MedicationProductIngredientComponent(Type item) { super(); this.item = item; } @@ -310,15 +303,36 @@ public class Medication extends DomainResource { /** * @return {@link #item} (The actual ingredient - either a substance (simple ingredient) or another medication.) */ - public Reference getItem() { - if (this.item == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationProductIngredientComponent.item"); - else if (Configuration.doAutoCreate()) - this.item = new Reference(); // cc + public Type getItem() { return this.item; } + /** + * @return {@link #item} (The actual ingredient - either a substance (simple ingredient) or another medication.) + */ + public CodeableConcept getItemCodeableConcept() throws FHIRException { + if (!(this.item instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.item.getClass().getName()+" was encountered"); + return (CodeableConcept) this.item; + } + + public boolean hasItemCodeableConcept() { + return this.item instanceof CodeableConcept; + } + + /** + * @return {@link #item} (The actual ingredient - either a substance (simple ingredient) or another medication.) + */ + public Reference getItemReference() throws FHIRException { + if (!(this.item instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.item.getClass().getName()+" was encountered"); + return (Reference) this.item; + } + + public boolean hasItemReference() { + return this.item instanceof Reference; + } + public boolean hasItem() { return this.item != null && !this.item.isEmpty(); } @@ -326,26 +340,11 @@ public class Medication extends DomainResource { /** * @param value {@link #item} (The actual ingredient - either a substance (simple ingredient) or another medication.) */ - public MedicationProductIngredientComponent setItem(Reference value) { + public MedicationProductIngredientComponent setItem(Type value) { this.item = value; return this; } - /** - * @return {@link #item} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The actual ingredient - either a substance (simple ingredient) or another medication.) - */ - public Resource getItemTarget() { - return this.itemTarget; - } - - /** - * @param value {@link #item} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The actual ingredient - either a substance (simple ingredient) or another medication.) - */ - public MedicationProductIngredientComponent setItemTarget(Resource value) { - this.itemTarget = value; - return this; - } - /** * @return {@link #amount} (Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet.) */ @@ -372,14 +371,14 @@ public class Medication extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("item", "Reference(Substance|Medication)", "The actual ingredient - either a substance (simple ingredient) or another medication.", 0, java.lang.Integer.MAX_VALUE, item)); + childrenList.add(new Property("item[x]", "CodeableConcept|Reference(Substance|Medication)", "The actual ingredient - either a substance (simple ingredient) or another medication.", 0, java.lang.Integer.MAX_VALUE, item)); childrenList.add(new Property("amount", "Ratio", "Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet.", 0, java.lang.Integer.MAX_VALUE, amount)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("item")) - this.item = castToReference(value); // Reference + if (name.equals("item[x]")) + this.item = (Type) value; // Type else if (name.equals("amount")) this.amount = castToRatio(value); // Ratio else @@ -388,7 +387,11 @@ public class Medication extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("item")) { + if (name.equals("itemCodeableConcept")) { + this.item = new CodeableConcept(); + return this.item; + } + else if (name.equals("itemReference")) { this.item = new Reference(); return this.item; } @@ -429,8 +432,7 @@ public class Medication extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (item == null || item.isEmpty()) && (amount == null || amount.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( item, amount); } public String fhirType() { @@ -622,8 +624,7 @@ public class Medication extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (lotNumber == null || lotNumber.isEmpty()) && (expirationDate == null || expirationDate.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( lotNumber, expirationDate); } public String fhirType() { @@ -784,8 +785,7 @@ public class Medication extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (container == null || container.isEmpty()) && (content == null || content.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( container, content); } public String fhirType() { @@ -800,14 +800,9 @@ public class Medication extends DomainResource { /** * Identifies one of the items in the package. */ - @Child(name = "item", type = {Medication.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Child(name = "item", type = {CodeableConcept.class, Medication.class}, order=1, min=1, max=1, modifier=false, summary=false) @Description(shortDefinition="The item in the package", formalDefinition="Identifies one of the items in the package." ) - protected Reference item; - - /** - * The actual object that is the target of the reference (Identifies one of the items in the package.) - */ - protected Medication itemTarget; + protected Type item; /** * The amount of the product that is in the package. @@ -816,7 +811,7 @@ public class Medication extends DomainResource { @Description(shortDefinition="Quantity present in the package", formalDefinition="The amount of the product that is in the package." ) protected SimpleQuantity amount; - private static final long serialVersionUID = -1150048030L; + private static final long serialVersionUID = 1669610080L; /** * Constructor @@ -828,7 +823,7 @@ public class Medication extends DomainResource { /** * Constructor */ - public MedicationPackageContentComponent(Reference item) { + public MedicationPackageContentComponent(Type item) { super(); this.item = item; } @@ -836,15 +831,36 @@ public class Medication extends DomainResource { /** * @return {@link #item} (Identifies one of the items in the package.) */ - public Reference getItem() { - if (this.item == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationPackageContentComponent.item"); - else if (Configuration.doAutoCreate()) - this.item = new Reference(); // cc + public Type getItem() { return this.item; } + /** + * @return {@link #item} (Identifies one of the items in the package.) + */ + public CodeableConcept getItemCodeableConcept() throws FHIRException { + if (!(this.item instanceof CodeableConcept)) + throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.item.getClass().getName()+" was encountered"); + return (CodeableConcept) this.item; + } + + public boolean hasItemCodeableConcept() { + return this.item instanceof CodeableConcept; + } + + /** + * @return {@link #item} (Identifies one of the items in the package.) + */ + public Reference getItemReference() throws FHIRException { + if (!(this.item instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.item.getClass().getName()+" was encountered"); + return (Reference) this.item; + } + + public boolean hasItemReference() { + return this.item instanceof Reference; + } + public boolean hasItem() { return this.item != null && !this.item.isEmpty(); } @@ -852,31 +868,11 @@ public class Medication extends DomainResource { /** * @param value {@link #item} (Identifies one of the items in the package.) */ - public MedicationPackageContentComponent setItem(Reference value) { + public MedicationPackageContentComponent setItem(Type value) { this.item = value; return this; } - /** - * @return {@link #item} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies one of the items in the package.) - */ - public Medication getItemTarget() { - if (this.itemTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create MedicationPackageContentComponent.item"); - else if (Configuration.doAutoCreate()) - this.itemTarget = new Medication(); // aa - return this.itemTarget; - } - - /** - * @param value {@link #item} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies one of the items in the package.) - */ - public MedicationPackageContentComponent setItemTarget(Medication value) { - this.itemTarget = value; - return this; - } - /** * @return {@link #amount} (The amount of the product that is in the package.) */ @@ -903,14 +899,14 @@ public class Medication extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("item", "Reference(Medication)", "Identifies one of the items in the package.", 0, java.lang.Integer.MAX_VALUE, item)); + childrenList.add(new Property("item[x]", "CodeableConcept|Reference(Medication)", "Identifies one of the items in the package.", 0, java.lang.Integer.MAX_VALUE, item)); childrenList.add(new Property("amount", "SimpleQuantity", "The amount of the product that is in the package.", 0, java.lang.Integer.MAX_VALUE, amount)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("item")) - this.item = castToReference(value); // Reference + if (name.equals("item[x]")) + this.item = (Type) value; // Type else if (name.equals("amount")) this.amount = castToSimpleQuantity(value); // SimpleQuantity else @@ -919,7 +915,11 @@ public class Medication extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("item")) { + if (name.equals("itemCodeableConcept")) { + this.item = new CodeableConcept(); + return this.item; + } + else if (name.equals("itemReference")) { this.item = new Reference(); return this.item; } @@ -960,8 +960,7 @@ public class Medication extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (item == null || item.isEmpty()) && (amount == null || amount.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( item, amount); } public String fhirType() { @@ -1273,9 +1272,8 @@ public class Medication extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (isBrand == null || isBrand.isEmpty()) - && (manufacturer == null || manufacturer.isEmpty()) && (product == null || product.isEmpty()) - && (package_ == null || package_.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, isBrand, manufacturer, product + , package_); } @Override @@ -1283,6 +1281,26 @@ public class Medication extends DomainResource { return ResourceType.Medication; } + /** + * Search parameter: ingredient-code + *

+ * Description: The product contained
+ * Type: token
+ * Path: Medication.product.ingredient.itemCodeableConcept
+ *

+ */ + @SearchParamDefinition(name="ingredient-code", path="Medication.product.ingredient.itemCodeableConcept", description="The product contained", type="token" ) + public static final String SP_INGREDIENT_CODE = "ingredient-code"; + /** + * Fluent Client search parameter constant for ingredient-code + *

+ * Description: The product contained
+ * Type: token
+ * Path: Medication.product.ingredient.itemCodeableConcept
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam INGREDIENT_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INGREDIENT_CODE); + /** * Search parameter: container *

@@ -1303,6 +1321,32 @@ public class Medication extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTAINER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTAINER); + /** + * Search parameter: package-item + *

+ * Description: The item in the package
+ * Type: reference
+ * Path: Medication.package.content.itemReference
+ *

+ */ + @SearchParamDefinition(name="package-item", path="Medication.package.content.itemReference", description="The item in the package", type="reference" ) + public static final String SP_PACKAGE_ITEM = "package-item"; + /** + * Fluent Client search parameter constant for package-item + *

+ * Description: The item in the package
+ * Type: reference
+ * Path: Medication.package.content.itemReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PACKAGE_ITEM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PACKAGE_ITEM); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Medication:package-item". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PACKAGE_ITEM = new ca.uhn.fhir.model.api.Include("Medication:package-item").toLocked(); + /** * Search parameter: code *

@@ -1328,17 +1372,17 @@ public class Medication extends DomainResource { *

* Description: The product contained
* Type: reference
- * Path: Medication.product.ingredient.item
+ * Path: Medication.product.ingredient.itemReference
*

*/ - @SearchParamDefinition(name="ingredient", path="Medication.product.ingredient.item", description="The product contained", type="reference" ) + @SearchParamDefinition(name="ingredient", path="Medication.product.ingredient.itemReference", description="The product contained", type="reference" ) public static final String SP_INGREDIENT = "ingredient"; /** * Fluent Client search parameter constant for ingredient *

* Description: The product contained
* Type: reference
- * Path: Medication.product.ingredient.item
+ * Path: Medication.product.ingredient.itemReference
*

*/ public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INGREDIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INGREDIENT); @@ -1370,30 +1414,24 @@ public class Medication extends DomainResource { public static final ca.uhn.fhir.rest.gclient.TokenClientParam FORM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FORM); /** - * Search parameter: packageitem + * Search parameter: package-item-code *

* Description: The item in the package
- * Type: reference
- * Path: Medication.package.content.item
+ * Type: token
+ * Path: Medication.package.content.itemCodeableConcept
*

*/ - @SearchParamDefinition(name="packageitem", path="Medication.package.content.item", description="The item in the package", type="reference" ) - public static final String SP_PACKAGEITEM = "packageitem"; + @SearchParamDefinition(name="package-item-code", path="Medication.package.content.itemCodeableConcept", description="The item in the package", type="token" ) + public static final String SP_PACKAGE_ITEM_CODE = "package-item-code"; /** - * Fluent Client search parameter constant for packageitem + * Fluent Client search parameter constant for package-item-code *

* Description: The item in the package
- * Type: reference
- * Path: Medication.package.content.item
+ * Type: token
+ * Path: Medication.package.content.itemCodeableConcept
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PACKAGEITEM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PACKAGEITEM); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "Medication:packageitem". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PACKAGEITEM = new ca.uhn.fhir.model.api.Include("Medication:packageitem").toLocked(); + public static final ca.uhn.fhir.rest.gclient.TokenClientParam PACKAGE_ITEM_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PACKAGE_ITEM_CODE); /** * Search parameter: manufacturer diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MedicationAdministration.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MedicationAdministration.java index a8a76b5d7c9..3e022006df2 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MedicationAdministration.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MedicationAdministration.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner. */ @@ -189,7 +188,7 @@ public class MedicationAdministration extends DomainResource { * Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. */ @Child(name = "text", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Dosage Instructions", formalDefinition="Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication." ) + @Description(shortDefinition="Free text dosage instructions e.g. SIG", formalDefinition="Free text dosage instructions can be used for cases where the instructions are too complex to code. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication." ) protected StringType text; /** @@ -547,9 +546,8 @@ public class MedicationAdministration extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (text == null || text.isEmpty()) && (site == null || site.isEmpty()) - && (route == null || route.isEmpty()) && (method == null || method.isEmpty()) && (quantity == null || quantity.isEmpty()) - && (rate == null || rate.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( text, site, route, method, quantity + , rate); } public String fhirType() { @@ -1488,13 +1486,9 @@ public class MedicationAdministration extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) - && (medication == null || medication.isEmpty()) && (patient == null || patient.isEmpty()) - && (encounter == null || encounter.isEmpty()) && (effectiveTime == null || effectiveTime.isEmpty()) - && (practitioner == null || practitioner.isEmpty()) && (prescription == null || prescription.isEmpty()) - && (wasNotGiven == null || wasNotGiven.isEmpty()) && (reasonNotGiven == null || reasonNotGiven.isEmpty()) - && (reasonGiven == null || reasonGiven.isEmpty()) && (device == null || device.isEmpty()) - && (note == null || note.isEmpty()) && (dosage == null || dosage.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, medication + , patient, encounter, effectiveTime, practitioner, prescription, wasNotGiven, reasonNotGiven + , reasonGiven, device, note, dosage); } @Override @@ -1596,7 +1590,7 @@ public class MedicationAdministration extends DomainResource { * Path: MedicationAdministration.practitioner
*

*/ - @SearchParamDefinition(name="practitioner", path="MedicationAdministration.practitioner", description="Who administered substance", type="reference" ) + @SearchParamDefinition(name="practitioner", path="MedicationAdministration.practitioner", description="Who administered substance", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_PRACTITIONER = "practitioner"; /** * Fluent Client search parameter constant for practitioner @@ -1622,7 +1616,7 @@ public class MedicationAdministration extends DomainResource { * Path: MedicationAdministration.patient
*

*/ - @SearchParamDefinition(name="patient", path="MedicationAdministration.patient", description="The identity of a patient to list administrations for", type="reference" ) + @SearchParamDefinition(name="patient", path="MedicationAdministration.patient", description="The identity of a patient to list administrations for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient @@ -1694,7 +1688,7 @@ public class MedicationAdministration extends DomainResource { * Path: MedicationAdministration.encounter
*

*/ - @SearchParamDefinition(name="encounter", path="MedicationAdministration.encounter", description="Return administrations that share this encounter", type="reference" ) + @SearchParamDefinition(name="encounter", path="MedicationAdministration.encounter", description="Return administrations that share this encounter", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) public static final String SP_ENCOUNTER = "encounter"; /** * Fluent Client search parameter constant for encounter @@ -1720,7 +1714,7 @@ public class MedicationAdministration extends DomainResource { * Path: MedicationAdministration.device
*

*/ - @SearchParamDefinition(name="device", path="MedicationAdministration.device", description="Return administrations with this administration device identity", type="reference" ) + @SearchParamDefinition(name="device", path="MedicationAdministration.device", description="Return administrations with this administration device identity", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device") } ) public static final String SP_DEVICE = "device"; /** * Fluent Client search parameter constant for device diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MedicationDispense.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MedicationDispense.java index a2ff6f36951..47e2b56682c 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MedicationDispense.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MedicationDispense.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order. */ @@ -764,11 +763,8 @@ Specifically if 'boolean' datatype is selected, then the following logic applies } public boolean isEmpty() { - return super.isEmpty() && (text == null || text.isEmpty()) && (additionalInstructions == null || additionalInstructions.isEmpty()) - && (timing == null || timing.isEmpty()) && (asNeeded == null || asNeeded.isEmpty()) && (site == null || site.isEmpty()) - && (route == null || route.isEmpty()) && (method == null || method.isEmpty()) && (dose == null || dose.isEmpty()) - && (rate == null || rate.isEmpty()) && (maxDosePerPeriod == null || maxDosePerPeriod.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( text, additionalInstructions, timing + , asNeeded, site, route, method, dose, rate, maxDosePerPeriod); } public String fhirType() { @@ -1022,8 +1018,8 @@ Specifically if 'boolean' datatype is selected, then the following logic applies } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (reason == null || reason.isEmpty()) - && (responsibleParty == null || responsibleParty.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, reason, responsibleParty + ); } public String fhirType() { @@ -1157,10 +1153,10 @@ Specifically if 'boolean' datatype is selected, then the following logic applies protected List note; /** - * Indicates how the medication is to be used by the patient. + * Indicates how the medication is to be used by the patient. The pharmacist reviews the medication order prior to dispense and updates the dosageInstruction based on the actual product being dispensed. */ @Child(name = "dosageInstruction", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Medicine administration instructions to the patient/caregiver", formalDefinition="Indicates how the medication is to be used by the patient." ) + @Description(shortDefinition="Medicine administration instructions to the patient/caregiver", formalDefinition="Indicates how the medication is to be used by the patient. The pharmacist reviews the medication order prior to dispense and updates the dosageInstruction based on the actual product being dispensed." ) protected List dosageInstruction; /** @@ -1758,7 +1754,7 @@ Specifically if 'boolean' datatype is selected, then the following logic applies } /** - * @return {@link #dosageInstruction} (Indicates how the medication is to be used by the patient.) + * @return {@link #dosageInstruction} (Indicates how the medication is to be used by the patient. The pharmacist reviews the medication order prior to dispense and updates the dosageInstruction based on the actual product being dispensed.) */ public List getDosageInstruction() { if (this.dosageInstruction == null) @@ -1776,7 +1772,7 @@ Specifically if 'boolean' datatype is selected, then the following logic applies } /** - * @return {@link #dosageInstruction} (Indicates how the medication is to be used by the patient.) + * @return {@link #dosageInstruction} (Indicates how the medication is to be used by the patient. The pharmacist reviews the medication order prior to dispense and updates the dosageInstruction based on the actual product being dispensed.) */ // syntactic sugar public MedicationDispenseDosageInstructionComponent addDosageInstruction() { //3 @@ -1837,7 +1833,7 @@ Specifically if 'boolean' datatype is selected, then the following logic applies childrenList.add(new Property("destination", "Reference(Location)", "Identification of the facility/location where the medication was shipped to, as part of the dispense event.", 0, java.lang.Integer.MAX_VALUE, destination)); childrenList.add(new Property("receiver", "Reference(Patient|Practitioner)", "Identifies the person who picked up the medication. This will usually be a patient or their caregiver, but some cases exist where it can be a healthcare professional.", 0, java.lang.Integer.MAX_VALUE, receiver)); childrenList.add(new Property("note", "Annotation", "Extra information about the dispense that could not be conveyed in the other attributes.", 0, java.lang.Integer.MAX_VALUE, note)); - childrenList.add(new Property("dosageInstruction", "", "Indicates how the medication is to be used by the patient.", 0, java.lang.Integer.MAX_VALUE, dosageInstruction)); + childrenList.add(new Property("dosageInstruction", "", "Indicates how the medication is to be used by the patient. The pharmacist reviews the medication order prior to dispense and updates the dosageInstruction based on the actual product being dispensed.", 0, java.lang.Integer.MAX_VALUE, dosageInstruction)); childrenList.add(new Property("substitution", "", "Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but does not happen, in other cases substitution is not expected but does happen. This block explains what substitution did or did not happen and why.", 0, java.lang.Integer.MAX_VALUE, substitution)); } @@ -2021,14 +2017,9 @@ Specifically if 'boolean' datatype is selected, then the following logic applies } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) - && (medication == null || medication.isEmpty()) && (patient == null || patient.isEmpty()) - && (dispenser == null || dispenser.isEmpty()) && (authorizingPrescription == null || authorizingPrescription.isEmpty()) - && (type == null || type.isEmpty()) && (quantity == null || quantity.isEmpty()) && (daysSupply == null || daysSupply.isEmpty()) - && (whenPrepared == null || whenPrepared.isEmpty()) && (whenHandedOver == null || whenHandedOver.isEmpty()) - && (destination == null || destination.isEmpty()) && (receiver == null || receiver.isEmpty()) - && (note == null || note.isEmpty()) && (dosageInstruction == null || dosageInstruction.isEmpty()) - && (substitution == null || substitution.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, medication + , patient, dispenser, authorizingPrescription, type, quantity, daysSupply, whenPrepared + , whenHandedOver, destination, receiver, note, dosageInstruction, substitution); } @Override @@ -2084,7 +2075,7 @@ Specifically if 'boolean' datatype is selected, then the following logic applies * Path: MedicationDispense.receiver
*

*/ - @SearchParamDefinition(name="receiver", path="MedicationDispense.receiver", description="Who collected the medication", type="reference" ) + @SearchParamDefinition(name="receiver", path="MedicationDispense.receiver", description="Who collected the medication", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_RECEIVER = "receiver"; /** * Fluent Client search parameter constant for receiver @@ -2162,7 +2153,7 @@ Specifically if 'boolean' datatype is selected, then the following logic applies * Path: MedicationDispense.substitution.responsibleParty
*

*/ - @SearchParamDefinition(name="responsibleparty", path="MedicationDispense.substitution.responsibleParty", description="Return all dispenses with the specified responsible party", type="reference" ) + @SearchParamDefinition(name="responsibleparty", path="MedicationDispense.substitution.responsibleParty", description="Return all dispenses with the specified responsible party", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_RESPONSIBLEPARTY = "responsibleparty"; /** * Fluent Client search parameter constant for responsibleparty @@ -2248,7 +2239,7 @@ Specifically if 'boolean' datatype is selected, then the following logic applies * Path: MedicationDispense.dispenser
*

*/ - @SearchParamDefinition(name="dispenser", path="MedicationDispense.dispenser", description="Return all dispenses performed by a specific individual", type="reference" ) + @SearchParamDefinition(name="dispenser", path="MedicationDispense.dispenser", description="Return all dispenses performed by a specific individual", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_DISPENSER = "dispenser"; /** * Fluent Client search parameter constant for dispenser @@ -2300,7 +2291,7 @@ Specifically if 'boolean' datatype is selected, then the following logic applies * Path: MedicationDispense.patient
*

*/ - @SearchParamDefinition(name="patient", path="MedicationDispense.patient", description="The identity of a patient to list dispenses for", type="reference" ) + @SearchParamDefinition(name="patient", path="MedicationDispense.patient", description="The identity of a patient to list dispenses for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MedicationOrder.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MedicationOrder.java index 4f07ec5ffaa..764b3a8f20b 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MedicationOrder.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MedicationOrder.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * An order for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationOrder" rather than "MedicationPrescription" to generalize the use across inpatient and outpatient settings as well as for care plans, etc. */ @@ -205,7 +204,7 @@ public class MedicationOrder extends DomainResource { * Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing. */ @Child(name = "text", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Dosage instructions expressed as text", formalDefinition="Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing." ) + @Description(shortDefinition="Free text dosage instructions e.g. SIG", formalDefinition="Free text dosage instructions can be used for cases where the instructions are too complex to code. The content of this attribute does not include the name or description of the medication. When coded instructions are present, the free text instructions may still be present for display to humans taking or administering the medication. It is expected that the text instructions will always be populated. If the dosage.timing attribute is also populated, then the dosage.text should reflect the same information as the timing." ) protected StringType text; /** @@ -260,7 +259,7 @@ public class MedicationOrder extends DomainResource { /** * Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours. */ - @Child(name = "rate", type = {Ratio.class, Range.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Child(name = "rate", type = {Ratio.class, Range.class, SimpleQuantity.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Amount of medication per unit of time", formalDefinition="Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours." ) protected Type rate; @@ -593,6 +592,19 @@ public class MedicationOrder extends DomainResource { return this.rate instanceof Range; } + /** + * @return {@link #rate} (Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.) + */ + public SimpleQuantity getRateSimpleQuantity() throws FHIRException { + if (!(this.rate instanceof SimpleQuantity)) + throw new FHIRException("Type mismatch: the type SimpleQuantity was expected, but "+this.rate.getClass().getName()+" was encountered"); + return (SimpleQuantity) this.rate; + } + + public boolean hasRateSimpleQuantity() { + return this.rate instanceof SimpleQuantity; + } + public boolean hasRate() { return this.rate != null && !this.rate.isEmpty(); } @@ -639,7 +651,7 @@ public class MedicationOrder extends DomainResource { childrenList.add(new Property("route", "CodeableConcept", "A code specifying the route or physiological path of administration of a therapeutic agent into or onto a patient's body.", 0, java.lang.Integer.MAX_VALUE, route)); childrenList.add(new Property("method", "CodeableConcept", "A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections. For examples, Slow Push; Deep IV.", 0, java.lang.Integer.MAX_VALUE, method)); childrenList.add(new Property("dose[x]", "Range|SimpleQuantity", "The amount of therapeutic or other substance given at one administration event.", 0, java.lang.Integer.MAX_VALUE, dose)); - childrenList.add(new Property("rate[x]", "Ratio|Range", "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", 0, java.lang.Integer.MAX_VALUE, rate)); + childrenList.add(new Property("rate[x]", "Ratio|Range|SimpleQuantity", "Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours.", 0, java.lang.Integer.MAX_VALUE, rate)); childrenList.add(new Property("maxDosePerPeriod", "Ratio", "The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours.", 0, java.lang.Integer.MAX_VALUE, maxDosePerPeriod)); } @@ -722,6 +734,10 @@ public class MedicationOrder extends DomainResource { this.rate = new Range(); return this.rate; } + else if (name.equals("rateSimpleQuantity")) { + this.rate = new SimpleQuantity(); + return this.rate; + } else if (name.equals("maxDosePerPeriod")) { this.maxDosePerPeriod = new Ratio(); return this.maxDosePerPeriod; @@ -770,11 +786,8 @@ public class MedicationOrder extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (text == null || text.isEmpty()) && (additionalInstructions == null || additionalInstructions.isEmpty()) - && (timing == null || timing.isEmpty()) && (asNeeded == null || asNeeded.isEmpty()) && (site == null || site.isEmpty()) - && (route == null || route.isEmpty()) && (method == null || method.isEmpty()) && (dose == null || dose.isEmpty()) - && (rate == null || rate.isEmpty()) && (maxDosePerPeriod == null || maxDosePerPeriod.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( text, additionalInstructions, timing + , asNeeded, site, route, method, dose, rate, maxDosePerPeriod); } public String fhirType() { @@ -1080,9 +1093,8 @@ public class MedicationOrder extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (medication == null || medication.isEmpty()) && (validityPeriod == null || validityPeriod.isEmpty()) - && (numberOfRepeatsAllowed == null || numberOfRepeatsAllowed.isEmpty()) && (quantity == null || quantity.isEmpty()) - && (expectedSupplyDuration == null || expectedSupplyDuration.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( medication, validityPeriod, numberOfRepeatsAllowed + , quantity, expectedSupplyDuration); } public String fhirType() { @@ -1232,8 +1244,7 @@ public class MedicationOrder extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (reason == null || reason.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, reason); } public String fhirType() { @@ -1310,56 +1321,68 @@ public class MedicationOrder extends DomainResource { /** * Can be the reason or the indication for writing the prescription. */ - @Child(name = "reason", type = {CodeableConcept.class, Condition.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "reasonCode", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Reason or indication for writing the prescription", formalDefinition="Can be the reason or the indication for writing the prescription." ) - protected Type reason; + protected List reasonCode; + + /** + * Condition that supports why the prescription is being written. + */ + @Child(name = "reasonReference", type = {Condition.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Condition that supports why the prescription is being written", formalDefinition="Condition that supports why the prescription is being written." ) + protected List reasonReference; + /** + * The actual objects that are the target of the reference (Condition that supports why the prescription is being written.) + */ + protected List reasonReferenceTarget; + /** * The date (and perhaps time) when the prescription was stopped. */ - @Child(name = "dateEnded", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "dateEnded", type = {DateTimeType.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="When prescription was stopped", formalDefinition="The date (and perhaps time) when the prescription was stopped." ) protected DateTimeType dateEnded; /** * The reason why the prescription was stopped, if it was. */ - @Child(name = "reasonEnded", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Child(name = "reasonEnded", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Why prescription was stopped", formalDefinition="The reason why the prescription was stopped, if it was." ) protected CodeableConcept reasonEnded; /** * Extra information about the prescription that could not be conveyed by the other attributes. */ - @Child(name = "note", type = {Annotation.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "note", type = {Annotation.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Information about the prescription", formalDefinition="Extra information about the prescription that could not be conveyed by the other attributes." ) protected List note; /** * Indicates how the medication is to be used by the patient. */ - @Child(name = "dosageInstruction", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "dosageInstruction", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="How medication should be taken", formalDefinition="Indicates how the medication is to be used by the patient." ) protected List dosageInstruction; /** * Indicates the specific details for the dispense or medication supply part of a medication order (also known as a Medication Prescription). Note that this information is NOT always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department. */ - @Child(name = "dispenseRequest", type = {}, order=12, min=0, max=1, modifier=false, summary=true) + @Child(name = "dispenseRequest", type = {}, order=13, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Medication supply authorization", formalDefinition="Indicates the specific details for the dispense or medication supply part of a medication order (also known as a Medication Prescription). Note that this information is NOT always sent with the order. There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department." ) protected MedicationOrderDispenseRequestComponent dispenseRequest; /** * Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done. */ - @Child(name = "substitution", type = {}, order=13, min=0, max=1, modifier=false, summary=true) + @Child(name = "substitution", type = {}, order=14, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Any restrictions on medication substitution", formalDefinition="Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done." ) protected MedicationOrderSubstitutionComponent substitution; /** * A link to a resource representing an earlier order or prescription that this order supersedes. */ - @Child(name = "priorPrescription", type = {MedicationOrder.class}, order=14, min=0, max=1, modifier=false, summary=true) + @Child(name = "priorPrescription", type = {MedicationOrder.class}, order=15, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="An order/prescription that this supersedes", formalDefinition="A link to a resource representing an earlier order or prescription that this order supersedes." ) protected Reference priorPrescription; @@ -1368,7 +1391,7 @@ public class MedicationOrder extends DomainResource { */ protected MedicationOrder priorPrescriptionTarget; - private static final long serialVersionUID = 1534564169L; + private static final long serialVersionUID = -1031457736L; /** * Constructor @@ -1701,50 +1724,106 @@ public class MedicationOrder extends DomainResource { } /** - * @return {@link #reason} (Can be the reason or the indication for writing the prescription.) + * @return {@link #reasonCode} (Can be the reason or the indication for writing the prescription.) */ - public Type getReason() { - return this.reason; + public List getReasonCode() { + if (this.reasonCode == null) + this.reasonCode = new ArrayList(); + return this.reasonCode; + } + + public boolean hasReasonCode() { + if (this.reasonCode == null) + return false; + for (CodeableConcept item : this.reasonCode) + if (!item.isEmpty()) + return true; + return false; } /** - * @return {@link #reason} (Can be the reason or the indication for writing the prescription.) + * @return {@link #reasonCode} (Can be the reason or the indication for writing the prescription.) */ - public CodeableConcept getReasonCodeableConcept() throws FHIRException { - if (!(this.reason instanceof CodeableConcept)) - throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.reason.getClass().getName()+" was encountered"); - return (CodeableConcept) this.reason; + // syntactic sugar + public CodeableConcept addReasonCode() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.reasonCode == null) + this.reasonCode = new ArrayList(); + this.reasonCode.add(t); + return t; } - public boolean hasReasonCodeableConcept() { - return this.reason instanceof CodeableConcept; + // syntactic sugar + public MedicationOrder addReasonCode(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.reasonCode == null) + this.reasonCode = new ArrayList(); + this.reasonCode.add(t); + return this; } /** - * @return {@link #reason} (Can be the reason or the indication for writing the prescription.) + * @return {@link #reasonReference} (Condition that supports why the prescription is being written.) */ - public Reference getReasonReference() throws FHIRException { - if (!(this.reason instanceof Reference)) - throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.reason.getClass().getName()+" was encountered"); - return (Reference) this.reason; + public List getReasonReference() { + if (this.reasonReference == null) + this.reasonReference = new ArrayList(); + return this.reasonReference; } public boolean hasReasonReference() { - return this.reason instanceof Reference; - } - - public boolean hasReason() { - return this.reason != null && !this.reason.isEmpty(); + if (this.reasonReference == null) + return false; + for (Reference item : this.reasonReference) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #reason} (Can be the reason or the indication for writing the prescription.) + * @return {@link #reasonReference} (Condition that supports why the prescription is being written.) */ - public MedicationOrder setReason(Type value) { - this.reason = value; + // syntactic sugar + public Reference addReasonReference() { //3 + Reference t = new Reference(); + if (this.reasonReference == null) + this.reasonReference = new ArrayList(); + this.reasonReference.add(t); + return t; + } + + // syntactic sugar + public MedicationOrder addReasonReference(Reference t) { //3 + if (t == null) + return this; + if (this.reasonReference == null) + this.reasonReference = new ArrayList(); + this.reasonReference.add(t); return this; } + /** + * @return {@link #reasonReference} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Condition that supports why the prescription is being written.) + */ + public List getReasonReferenceTarget() { + if (this.reasonReferenceTarget == null) + this.reasonReferenceTarget = new ArrayList(); + return this.reasonReferenceTarget; + } + + // syntactic sugar + /** + * @return {@link #reasonReference} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Condition that supports why the prescription is being written.) + */ + public Condition addReasonReferenceTarget() { + Condition r = new Condition(); + if (this.reasonReferenceTarget == null) + this.reasonReferenceTarget = new ArrayList(); + this.reasonReferenceTarget.add(r); + return r; + } + /** * @return {@link #dateEnded} (The date (and perhaps time) when the prescription was stopped.). This is the underlying object with id, value and extensions. The accessor "getDateEnded" gives direct access to the value */ @@ -1999,7 +2078,8 @@ public class MedicationOrder extends DomainResource { childrenList.add(new Property("encounter", "Reference(Encounter)", "A link to a resource that identifies the particular occurrence of contact between patient and health care provider.", 0, java.lang.Integer.MAX_VALUE, encounter)); childrenList.add(new Property("dateWritten", "dateTime", "The date (and perhaps time) when the prescription was written.", 0, java.lang.Integer.MAX_VALUE, dateWritten)); childrenList.add(new Property("prescriber", "Reference(Practitioner)", "The healthcare professional responsible for authorizing the prescription.", 0, java.lang.Integer.MAX_VALUE, prescriber)); - childrenList.add(new Property("reason[x]", "CodeableConcept|Reference(Condition)", "Can be the reason or the indication for writing the prescription.", 0, java.lang.Integer.MAX_VALUE, reason)); + childrenList.add(new Property("reasonCode", "CodeableConcept", "Can be the reason or the indication for writing the prescription.", 0, java.lang.Integer.MAX_VALUE, reasonCode)); + childrenList.add(new Property("reasonReference", "Reference(Condition)", "Condition that supports why the prescription is being written.", 0, java.lang.Integer.MAX_VALUE, reasonReference)); childrenList.add(new Property("dateEnded", "dateTime", "The date (and perhaps time) when the prescription was stopped.", 0, java.lang.Integer.MAX_VALUE, dateEnded)); childrenList.add(new Property("reasonEnded", "CodeableConcept", "The reason why the prescription was stopped, if it was.", 0, java.lang.Integer.MAX_VALUE, reasonEnded)); childrenList.add(new Property("note", "Annotation", "Extra information about the prescription that could not be conveyed by the other attributes.", 0, java.lang.Integer.MAX_VALUE, note)); @@ -2025,8 +2105,10 @@ public class MedicationOrder extends DomainResource { this.dateWritten = castToDateTime(value); // DateTimeType else if (name.equals("prescriber")) this.prescriber = castToReference(value); // Reference - else if (name.equals("reason[x]")) - this.reason = (Type) value; // Type + else if (name.equals("reasonCode")) + this.getReasonCode().add(castToCodeableConcept(value)); + else if (name.equals("reasonReference")) + this.getReasonReference().add(castToReference(value)); else if (name.equals("dateEnded")) this.dateEnded = castToDateTime(value); // DateTimeType else if (name.equals("reasonEnded")) @@ -2076,13 +2158,11 @@ public class MedicationOrder extends DomainResource { this.prescriber = new Reference(); return this.prescriber; } - else if (name.equals("reasonCodeableConcept")) { - this.reason = new CodeableConcept(); - return this.reason; + else if (name.equals("reasonCode")) { + return addReasonCode(); } else if (name.equals("reasonReference")) { - this.reason = new Reference(); - return this.reason; + return addReasonReference(); } else if (name.equals("dateEnded")) { throw new FHIRException("Cannot call addChild on a primitive type MedicationOrder.dateEnded"); @@ -2132,7 +2212,16 @@ public class MedicationOrder extends DomainResource { dst.encounter = encounter == null ? null : encounter.copy(); dst.dateWritten = dateWritten == null ? null : dateWritten.copy(); dst.prescriber = prescriber == null ? null : prescriber.copy(); - dst.reason = reason == null ? null : reason.copy(); + if (reasonCode != null) { + dst.reasonCode = new ArrayList(); + for (CodeableConcept i : reasonCode) + dst.reasonCode.add(i.copy()); + }; + if (reasonReference != null) { + dst.reasonReference = new ArrayList(); + for (Reference i : reasonReference) + dst.reasonReference.add(i.copy()); + }; dst.dateEnded = dateEnded == null ? null : dateEnded.copy(); dst.reasonEnded = reasonEnded == null ? null : reasonEnded.copy(); if (note != null) { @@ -2164,10 +2253,11 @@ public class MedicationOrder extends DomainResource { MedicationOrder o = (MedicationOrder) other; return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(medication, o.medication, true) && compareDeep(patient, o.patient, true) && compareDeep(encounter, o.encounter, true) && compareDeep(dateWritten, o.dateWritten, true) - && compareDeep(prescriber, o.prescriber, true) && compareDeep(reason, o.reason, true) && compareDeep(dateEnded, o.dateEnded, true) - && compareDeep(reasonEnded, o.reasonEnded, true) && compareDeep(note, o.note, true) && compareDeep(dosageInstruction, o.dosageInstruction, true) - && compareDeep(dispenseRequest, o.dispenseRequest, true) && compareDeep(substitution, o.substitution, true) - && compareDeep(priorPrescription, o.priorPrescription, true); + && compareDeep(prescriber, o.prescriber, true) && compareDeep(reasonCode, o.reasonCode, true) && compareDeep(reasonReference, o.reasonReference, true) + && compareDeep(dateEnded, o.dateEnded, true) && compareDeep(reasonEnded, o.reasonEnded, true) && compareDeep(note, o.note, true) + && compareDeep(dosageInstruction, o.dosageInstruction, true) && compareDeep(dispenseRequest, o.dispenseRequest, true) + && compareDeep(substitution, o.substitution, true) && compareDeep(priorPrescription, o.priorPrescription, true) + ; } @Override @@ -2182,13 +2272,10 @@ public class MedicationOrder extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) - && (medication == null || medication.isEmpty()) && (patient == null || patient.isEmpty()) - && (encounter == null || encounter.isEmpty()) && (dateWritten == null || dateWritten.isEmpty()) - && (prescriber == null || prescriber.isEmpty()) && (reason == null || reason.isEmpty()) && (dateEnded == null || dateEnded.isEmpty()) - && (reasonEnded == null || reasonEnded.isEmpty()) && (note == null || note.isEmpty()) && (dosageInstruction == null || dosageInstruction.isEmpty()) - && (dispenseRequest == null || dispenseRequest.isEmpty()) && (substitution == null || substitution.isEmpty()) - && (priorPrescription == null || priorPrescription.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, medication + , patient, encounter, dateWritten, prescriber, reasonCode, reasonReference, dateEnded + , reasonEnded, note, dosageInstruction, dispenseRequest, substitution, priorPrescription + ); } @Override @@ -2204,7 +2291,7 @@ public class MedicationOrder extends DomainResource { * Path: MedicationOrder.prescriber
*

*/ - @SearchParamDefinition(name="prescriber", path="MedicationOrder.prescriber", description="Who ordered the medication(s)", type="reference" ) + @SearchParamDefinition(name="prescriber", path="MedicationOrder.prescriber", description="Who ordered the medication(s)", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_PRESCRIBER = "prescriber"; /** * Fluent Client search parameter constant for prescriber @@ -2270,7 +2357,7 @@ public class MedicationOrder extends DomainResource { * Path: MedicationOrder.patient
*

*/ - @SearchParamDefinition(name="patient", path="MedicationOrder.patient", description="The identity of a patient to list orders for", type="reference" ) + @SearchParamDefinition(name="patient", path="MedicationOrder.patient", description="The identity of a patient to list orders for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient @@ -2342,7 +2429,7 @@ public class MedicationOrder extends DomainResource { * Path: MedicationOrder.encounter
*

*/ - @SearchParamDefinition(name="encounter", path="MedicationOrder.encounter", description="Return prescriptions with this encounter identifier", type="reference" ) + @SearchParamDefinition(name="encounter", path="MedicationOrder.encounter", description="Return prescriptions with this encounter identifier", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) public static final String SP_ENCOUNTER = "encounter"; /** * Fluent Client search parameter constant for encounter diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MedicationStatement.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MedicationStatement.java index 484d5f30c98..c2a7aaa26fb 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MedicationStatement.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MedicationStatement.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from e.g. the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. */ @@ -173,7 +172,7 @@ public class MedicationStatement extends DomainResource { * Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans. */ @Child(name = "text", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Reported dosage information", formalDefinition="Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans." ) + @Description(shortDefinition="Free text dosage instructions as reported by the information source", formalDefinition="Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans." ) protected StringType text; /** @@ -709,10 +708,8 @@ Specifically if 'boolean' datatype is selected, then the following logic applies } public boolean isEmpty() { - return super.isEmpty() && (text == null || text.isEmpty()) && (timing == null || timing.isEmpty()) - && (asNeeded == null || asNeeded.isEmpty()) && (site == null || site.isEmpty()) && (route == null || route.isEmpty()) - && (method == null || method.isEmpty()) && (quantity == null || quantity.isEmpty()) && (rate == null || rate.isEmpty()) - && (maxDosePerPeriod == null || maxDosePerPeriod.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( text, timing, asNeeded, site + , route, method, quantity, rate, maxDosePerPeriod); } public String fhirType() { @@ -763,64 +760,64 @@ Specifically if 'boolean' datatype is selected, then the following logic applies protected Type effective; /** - * The person who provided the information about the taking of this medication. + * The person who provided the information about the taking of this medication. Note: A MedicationStatement may be derived from supportingInformation e.g claims or medicationOrder. */ @Child(name = "informationSource", type = {Patient.class, Practitioner.class, RelatedPerson.class}, order=5, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="", formalDefinition="The person who provided the information about the taking of this medication." ) + @Description(shortDefinition="Person who provided the information about the taking of this medication", formalDefinition="The person who provided the information about the taking of this medication. Note: A MedicationStatement may be derived from supportingInformation e.g claims or medicationOrder." ) protected Reference informationSource; /** - * The actual object that is the target of the reference (The person who provided the information about the taking of this medication.) + * The actual object that is the target of the reference (The person who provided the information about the taking of this medication. Note: A MedicationStatement may be derived from supportingInformation e.g claims or medicationOrder.) */ protected Resource informationSourceTarget; + /** + * Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports or is used to derive the MedicationStatement. + */ + @Child(name = "supportingInformation", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Additional supporting information", formalDefinition="Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports or is used to derive the MedicationStatement." ) + protected List supportingInformation; + /** + * The actual objects that are the target of the reference (Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports or is used to derive the MedicationStatement.) + */ + protected List supportingInformationTarget; + + /** * The date when the medication statement was asserted by the information source. */ - @Child(name = "dateAsserted", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "dateAsserted", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="When the statement was asserted?", formalDefinition="The date when the medication statement was asserted by the information source." ) protected DateTimeType dateAsserted; /** * Set this to true if the record is saying that the medication was NOT taken. */ - @Child(name = "wasNotTaken", type = {BooleanType.class}, order=7, min=0, max=1, modifier=true, summary=true) + @Child(name = "wasNotTaken", type = {BooleanType.class}, order=8, min=0, max=1, modifier=true, summary=true) @Description(shortDefinition="True if medication is/was not being taken", formalDefinition="Set this to true if the record is saying that the medication was NOT taken." ) protected BooleanType wasNotTaken; /** * A code indicating why the medication was not taken. */ - @Child(name = "reasonNotTaken", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "reasonNotTaken", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="True if asserting medication was not given", formalDefinition="A code indicating why the medication was not taken." ) protected List reasonNotTaken; /** * A reason for why the medication is being/was taken. */ - @Child(name = "reasonForUse", type = {CodeableConcept.class, Condition.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Child(name = "reasonForUse", type = {CodeableConcept.class, Condition.class}, order=10, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="", formalDefinition="A reason for why the medication is being/was taken." ) protected Type reasonForUse; /** * Provides extra information about the medication statement that is not conveyed by the other attributes. */ - @Child(name = "note", type = {Annotation.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "note", type = {Annotation.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Further information about the statement", formalDefinition="Provides extra information about the medication statement that is not conveyed by the other attributes." ) protected List note; - /** - * Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement. - */ - @Child(name = "supportingInformation", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Additional supporting information", formalDefinition="Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement." ) - protected List supportingInformation; - /** - * The actual objects that are the target of the reference (Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.) - */ - protected List supportingInformationTarget; - - /** * Indicates how the medication is/was used by the patient. */ @@ -828,7 +825,7 @@ Specifically if 'boolean' datatype is selected, then the following logic applies @Description(shortDefinition="Details of how medication was taken", formalDefinition="Indicates how the medication is/was used by the patient." ) protected List dosage; - private static final long serialVersionUID = -1434390772L; + private static final long serialVersionUID = -425948910L; /** * Constructor @@ -1067,7 +1064,7 @@ Specifically if 'boolean' datatype is selected, then the following logic applies } /** - * @return {@link #informationSource} (The person who provided the information about the taking of this medication.) + * @return {@link #informationSource} (The person who provided the information about the taking of this medication. Note: A MedicationStatement may be derived from supportingInformation e.g claims or medicationOrder.) */ public Reference getInformationSource() { if (this.informationSource == null) @@ -1083,7 +1080,7 @@ Specifically if 'boolean' datatype is selected, then the following logic applies } /** - * @param value {@link #informationSource} (The person who provided the information about the taking of this medication.) + * @param value {@link #informationSource} (The person who provided the information about the taking of this medication. Note: A MedicationStatement may be derived from supportingInformation e.g claims or medicationOrder.) */ public MedicationStatement setInformationSource(Reference value) { this.informationSource = value; @@ -1091,20 +1088,69 @@ Specifically if 'boolean' datatype is selected, then the following logic applies } /** - * @return {@link #informationSource} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person who provided the information about the taking of this medication.) + * @return {@link #informationSource} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person who provided the information about the taking of this medication. Note: A MedicationStatement may be derived from supportingInformation e.g claims or medicationOrder.) */ public Resource getInformationSourceTarget() { return this.informationSourceTarget; } /** - * @param value {@link #informationSource} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person who provided the information about the taking of this medication.) + * @param value {@link #informationSource} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person who provided the information about the taking of this medication. Note: A MedicationStatement may be derived from supportingInformation e.g claims or medicationOrder.) */ public MedicationStatement setInformationSourceTarget(Resource value) { this.informationSourceTarget = value; return this; } + /** + * @return {@link #supportingInformation} (Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports or is used to derive the MedicationStatement.) + */ + public List getSupportingInformation() { + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + return this.supportingInformation; + } + + public boolean hasSupportingInformation() { + if (this.supportingInformation == null) + return false; + for (Reference item : this.supportingInformation) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #supportingInformation} (Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports or is used to derive the MedicationStatement.) + */ + // syntactic sugar + public Reference addSupportingInformation() { //3 + Reference t = new Reference(); + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + this.supportingInformation.add(t); + return t; + } + + // syntactic sugar + public MedicationStatement addSupportingInformation(Reference t) { //3 + if (t == null) + return this; + if (this.supportingInformation == null) + this.supportingInformation = new ArrayList(); + this.supportingInformation.add(t); + return this; + } + + /** + * @return {@link #supportingInformation} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports or is used to derive the MedicationStatement.) + */ + public List getSupportingInformationTarget() { + if (this.supportingInformationTarget == null) + this.supportingInformationTarget = new ArrayList(); + return this.supportingInformationTarget; + } + /** * @return {@link #dateAsserted} (The date when the medication statement was asserted by the information source.). This is the underlying object with id, value and extensions. The accessor "getDateAsserted" gives direct access to the value */ @@ -1324,55 +1370,6 @@ Specifically if 'boolean' datatype is selected, then the following logic applies return this; } - /** - * @return {@link #supportingInformation} (Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.) - */ - public List getSupportingInformation() { - if (this.supportingInformation == null) - this.supportingInformation = new ArrayList(); - return this.supportingInformation; - } - - public boolean hasSupportingInformation() { - if (this.supportingInformation == null) - return false; - for (Reference item : this.supportingInformation) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #supportingInformation} (Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.) - */ - // syntactic sugar - public Reference addSupportingInformation() { //3 - Reference t = new Reference(); - if (this.supportingInformation == null) - this.supportingInformation = new ArrayList(); - this.supportingInformation.add(t); - return t; - } - - // syntactic sugar - public MedicationStatement addSupportingInformation(Reference t) { //3 - if (t == null) - return this; - if (this.supportingInformation == null) - this.supportingInformation = new ArrayList(); - this.supportingInformation.add(t); - return this; - } - - /** - * @return {@link #supportingInformation} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.) - */ - public List getSupportingInformationTarget() { - if (this.supportingInformationTarget == null) - this.supportingInformationTarget = new ArrayList(); - return this.supportingInformationTarget; - } - /** * @return {@link #dosage} (Indicates how the medication is/was used by the patient.) */ @@ -1420,13 +1417,13 @@ Specifically if 'boolean' datatype is selected, then the following logic applies childrenList.add(new Property("medication[x]", "CodeableConcept|Reference(Medication)", "Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications.", 0, java.lang.Integer.MAX_VALUE, medication)); childrenList.add(new Property("patient", "Reference(Patient)", "The person or animal who is/was taking the medication.", 0, java.lang.Integer.MAX_VALUE, patient)); childrenList.add(new Property("effective[x]", "dateTime|Period", "The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true).", 0, java.lang.Integer.MAX_VALUE, effective)); - childrenList.add(new Property("informationSource", "Reference(Patient|Practitioner|RelatedPerson)", "The person who provided the information about the taking of this medication.", 0, java.lang.Integer.MAX_VALUE, informationSource)); + childrenList.add(new Property("informationSource", "Reference(Patient|Practitioner|RelatedPerson)", "The person who provided the information about the taking of this medication. Note: A MedicationStatement may be derived from supportingInformation e.g claims or medicationOrder.", 0, java.lang.Integer.MAX_VALUE, informationSource)); + childrenList.add(new Property("supportingInformation", "Reference(Any)", "Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports or is used to derive the MedicationStatement.", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); childrenList.add(new Property("dateAsserted", "dateTime", "The date when the medication statement was asserted by the information source.", 0, java.lang.Integer.MAX_VALUE, dateAsserted)); childrenList.add(new Property("wasNotTaken", "boolean", "Set this to true if the record is saying that the medication was NOT taken.", 0, java.lang.Integer.MAX_VALUE, wasNotTaken)); childrenList.add(new Property("reasonNotTaken", "CodeableConcept", "A code indicating why the medication was not taken.", 0, java.lang.Integer.MAX_VALUE, reasonNotTaken)); childrenList.add(new Property("reasonForUse[x]", "CodeableConcept|Reference(Condition)", "A reason for why the medication is being/was taken.", 0, java.lang.Integer.MAX_VALUE, reasonForUse)); childrenList.add(new Property("note", "Annotation", "Provides extra information about the medication statement that is not conveyed by the other attributes.", 0, java.lang.Integer.MAX_VALUE, note)); - childrenList.add(new Property("supportingInformation", "Reference(Any)", "Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement.", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); childrenList.add(new Property("dosage", "", "Indicates how the medication is/was used by the patient.", 0, java.lang.Integer.MAX_VALUE, dosage)); } @@ -1444,6 +1441,8 @@ Specifically if 'boolean' datatype is selected, then the following logic applies this.effective = (Type) value; // Type else if (name.equals("informationSource")) this.informationSource = castToReference(value); // Reference + else if (name.equals("supportingInformation")) + this.getSupportingInformation().add(castToReference(value)); else if (name.equals("dateAsserted")) this.dateAsserted = castToDateTime(value); // DateTimeType else if (name.equals("wasNotTaken")) @@ -1454,8 +1453,6 @@ Specifically if 'boolean' datatype is selected, then the following logic applies this.reasonForUse = (Type) value; // Type else if (name.equals("note")) this.getNote().add(castToAnnotation(value)); - else if (name.equals("supportingInformation")) - this.getSupportingInformation().add(castToReference(value)); else if (name.equals("dosage")) this.getDosage().add((MedicationStatementDosageComponent) value); else @@ -1494,6 +1491,9 @@ Specifically if 'boolean' datatype is selected, then the following logic applies this.informationSource = new Reference(); return this.informationSource; } + else if (name.equals("supportingInformation")) { + return addSupportingInformation(); + } else if (name.equals("dateAsserted")) { throw new FHIRException("Cannot call addChild on a primitive type MedicationStatement.dateAsserted"); } @@ -1514,9 +1514,6 @@ Specifically if 'boolean' datatype is selected, then the following logic applies else if (name.equals("note")) { return addNote(); } - else if (name.equals("supportingInformation")) { - return addSupportingInformation(); - } else if (name.equals("dosage")) { return addDosage(); } @@ -1542,6 +1539,11 @@ Specifically if 'boolean' datatype is selected, then the following logic applies dst.patient = patient == null ? null : patient.copy(); dst.effective = effective == null ? null : effective.copy(); dst.informationSource = informationSource == null ? null : informationSource.copy(); + if (supportingInformation != null) { + dst.supportingInformation = new ArrayList(); + for (Reference i : supportingInformation) + dst.supportingInformation.add(i.copy()); + }; dst.dateAsserted = dateAsserted == null ? null : dateAsserted.copy(); dst.wasNotTaken = wasNotTaken == null ? null : wasNotTaken.copy(); if (reasonNotTaken != null) { @@ -1555,11 +1557,6 @@ Specifically if 'boolean' datatype is selected, then the following logic applies for (Annotation i : note) dst.note.add(i.copy()); }; - if (supportingInformation != null) { - dst.supportingInformation = new ArrayList(); - for (Reference i : supportingInformation) - dst.supportingInformation.add(i.copy()); - }; if (dosage != null) { dst.dosage = new ArrayList(); for (MedicationStatementDosageComponent i : dosage) @@ -1581,10 +1578,10 @@ Specifically if 'boolean' datatype is selected, then the following logic applies MedicationStatement o = (MedicationStatement) other; return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(medication, o.medication, true) && compareDeep(patient, o.patient, true) && compareDeep(effective, o.effective, true) && compareDeep(informationSource, o.informationSource, true) - && compareDeep(dateAsserted, o.dateAsserted, true) && compareDeep(wasNotTaken, o.wasNotTaken, true) - && compareDeep(reasonNotTaken, o.reasonNotTaken, true) && compareDeep(reasonForUse, o.reasonForUse, true) - && compareDeep(note, o.note, true) && compareDeep(supportingInformation, o.supportingInformation, true) - && compareDeep(dosage, o.dosage, true); + && compareDeep(supportingInformation, o.supportingInformation, true) && compareDeep(dateAsserted, o.dateAsserted, true) + && compareDeep(wasNotTaken, o.wasNotTaken, true) && compareDeep(reasonNotTaken, o.reasonNotTaken, true) + && compareDeep(reasonForUse, o.reasonForUse, true) && compareDeep(note, o.note, true) && compareDeep(dosage, o.dosage, true) + ; } @Override @@ -1599,13 +1596,9 @@ Specifically if 'boolean' datatype is selected, then the following logic applies } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) - && (medication == null || medication.isEmpty()) && (patient == null || patient.isEmpty()) - && (effective == null || effective.isEmpty()) && (informationSource == null || informationSource.isEmpty()) - && (dateAsserted == null || dateAsserted.isEmpty()) && (wasNotTaken == null || wasNotTaken.isEmpty()) - && (reasonNotTaken == null || reasonNotTaken.isEmpty()) && (reasonForUse == null || reasonForUse.isEmpty()) - && (note == null || note.isEmpty()) && (supportingInformation == null || supportingInformation.isEmpty()) - && (dosage == null || dosage.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, medication + , patient, effective, informationSource, supportingInformation, dateAsserted, wasNotTaken + , reasonNotTaken, reasonForUse, note, dosage); } @Override @@ -1681,7 +1674,7 @@ Specifically if 'boolean' datatype is selected, then the following logic applies * Path: MedicationStatement.patient
*

*/ - @SearchParamDefinition(name="patient", path="MedicationStatement.patient", description="The identity of a patient to list statements for", type="reference" ) + @SearchParamDefinition(name="patient", path="MedicationStatement.patient", description="The identity of a patient to list statements for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient @@ -1733,7 +1726,7 @@ Specifically if 'boolean' datatype is selected, then the following logic applies * Path: MedicationStatement.informationSource
*

*/ - @SearchParamDefinition(name="source", path="MedicationStatement.informationSource", description="Who the information in the statement came from", type="reference" ) + @SearchParamDefinition(name="source", path="MedicationStatement.informationSource", description="Who the information in the statement came from", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_SOURCE = "source"; /** * Fluent Client search parameter constant for source diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MessageHeader.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MessageHeader.java index df7d880cc3f..335bc7ae123 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MessageHeader.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/MessageHeader.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle. */ @@ -399,8 +397,7 @@ public class MessageHeader extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (code == null || code.isEmpty()) - && (details == null || details.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, code, details); } public String fhirType() { @@ -761,9 +758,8 @@ public class MessageHeader extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (software == null || software.isEmpty()) - && (version == null || version.isEmpty()) && (contact == null || contact.isEmpty()) && (endpoint == null || endpoint.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, software, version, contact + , endpoint); } public String fhirType() { @@ -1022,8 +1018,7 @@ public class MessageHeader extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (target == null || target.isEmpty()) - && (endpoint == null || endpoint.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, target, endpoint); } public String fhirType() { @@ -1698,11 +1693,8 @@ public class MessageHeader extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (timestamp == null || timestamp.isEmpty()) && (event == null || event.isEmpty()) - && (response == null || response.isEmpty()) && (source == null || source.isEmpty()) && (destination == null || destination.isEmpty()) - && (enterer == null || enterer.isEmpty()) && (author == null || author.isEmpty()) && (receiver == null || receiver.isEmpty()) - && (responsible == null || responsible.isEmpty()) && (reason == null || reason.isEmpty()) - && (data == null || data.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( timestamp, event, response, source + , destination, enterer, author, receiver, responsible, reason, data); } @Override @@ -1764,7 +1756,7 @@ public class MessageHeader extends DomainResource { * Path: MessageHeader.receiver
*

*/ - @SearchParamDefinition(name="receiver", path="MessageHeader.receiver", description="Intended \"real-world\" recipient for the data", type="reference" ) + @SearchParamDefinition(name="receiver", path="MessageHeader.receiver", description="Intended \"real-world\" recipient for the data", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_RECEIVER = "receiver"; /** * Fluent Client search parameter constant for receiver @@ -1790,7 +1782,7 @@ public class MessageHeader extends DomainResource { * Path: MessageHeader.author
*

*/ - @SearchParamDefinition(name="author", path="MessageHeader.author", description="The source of the decision", type="reference" ) + @SearchParamDefinition(name="author", path="MessageHeader.author", description="The source of the decision", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_AUTHOR = "author"; /** * Fluent Client search parameter constant for author @@ -1856,7 +1848,7 @@ public class MessageHeader extends DomainResource { * Path: MessageHeader.destination.target
*

*/ - @SearchParamDefinition(name="target", path="MessageHeader.destination.target", description="Particular delivery destination within the destination", type="reference" ) + @SearchParamDefinition(name="target", path="MessageHeader.destination.target", description="Particular delivery destination within the destination", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device") } ) public static final String SP_TARGET = "target"; /** * Fluent Client search parameter constant for target @@ -1922,7 +1914,7 @@ public class MessageHeader extends DomainResource { * Path: MessageHeader.responsible
*

*/ - @SearchParamDefinition(name="responsible", path="MessageHeader.responsible", description="Final responsibility for event", type="reference" ) + @SearchParamDefinition(name="responsible", path="MessageHeader.responsible", description="Final responsibility for event", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_RESPONSIBLE = "responsible"; /** * Fluent Client search parameter constant for responsible @@ -1968,7 +1960,7 @@ public class MessageHeader extends DomainResource { * Path: MessageHeader.enterer
*

*/ - @SearchParamDefinition(name="enterer", path="MessageHeader.enterer", description="The source of the data entry", type="reference" ) + @SearchParamDefinition(name="enterer", path="MessageHeader.enterer", description="The source of the data entry", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_ENTERER = "enterer"; /** * Fluent Client search parameter constant for enterer diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Meta.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Meta.java index 536dbab719a..08e3153362f 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Meta.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Meta.java @@ -29,20 +29,18 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource. */ @@ -476,9 +474,8 @@ public class Meta extends Type implements IBaseMetaType { } public boolean isEmpty() { - return super.isEmpty() && (versionId == null || versionId.isEmpty()) && (lastUpdated == null || lastUpdated.isEmpty()) - && (profile == null || profile.isEmpty()) && (security == null || security.isEmpty()) && (tag == null || tag.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( versionId, lastUpdated, profile + , security, tag); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ModuleDefinition.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ModuleDefinition.java index f64b5f7837e..7b2a5e315ec 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ModuleDefinition.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ModuleDefinition.java @@ -29,19 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * The ModuleDefinition resource defines the data requirements for a quality artifact. */ @@ -297,8 +297,7 @@ public class ModuleDefinition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (version == null || version.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, identifier, version); } public String fhirType() { @@ -617,8 +616,8 @@ public class ModuleDefinition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (version == null || version.isEmpty()) && (document == null || document.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, identifier, version, document + ); } public String fhirType() { @@ -874,8 +873,7 @@ public class ModuleDefinition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (version == null || version.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, identifier, version); } public String fhirType() { @@ -1203,9 +1201,8 @@ public class ModuleDefinition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (version == null || version.isEmpty()) && (codeSystem == null || codeSystem.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, identifier, version, codeSystem + ); } public String fhirType() { @@ -1585,9 +1582,8 @@ public class ModuleDefinition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (use == null || use.isEmpty()) - && (documentation == null || documentation.isEmpty()) && (type == null || type.isEmpty()) - && (profile == null || profile.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, use, documentation, type + , profile); } public String fhirType() { @@ -1971,9 +1967,8 @@ public class ModuleDefinition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (profile == null || profile.isEmpty()) - && (mustSupport == null || mustSupport.isEmpty()) && (codeFilter == null || codeFilter.isEmpty()) - && (dateFilter == null || dateFilter.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, profile, mustSupport, codeFilter + , dateFilter); } public String fhirType() { @@ -2227,8 +2222,8 @@ public class ModuleDefinition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (path == null || path.isEmpty()) && (valueSet == null || valueSet.isEmpty()) - && (codeableConcept == null || codeableConcept.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( path, valueSet, codeableConcept + ); } public String fhirType() { @@ -2423,8 +2418,7 @@ public class ModuleDefinition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (path == null || path.isEmpty()) && (value == null || value.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( path, value); } public String fhirType() { @@ -2966,10 +2960,8 @@ public class ModuleDefinition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) - && (model == null || model.isEmpty()) && (library == null || library.isEmpty()) && (codeSystem == null || codeSystem.isEmpty()) - && (valueSet == null || valueSet.isEmpty()) && (parameter == null || parameter.isEmpty()) - && (data == null || data.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, version, model, library + , codeSystem, valueSet, parameter, data); } @Override diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ModuleMetadata.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ModuleMetadata.java index 6912986c419..f89eb1fef6b 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ModuleMetadata.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ModuleMetadata.java @@ -29,24 +29,22 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; -import ca.uhn.fhir.model.api.annotation.ResourceDef; -import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** - * The ModuleMetadata resource defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information. + * The ModuleMetadata structure defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information. */ -@ResourceDef(name="ModuleMetadata", profile="http://hl7.org/fhir/Profile/ModuleMetadata") -public class ModuleMetadata extends DomainResource { +@DatatypeDef(name="ModuleMetadata") +public class ModuleMetadata extends Type implements ICompositeType { public enum ModuleMetadataType { /** @@ -188,10 +186,6 @@ public class ModuleMetadata extends DomainResource { * The module is in draft state */ DRAFT, - /** - * The module is in test state - */ - TEST, /** * The module is active */ @@ -209,8 +203,6 @@ public class ModuleMetadata extends DomainResource { return null; if ("draft".equals(codeString)) return DRAFT; - if ("test".equals(codeString)) - return TEST; if ("active".equals(codeString)) return ACTIVE; if ("inactive".equals(codeString)) @@ -220,7 +212,6 @@ public class ModuleMetadata extends DomainResource { public String toCode() { switch (this) { case DRAFT: return "draft"; - case TEST: return "test"; case ACTIVE: return "active"; case INACTIVE: return "inactive"; default: return "?"; @@ -229,7 +220,6 @@ public class ModuleMetadata extends DomainResource { public String getSystem() { switch (this) { case DRAFT: return "http://hl7.org/fhir/module-metadata-status"; - case TEST: return "http://hl7.org/fhir/module-metadata-status"; case ACTIVE: return "http://hl7.org/fhir/module-metadata-status"; case INACTIVE: return "http://hl7.org/fhir/module-metadata-status"; default: return "?"; @@ -238,7 +228,6 @@ public class ModuleMetadata extends DomainResource { public String getDefinition() { switch (this) { case DRAFT: return "The module is in draft state"; - case TEST: return "The module is in test state"; case ACTIVE: return "The module is active"; case INACTIVE: return "The module is inactive, either rejected before publication, or retired after publication"; default: return "?"; @@ -247,7 +236,6 @@ public class ModuleMetadata extends DomainResource { public String getDisplay() { switch (this) { case DRAFT: return "Draft"; - case TEST: return "Test"; case ACTIVE: return "Active"; case INACTIVE: return "Inactive"; default: return "?"; @@ -262,8 +250,6 @@ public class ModuleMetadata extends DomainResource { return null; if ("draft".equals(codeString)) return ModuleMetadataStatus.DRAFT; - if ("test".equals(codeString)) - return ModuleMetadataStatus.TEST; if ("active".equals(codeString)) return ModuleMetadataStatus.ACTIVE; if ("inactive".equals(codeString)) @@ -278,8 +264,6 @@ public class ModuleMetadata extends DomainResource { return null; if ("draft".equals(codeString)) return new Enumeration(this, ModuleMetadataStatus.DRAFT); - if ("test".equals(codeString)) - return new Enumeration(this, ModuleMetadataStatus.TEST); if ("active".equals(codeString)) return new Enumeration(this, ModuleMetadataStatus.ACTIVE); if ("inactive".equals(codeString)) @@ -289,8 +273,6 @@ public class ModuleMetadata extends DomainResource { public String toCode(ModuleMetadataStatus code) { if (code == ModuleMetadataStatus.DRAFT) return "draft"; - if (code == ModuleMetadataStatus.TEST) - return "test"; if (code == ModuleMetadataStatus.ACTIVE) return "active"; if (code == ModuleMetadataStatus.INACTIVE) @@ -302,173 +284,6 @@ public class ModuleMetadata extends DomainResource { } } - public enum ModuleMetadataFocusType { - /** - * The gender of the patient. For this item type, use HL7 administrative gender codes (OID: 2.16.840.1.113883.1.11.1) - */ - PATIENTGENDER, - /** - * A patient demographic category for which this artifact is applicable. Allows specification of age groups using coded values originating from the MeSH Code system (OID: 2.16.840.1.113883.6.177). More specifically, only codes from the AgeGroupObservationValue value set are valid for this field [2.16.840.1.113883.11.75] - */ - PATIENTAGEGROUP, - /** - * The clinical concept(s) addressed by the artifact. For example, disease, diagnostic test interpretation, medication ordering. Please refer to the implementation guide on which code system and codes to use - */ - CLINICALFOCUS, - /** - * The user types to which an artifact is targeted. For example, PCP, Patient, Cardiologist, Behavioral Professional, Oral Health Professional, Prescriber, etc... taken from the NUCC Health Care provider taxonomyCode system (OID: 2.16.840.1.113883.6.101) - */ - TARGETUSER, - /** - * The settings in which the artifact is intended for use. For example, admission, pre-op, etc - */ - WORKFLOWSETTING, - /** - * The context for the clinical task(s) represented by this artifact. Can be any task context represented by the HL7 ActTaskCode value set (OID: 2.16.840.1.113883.1.11.19846). General categories include: order entry, patient documentation and patient information review - */ - WORKFLOWTASK, - /** - * The venue in which an artifact could be used. For example, Outpatient, Inpatient, Home, Nursing home. The code value may originate from either the HL7 ActEncounter (OID: 2.16.840.1.113883.1.11.13955) or NUCC non-individual provider codes OID: 2.16.840.1.113883.1.11.19465 - */ - CLINICALVENUE, - /** - * added to help the parsers - */ - NULL; - public static ModuleMetadataFocusType fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("patient-gender".equals(codeString)) - return PATIENTGENDER; - if ("patient-age-group".equals(codeString)) - return PATIENTAGEGROUP; - if ("clinical-focus".equals(codeString)) - return CLINICALFOCUS; - if ("target-user".equals(codeString)) - return TARGETUSER; - if ("workflow-setting".equals(codeString)) - return WORKFLOWSETTING; - if ("workflow-task".equals(codeString)) - return WORKFLOWTASK; - if ("clinical-venue".equals(codeString)) - return CLINICALVENUE; - throw new FHIRException("Unknown ModuleMetadataFocusType code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case PATIENTGENDER: return "patient-gender"; - case PATIENTAGEGROUP: return "patient-age-group"; - case CLINICALFOCUS: return "clinical-focus"; - case TARGETUSER: return "target-user"; - case WORKFLOWSETTING: return "workflow-setting"; - case WORKFLOWTASK: return "workflow-task"; - case CLINICALVENUE: return "clinical-venue"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case PATIENTGENDER: return "http://hl7.org/fhir/module-metadata-focus-type"; - case PATIENTAGEGROUP: return "http://hl7.org/fhir/module-metadata-focus-type"; - case CLINICALFOCUS: return "http://hl7.org/fhir/module-metadata-focus-type"; - case TARGETUSER: return "http://hl7.org/fhir/module-metadata-focus-type"; - case WORKFLOWSETTING: return "http://hl7.org/fhir/module-metadata-focus-type"; - case WORKFLOWTASK: return "http://hl7.org/fhir/module-metadata-focus-type"; - case CLINICALVENUE: return "http://hl7.org/fhir/module-metadata-focus-type"; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case PATIENTGENDER: return "The gender of the patient. For this item type, use HL7 administrative gender codes (OID: 2.16.840.1.113883.1.11.1)"; - case PATIENTAGEGROUP: return "A patient demographic category for which this artifact is applicable. Allows specification of age groups using coded values originating from the MeSH Code system (OID: 2.16.840.1.113883.6.177). More specifically, only codes from the AgeGroupObservationValue value set are valid for this field [2.16.840.1.113883.11.75]"; - case CLINICALFOCUS: return "The clinical concept(s) addressed by the artifact. For example, disease, diagnostic test interpretation, medication ordering. Please refer to the implementation guide on which code system and codes to use"; - case TARGETUSER: return "The user types to which an artifact is targeted. For example, PCP, Patient, Cardiologist, Behavioral Professional, Oral Health Professional, Prescriber, etc... taken from the NUCC Health Care provider taxonomyCode system (OID: 2.16.840.1.113883.6.101)"; - case WORKFLOWSETTING: return "The settings in which the artifact is intended for use. For example, admission, pre-op, etc"; - case WORKFLOWTASK: return "The context for the clinical task(s) represented by this artifact. Can be any task context represented by the HL7 ActTaskCode value set (OID: 2.16.840.1.113883.1.11.19846). General categories include: order entry, patient documentation and patient information review"; - case CLINICALVENUE: return "The venue in which an artifact could be used. For example, Outpatient, Inpatient, Home, Nursing home. The code value may originate from either the HL7 ActEncounter (OID: 2.16.840.1.113883.1.11.13955) or NUCC non-individual provider codes OID: 2.16.840.1.113883.1.11.19465"; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case PATIENTGENDER: return "Patient Gender"; - case PATIENTAGEGROUP: return "Patient Age Group"; - case CLINICALFOCUS: return "Clinical Focus"; - case TARGETUSER: return "Target User"; - case WORKFLOWSETTING: return "Workflow Setting"; - case WORKFLOWTASK: return "Workflow Task"; - case CLINICALVENUE: return "Clinical Venue"; - default: return "?"; - } - } - } - - public static class ModuleMetadataFocusTypeEnumFactory implements EnumFactory { - public ModuleMetadataFocusType fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("patient-gender".equals(codeString)) - return ModuleMetadataFocusType.PATIENTGENDER; - if ("patient-age-group".equals(codeString)) - return ModuleMetadataFocusType.PATIENTAGEGROUP; - if ("clinical-focus".equals(codeString)) - return ModuleMetadataFocusType.CLINICALFOCUS; - if ("target-user".equals(codeString)) - return ModuleMetadataFocusType.TARGETUSER; - if ("workflow-setting".equals(codeString)) - return ModuleMetadataFocusType.WORKFLOWSETTING; - if ("workflow-task".equals(codeString)) - return ModuleMetadataFocusType.WORKFLOWTASK; - if ("clinical-venue".equals(codeString)) - return ModuleMetadataFocusType.CLINICALVENUE; - throw new IllegalArgumentException("Unknown ModuleMetadataFocusType code '"+codeString+"'"); - } - public Enumeration fromType(Base code) throws FHIRException { - if (code == null || code.isEmpty()) - return null; - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return null; - if ("patient-gender".equals(codeString)) - return new Enumeration(this, ModuleMetadataFocusType.PATIENTGENDER); - if ("patient-age-group".equals(codeString)) - return new Enumeration(this, ModuleMetadataFocusType.PATIENTAGEGROUP); - if ("clinical-focus".equals(codeString)) - return new Enumeration(this, ModuleMetadataFocusType.CLINICALFOCUS); - if ("target-user".equals(codeString)) - return new Enumeration(this, ModuleMetadataFocusType.TARGETUSER); - if ("workflow-setting".equals(codeString)) - return new Enumeration(this, ModuleMetadataFocusType.WORKFLOWSETTING); - if ("workflow-task".equals(codeString)) - return new Enumeration(this, ModuleMetadataFocusType.WORKFLOWTASK); - if ("clinical-venue".equals(codeString)) - return new Enumeration(this, ModuleMetadataFocusType.CLINICALVENUE); - throw new FHIRException("Unknown ModuleMetadataFocusType code '"+codeString+"'"); - } - public String toCode(ModuleMetadataFocusType code) { - if (code == ModuleMetadataFocusType.PATIENTGENDER) - return "patient-gender"; - if (code == ModuleMetadataFocusType.PATIENTAGEGROUP) - return "patient-age-group"; - if (code == ModuleMetadataFocusType.CLINICALFOCUS) - return "clinical-focus"; - if (code == ModuleMetadataFocusType.TARGETUSER) - return "target-user"; - if (code == ModuleMetadataFocusType.WORKFLOWSETTING) - return "workflow-setting"; - if (code == ModuleMetadataFocusType.WORKFLOWTASK) - return "workflow-task"; - if (code == ModuleMetadataFocusType.CLINICALVENUE) - return "clinical-venue"; - return "?"; - } - public String toSystem(ModuleMetadataFocusType code) { - return code.getSystem(); - } - } - public enum ModuleMetadataContributorType { /** * An author of the content of the module @@ -590,15 +405,15 @@ public class ModuleMetadata extends DomainResource { public enum ModuleMetadataResourceType { /** - * Additional documentation for the module + * Additional documentation for the module. This would include additional instructions on usage as well additional information on clinical context or appropriateness */ DOCUMENTATION, /** - * Supporting evidence for the module + * A summary of the justification for the artifact including supporting evidence, relevant guidelines, or other clinically important information. This information is intended to provide a way to make the justification for the module available to the consumer of interventions or results produced by the artifact */ - EVIDENCE, + JUSTIFICATION, /** - * Bibliographic citation for the module + * Bibliographic citation for papers, references, or other relevant material for the module. This is intended to allow for citation of related material, but that was not necessarily specifically prepared in connection with this module */ CITATION, /** @@ -610,7 +425,7 @@ public class ModuleMetadata extends DomainResource { */ SUCCESSOR, /** - * The module is derived from the resource + * The module is derived from the resource. This is intended to capture the relationship when a particular module is based on the content of another module, but is modified to capture either a different set of overall requirements, or a more specific set of requirements such as those involved in a particular institution or clinical setting */ DERIVEDFROM, /** @@ -622,8 +437,8 @@ public class ModuleMetadata extends DomainResource { return null; if ("documentation".equals(codeString)) return DOCUMENTATION; - if ("evidence".equals(codeString)) - return EVIDENCE; + if ("justification".equals(codeString)) + return JUSTIFICATION; if ("citation".equals(codeString)) return CITATION; if ("predecessor".equals(codeString)) @@ -637,7 +452,7 @@ public class ModuleMetadata extends DomainResource { public String toCode() { switch (this) { case DOCUMENTATION: return "documentation"; - case EVIDENCE: return "evidence"; + case JUSTIFICATION: return "justification"; case CITATION: return "citation"; case PREDECESSOR: return "predecessor"; case SUCCESSOR: return "successor"; @@ -648,7 +463,7 @@ public class ModuleMetadata extends DomainResource { public String getSystem() { switch (this) { case DOCUMENTATION: return "http://hl7.org/fhir/module-metadata-resource-type"; - case EVIDENCE: return "http://hl7.org/fhir/module-metadata-resource-type"; + case JUSTIFICATION: return "http://hl7.org/fhir/module-metadata-resource-type"; case CITATION: return "http://hl7.org/fhir/module-metadata-resource-type"; case PREDECESSOR: return "http://hl7.org/fhir/module-metadata-resource-type"; case SUCCESSOR: return "http://hl7.org/fhir/module-metadata-resource-type"; @@ -658,19 +473,19 @@ public class ModuleMetadata extends DomainResource { } public String getDefinition() { switch (this) { - case DOCUMENTATION: return "Additional documentation for the module"; - case EVIDENCE: return "Supporting evidence for the module"; - case CITATION: return "Bibliographic citation for the module"; + case DOCUMENTATION: return "Additional documentation for the module. This would include additional instructions on usage as well additional information on clinical context or appropriateness"; + case JUSTIFICATION: return "A summary of the justification for the artifact including supporting evidence, relevant guidelines, or other clinically important information. This information is intended to provide a way to make the justification for the module available to the consumer of interventions or results produced by the artifact"; + case CITATION: return "Bibliographic citation for papers, references, or other relevant material for the module. This is intended to allow for citation of related material, but that was not necessarily specifically prepared in connection with this module"; case PREDECESSOR: return "The previous version of the module"; case SUCCESSOR: return "The next version of the module"; - case DERIVEDFROM: return "The module is derived from the resource"; + case DERIVEDFROM: return "The module is derived from the resource. This is intended to capture the relationship when a particular module is based on the content of another module, but is modified to capture either a different set of overall requirements, or a more specific set of requirements such as those involved in a particular institution or clinical setting"; default: return "?"; } } public String getDisplay() { switch (this) { case DOCUMENTATION: return "Documentation"; - case EVIDENCE: return "Evidence"; + case JUSTIFICATION: return "Justification"; case CITATION: return "Citation"; case PREDECESSOR: return "Predecessor"; case SUCCESSOR: return "Successor"; @@ -687,8 +502,8 @@ public class ModuleMetadata extends DomainResource { return null; if ("documentation".equals(codeString)) return ModuleMetadataResourceType.DOCUMENTATION; - if ("evidence".equals(codeString)) - return ModuleMetadataResourceType.EVIDENCE; + if ("justification".equals(codeString)) + return ModuleMetadataResourceType.JUSTIFICATION; if ("citation".equals(codeString)) return ModuleMetadataResourceType.CITATION; if ("predecessor".equals(codeString)) @@ -707,8 +522,8 @@ public class ModuleMetadata extends DomainResource { return null; if ("documentation".equals(codeString)) return new Enumeration(this, ModuleMetadataResourceType.DOCUMENTATION); - if ("evidence".equals(codeString)) - return new Enumeration(this, ModuleMetadataResourceType.EVIDENCE); + if ("justification".equals(codeString)) + return new Enumeration(this, ModuleMetadataResourceType.JUSTIFICATION); if ("citation".equals(codeString)) return new Enumeration(this, ModuleMetadataResourceType.CITATION); if ("predecessor".equals(codeString)) @@ -722,8 +537,8 @@ public class ModuleMetadata extends DomainResource { public String toCode(ModuleMetadataResourceType code) { if (code == ModuleMetadataResourceType.DOCUMENTATION) return "documentation"; - if (code == ModuleMetadataResourceType.EVIDENCE) - return "evidence"; + if (code == ModuleMetadataResourceType.JUSTIFICATION) + return "justification"; if (code == ModuleMetadataResourceType.CITATION) return "citation"; if (code == ModuleMetadataResourceType.PREDECESSOR) @@ -740,29 +555,22 @@ public class ModuleMetadata extends DomainResource { } @Block() - public static class ModuleMetadataCoverageComponent extends BackboneElement implements IBaseBackboneElement { + public static class ModuleMetadataCoverageComponent extends Element implements IBaseDatatypeElement { /** * Specifies the focus of the coverage attribute. */ - @Child(name = "focus", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="patient-gender | patient-age-group | clinical-focus | target-user | workflow-setting | workflow-task | clinical-venue", formalDefinition="Specifies the focus of the coverage attribute." ) - protected Enumeration focus; - - /** - * Provides an optional description of the coverage attribute. - */ - @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Provides an optional description of the coverage attribute." ) - protected StringType description; + @Child(name = "focus", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="patient-gender | patient-age-group | clinical-focus | target-user | workflow-setting | workflow-task | clinical-venue | jurisdiction", formalDefinition="Specifies the focus of the coverage attribute." ) + protected Coding focus; /** * Provides a value for the coverage attribute. Different values are appropriate in different focus areas, as specified in the description of values for focus. */ - @Child(name = "value", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Provides a value for the coverage attribute. Different values are appropriate in different focus areas, as specified in the description of values for focus." ) + @Child(name = "value", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Value of the coverage attribute", formalDefinition="Provides a value for the coverage attribute. Different values are appropriate in different focus areas, as specified in the description of values for focus." ) protected CodeableConcept value; - private static final long serialVersionUID = 701599845L; + private static final long serialVersionUID = 65126300L; /** * Constructor @@ -774,105 +582,36 @@ public class ModuleMetadata extends DomainResource { /** * Constructor */ - public ModuleMetadataCoverageComponent(Enumeration focus) { + public ModuleMetadataCoverageComponent(Coding focus, CodeableConcept value) { super(); this.focus = focus; + this.value = value; } /** - * @return {@link #focus} (Specifies the focus of the coverage attribute.). This is the underlying object with id, value and extensions. The accessor "getFocus" gives direct access to the value + * @return {@link #focus} (Specifies the focus of the coverage attribute.) */ - public Enumeration getFocusElement() { + public Coding getFocus() { if (this.focus == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ModuleMetadataCoverageComponent.focus"); else if (Configuration.doAutoCreate()) - this.focus = new Enumeration(new ModuleMetadataFocusTypeEnumFactory()); // bb + this.focus = new Coding(); // cc return this.focus; } - public boolean hasFocusElement() { - return this.focus != null && !this.focus.isEmpty(); - } - public boolean hasFocus() { return this.focus != null && !this.focus.isEmpty(); } /** - * @param value {@link #focus} (Specifies the focus of the coverage attribute.). This is the underlying object with id, value and extensions. The accessor "getFocus" gives direct access to the value + * @param value {@link #focus} (Specifies the focus of the coverage attribute.) */ - public ModuleMetadataCoverageComponent setFocusElement(Enumeration value) { + public ModuleMetadataCoverageComponent setFocus(Coding value) { this.focus = value; return this; } - /** - * @return Specifies the focus of the coverage attribute. - */ - public ModuleMetadataFocusType getFocus() { - return this.focus == null ? null : this.focus.getValue(); - } - - /** - * @param value Specifies the focus of the coverage attribute. - */ - public ModuleMetadataCoverageComponent setFocus(ModuleMetadataFocusType value) { - if (this.focus == null) - this.focus = new Enumeration(new ModuleMetadataFocusTypeEnumFactory()); - this.focus.setValue(value); - return this; - } - - /** - * @return {@link #description} (Provides an optional description of the coverage attribute.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public StringType getDescriptionElement() { - if (this.description == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ModuleMetadataCoverageComponent.description"); - else if (Configuration.doAutoCreate()) - this.description = new StringType(); // bb - return this.description; - } - - public boolean hasDescriptionElement() { - return this.description != null && !this.description.isEmpty(); - } - - public boolean hasDescription() { - return this.description != null && !this.description.isEmpty(); - } - - /** - * @param value {@link #description} (Provides an optional description of the coverage attribute.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public ModuleMetadataCoverageComponent setDescriptionElement(StringType value) { - this.description = value; - return this; - } - - /** - * @return Provides an optional description of the coverage attribute. - */ - public String getDescription() { - return this.description == null ? null : this.description.getValue(); - } - - /** - * @param value Provides an optional description of the coverage attribute. - */ - public ModuleMetadataCoverageComponent setDescription(String value) { - if (Utilities.noString(value)) - this.description = null; - else { - if (this.description == null) - this.description = new StringType(); - this.description.setValue(value); - } - return this; - } - /** * @return {@link #value} (Provides a value for the coverage attribute. Different values are appropriate in different focus areas, as specified in the description of values for focus.) */ @@ -899,17 +638,14 @@ public class ModuleMetadata extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("focus", "code", "Specifies the focus of the coverage attribute.", 0, java.lang.Integer.MAX_VALUE, focus)); - childrenList.add(new Property("description", "string", "Provides an optional description of the coverage attribute.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("focus", "Coding", "Specifies the focus of the coverage attribute.", 0, java.lang.Integer.MAX_VALUE, focus)); childrenList.add(new Property("value", "CodeableConcept", "Provides a value for the coverage attribute. Different values are appropriate in different focus areas, as specified in the description of values for focus.", 0, java.lang.Integer.MAX_VALUE, value)); } @Override public void setProperty(String name, Base value) throws FHIRException { if (name.equals("focus")) - this.focus = new ModuleMetadataFocusTypeEnumFactory().fromType(value); // Enumeration - else if (name.equals("description")) - this.description = castToString(value); // StringType + this.focus = castToCoding(value); // Coding else if (name.equals("value")) this.value = castToCodeableConcept(value); // CodeableConcept else @@ -919,10 +655,8 @@ public class ModuleMetadata extends DomainResource { @Override public Base addChild(String name) throws FHIRException { if (name.equals("focus")) { - throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.focus"); - } - else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.description"); + this.focus = new Coding(); + return this.focus; } else if (name.equals("value")) { this.value = new CodeableConcept(); @@ -936,7 +670,6 @@ public class ModuleMetadata extends DomainResource { ModuleMetadataCoverageComponent dst = new ModuleMetadataCoverageComponent(); copyValues(dst); dst.focus = focus == null ? null : focus.copy(); - dst.description = description == null ? null : description.copy(); dst.value = value == null ? null : value.copy(); return dst; } @@ -948,8 +681,7 @@ public class ModuleMetadata extends DomainResource { if (!(other instanceof ModuleMetadataCoverageComponent)) return false; ModuleMetadataCoverageComponent o = (ModuleMetadataCoverageComponent) other; - return compareDeep(focus, o.focus, true) && compareDeep(description, o.description, true) && compareDeep(value, o.value, true) - ; + return compareDeep(focus, o.focus, true) && compareDeep(value, o.value, true); } @Override @@ -959,12 +691,11 @@ public class ModuleMetadata extends DomainResource { if (!(other instanceof ModuleMetadataCoverageComponent)) return false; ModuleMetadataCoverageComponent o = (ModuleMetadataCoverageComponent) other; - return compareValues(focus, o.focus, true) && compareValues(description, o.description, true); + return true; } public boolean isEmpty() { - return super.isEmpty() && (focus == null || focus.isEmpty()) && (description == null || description.isEmpty()) - && (value == null || value.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( focus, value); } public String fhirType() { @@ -975,7 +706,7 @@ public class ModuleMetadata extends DomainResource { } @Block() - public static class ModuleMetadataContributorComponent extends BackboneElement implements IBaseBackboneElement { + public static class ModuleMetadataContributorComponent extends Element implements IBaseDatatypeElement { /** * The type of contributor. */ @@ -984,18 +715,20 @@ public class ModuleMetadata extends DomainResource { protected Enumeration type; /** - * The contributor. + * The name of the individual or organization responsible for the contribution. */ - @Child(name = "party", type = {Person.class, Organization.class}, order=2, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The contributor." ) - protected Reference party; + @Child(name = "name", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Name of the contributor", formalDefinition="The name of the individual or organization responsible for the contribution." ) + protected StringType name; /** - * The actual object that is the target of the reference (The contributor.) + * Contacts to assist a user in finding and communicating with the contributor. */ - protected Resource partyTarget; + @Child(name = "contact", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contact details of the contributor", formalDefinition="Contacts to assist a user in finding and communicating with the contributor." ) + protected List contact; - private static final long serialVersionUID = -652221921L; + private static final long serialVersionUID = 1033333886L; /** * Constructor @@ -1007,10 +740,10 @@ public class ModuleMetadata extends DomainResource { /** * Constructor */ - public ModuleMetadataContributorComponent(Enumeration type, Reference party) { + public ModuleMetadataContributorComponent(Enumeration type, StringType name) { super(); this.type = type; - this.party = party; + this.name = name; } /** @@ -1059,56 +792,105 @@ public class ModuleMetadata extends DomainResource { } /** - * @return {@link #party} (The contributor.) + * @return {@link #name} (The name of the individual or organization responsible for the contribution.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ - public Reference getParty() { - if (this.party == null) + public StringType getNameElement() { + if (this.name == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ModuleMetadataContributorComponent.party"); + throw new Error("Attempt to auto-create ModuleMetadataContributorComponent.name"); else if (Configuration.doAutoCreate()) - this.party = new Reference(); // cc - return this.party; + this.name = new StringType(); // bb + return this.name; } - public boolean hasParty() { - return this.party != null && !this.party.isEmpty(); + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); } /** - * @param value {@link #party} (The contributor.) + * @param value {@link #name} (The name of the individual or organization responsible for the contribution.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ - public ModuleMetadataContributorComponent setParty(Reference value) { - this.party = value; + public ModuleMetadataContributorComponent setNameElement(StringType value) { + this.name = value; return this; } /** - * @return {@link #party} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The contributor.) + * @return The name of the individual or organization responsible for the contribution. */ - public Resource getPartyTarget() { - return this.partyTarget; + public String getName() { + return this.name == null ? null : this.name.getValue(); } /** - * @param value {@link #party} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The contributor.) + * @param value The name of the individual or organization responsible for the contribution. */ - public ModuleMetadataContributorComponent setPartyTarget(Resource value) { - this.partyTarget = value; + public ModuleMetadataContributorComponent setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the contributor.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (ModuleMetadataContributorContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the contributor.) + */ + // syntactic sugar + public ModuleMetadataContributorContactComponent addContact() { //3 + ModuleMetadataContributorContactComponent t = new ModuleMetadataContributorContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public ModuleMetadataContributorComponent addContact(ModuleMetadataContributorContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); return this; } protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("type", "code", "The type of contributor.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("party", "Reference(Person|Organization)", "The contributor.", 0, java.lang.Integer.MAX_VALUE, party)); + childrenList.add(new Property("name", "string", "The name of the individual or organization responsible for the contribution.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the contributor.", 0, java.lang.Integer.MAX_VALUE, contact)); } @Override public void setProperty(String name, Base value) throws FHIRException { if (name.equals("type")) this.type = new ModuleMetadataContributorTypeEnumFactory().fromType(value); // Enumeration - else if (name.equals("party")) - this.party = castToReference(value); // Reference + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("contact")) + this.getContact().add((ModuleMetadataContributorContactComponent) value); else super.setProperty(name, value); } @@ -1118,9 +900,11 @@ public class ModuleMetadata extends DomainResource { if (name.equals("type")) { throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.type"); } - else if (name.equals("party")) { - this.party = new Reference(); - return this.party; + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.name"); + } + else if (name.equals("contact")) { + return addContact(); } else return super.addChild(name); @@ -1130,7 +914,12 @@ public class ModuleMetadata extends DomainResource { ModuleMetadataContributorComponent dst = new ModuleMetadataContributorComponent(); copyValues(dst); dst.type = type == null ? null : type.copy(); - dst.party = party == null ? null : party.copy(); + dst.name = name == null ? null : name.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (ModuleMetadataContributorContactComponent i : contact) + dst.contact.add(i.copy()); + }; return dst; } @@ -1141,7 +930,8 @@ public class ModuleMetadata extends DomainResource { if (!(other instanceof ModuleMetadataContributorComponent)) return false; ModuleMetadataContributorComponent o = (ModuleMetadataContributorComponent) other; - return compareDeep(type, o.type, true) && compareDeep(party, o.party, true); + return compareDeep(type, o.type, true) && compareDeep(name, o.name, true) && compareDeep(contact, o.contact, true) + ; } @Override @@ -1151,12 +941,11 @@ public class ModuleMetadata extends DomainResource { if (!(other instanceof ModuleMetadataContributorComponent)) return false; ModuleMetadataContributorComponent o = (ModuleMetadataContributorComponent) other; - return compareValues(type, o.type, true); + return compareValues(type, o.type, true) && compareValues(name, o.name, true); } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (party == null || party.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, name, contact); } public String fhirType() { @@ -1167,36 +956,404 @@ public class ModuleMetadata extends DomainResource { } @Block() - public static class ModuleMetadataRelatedResourceComponent extends BackboneElement implements IBaseBackboneElement { + public static class ModuleMetadataContributorContactComponent extends Element implements IBaseDatatypeElement { + /** + * The name of an individual to contact regarding the contribution. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the contribution." ) + protected StringType name; + + /** + * Contact details for the individual (if a name was provided) or the contributor. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contact details for an individual or contributor", formalDefinition="Contact details for the individual (if a name was provided) or the contributor." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + /** + * Constructor + */ + public ModuleMetadataContributorContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the contribution.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadataContributorContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the contribution.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ModuleMetadataContributorContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the contribution. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the contribution. + */ + public ModuleMetadataContributorContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for the individual (if a name was provided) or the contributor.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for the individual (if a name was provided) or the contributor.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public ModuleMetadataContributorContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the contribution.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for the individual (if a name was provided) or the contributor.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.name"); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else + return super.addChild(name); + } + + public ModuleMetadataContributorContactComponent copy() { + ModuleMetadataContributorContactComponent dst = new ModuleMetadataContributorContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ModuleMetadataContributorContactComponent)) + return false; + ModuleMetadataContributorContactComponent o = (ModuleMetadataContributorContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ModuleMetadataContributorContactComponent)) + return false; + ModuleMetadataContributorContactComponent o = (ModuleMetadataContributorContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); + } + + public String fhirType() { + return "ModuleMetadata.contributor.contact"; + + } + + } + + @Block() + public static class ModuleMetadataContactComponent extends Element implements IBaseDatatypeElement { + /** + * The name of an individual to contact regarding the module. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the module." ) + protected StringType name; + + /** + * Contact details for the individual (if a name was provided) or the publisher. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contact details for an individual or publisher", formalDefinition="Contact details for the individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + /** + * Constructor + */ + public ModuleMetadataContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the module.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadataContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the module.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ModuleMetadataContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the module. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the module. + */ + public ModuleMetadataContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for the individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for the individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public ModuleMetadataContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the module.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for the individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.name"); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else + return super.addChild(name); + } + + public ModuleMetadataContactComponent copy() { + ModuleMetadataContactComponent dst = new ModuleMetadataContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ModuleMetadataContactComponent)) + return false; + ModuleMetadataContactComponent o = (ModuleMetadataContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ModuleMetadataContactComponent)) + return false; + ModuleMetadataContactComponent o = (ModuleMetadataContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); + } + + public String fhirType() { + return "ModuleMetadata.contact"; + + } + + } + + @Block() + public static class ModuleMetadataRelatedResourceComponent extends Element implements IBaseDatatypeElement { /** * The type of related resource. */ @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="documentation | evidence | citation | predecessor | successor | derived-from", formalDefinition="The type of related resource." ) + @Description(shortDefinition="documentation | justification | citation | predecessor | successor | derived-from", formalDefinition="The type of related resource." ) protected Enumeration type; /** - * The uri of the related resource. + * The document being referenced, represented as an attachment. This is exclusive with the resource element. */ - @Child(name = "uri", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The uri of the related resource." ) - protected UriType uri; - - /** - * A brief description of the related resource. - */ - @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="A brief description of the related resource." ) - protected StringType description; - - /** - * The document being referenced. - */ - @Child(name = "document", type = {Attachment.class}, order=4, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The document being referenced." ) + @Child(name = "document", type = {Attachment.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The related document", formalDefinition="The document being referenced, represented as an attachment. This is exclusive with the resource element." ) protected Attachment document; - private static final long serialVersionUID = -1094264249L; + /** + * The related resource, such as a library, value set, profile, or other module. + */ + @Child(name = "resource", type = {}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The related resource", formalDefinition="The related resource, such as a library, value set, profile, or other module." ) + protected Reference resource; + + /** + * The actual object that is the target of the reference (The related resource, such as a library, value set, profile, or other module.) + */ + protected Resource resourceTarget; + + private static final long serialVersionUID = -1400982664L; /** * Constructor @@ -1259,105 +1416,7 @@ public class ModuleMetadata extends DomainResource { } /** - * @return {@link #uri} (The uri of the related resource.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value - */ - public UriType getUriElement() { - if (this.uri == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ModuleMetadataRelatedResourceComponent.uri"); - else if (Configuration.doAutoCreate()) - this.uri = new UriType(); // bb - return this.uri; - } - - public boolean hasUriElement() { - return this.uri != null && !this.uri.isEmpty(); - } - - public boolean hasUri() { - return this.uri != null && !this.uri.isEmpty(); - } - - /** - * @param value {@link #uri} (The uri of the related resource.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value - */ - public ModuleMetadataRelatedResourceComponent setUriElement(UriType value) { - this.uri = value; - return this; - } - - /** - * @return The uri of the related resource. - */ - public String getUri() { - return this.uri == null ? null : this.uri.getValue(); - } - - /** - * @param value The uri of the related resource. - */ - public ModuleMetadataRelatedResourceComponent setUri(String value) { - if (Utilities.noString(value)) - this.uri = null; - else { - if (this.uri == null) - this.uri = new UriType(); - this.uri.setValue(value); - } - return this; - } - - /** - * @return {@link #description} (A brief description of the related resource.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public StringType getDescriptionElement() { - if (this.description == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ModuleMetadataRelatedResourceComponent.description"); - else if (Configuration.doAutoCreate()) - this.description = new StringType(); // bb - return this.description; - } - - public boolean hasDescriptionElement() { - return this.description != null && !this.description.isEmpty(); - } - - public boolean hasDescription() { - return this.description != null && !this.description.isEmpty(); - } - - /** - * @param value {@link #description} (A brief description of the related resource.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public ModuleMetadataRelatedResourceComponent setDescriptionElement(StringType value) { - this.description = value; - return this; - } - - /** - * @return A brief description of the related resource. - */ - public String getDescription() { - return this.description == null ? null : this.description.getValue(); - } - - /** - * @param value A brief description of the related resource. - */ - public ModuleMetadataRelatedResourceComponent setDescription(String value) { - if (Utilities.noString(value)) - this.description = null; - else { - if (this.description == null) - this.description = new StringType(); - this.description.setValue(value); - } - return this; - } - - /** - * @return {@link #document} (The document being referenced.) + * @return {@link #document} (The document being referenced, represented as an attachment. This is exclusive with the resource element.) */ public Attachment getDocument() { if (this.document == null) @@ -1373,31 +1432,67 @@ public class ModuleMetadata extends DomainResource { } /** - * @param value {@link #document} (The document being referenced.) + * @param value {@link #document} (The document being referenced, represented as an attachment. This is exclusive with the resource element.) */ public ModuleMetadataRelatedResourceComponent setDocument(Attachment value) { this.document = value; return this; } + /** + * @return {@link #resource} (The related resource, such as a library, value set, profile, or other module.) + */ + public Reference getResource() { + if (this.resource == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadataRelatedResourceComponent.resource"); + else if (Configuration.doAutoCreate()) + this.resource = new Reference(); // cc + return this.resource; + } + + public boolean hasResource() { + return this.resource != null && !this.resource.isEmpty(); + } + + /** + * @param value {@link #resource} (The related resource, such as a library, value set, profile, or other module.) + */ + public ModuleMetadataRelatedResourceComponent setResource(Reference value) { + this.resource = value; + return this; + } + + /** + * @return {@link #resource} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The related resource, such as a library, value set, profile, or other module.) + */ + public Resource getResourceTarget() { + return this.resourceTarget; + } + + /** + * @param value {@link #resource} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The related resource, such as a library, value set, profile, or other module.) + */ + public ModuleMetadataRelatedResourceComponent setResourceTarget(Resource value) { + this.resourceTarget = value; + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("type", "code", "The type of related resource.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("uri", "uri", "The uri of the related resource.", 0, java.lang.Integer.MAX_VALUE, uri)); - childrenList.add(new Property("description", "string", "A brief description of the related resource.", 0, java.lang.Integer.MAX_VALUE, description)); - childrenList.add(new Property("document", "Attachment", "The document being referenced.", 0, java.lang.Integer.MAX_VALUE, document)); + childrenList.add(new Property("document", "Attachment", "The document being referenced, represented as an attachment. This is exclusive with the resource element.", 0, java.lang.Integer.MAX_VALUE, document)); + childrenList.add(new Property("resource", "Reference(Any)", "The related resource, such as a library, value set, profile, or other module.", 0, java.lang.Integer.MAX_VALUE, resource)); } @Override public void setProperty(String name, Base value) throws FHIRException { if (name.equals("type")) this.type = new ModuleMetadataResourceTypeEnumFactory().fromType(value); // Enumeration - else if (name.equals("uri")) - this.uri = castToUri(value); // UriType - else if (name.equals("description")) - this.description = castToString(value); // StringType else if (name.equals("document")) this.document = castToAttachment(value); // Attachment + else if (name.equals("resource")) + this.resource = castToReference(value); // Reference else super.setProperty(name, value); } @@ -1407,16 +1502,14 @@ public class ModuleMetadata extends DomainResource { if (name.equals("type")) { throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.type"); } - else if (name.equals("uri")) { - throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.uri"); - } - else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.description"); - } else if (name.equals("document")) { this.document = new Attachment(); return this.document; } + else if (name.equals("resource")) { + this.resource = new Reference(); + return this.resource; + } else return super.addChild(name); } @@ -1425,9 +1518,8 @@ public class ModuleMetadata extends DomainResource { ModuleMetadataRelatedResourceComponent dst = new ModuleMetadataRelatedResourceComponent(); copyValues(dst); dst.type = type == null ? null : type.copy(); - dst.uri = uri == null ? null : uri.copy(); - dst.description = description == null ? null : description.copy(); dst.document = document == null ? null : document.copy(); + dst.resource = resource == null ? null : resource.copy(); return dst; } @@ -1438,8 +1530,8 @@ public class ModuleMetadata extends DomainResource { if (!(other instanceof ModuleMetadataRelatedResourceComponent)) return false; ModuleMetadataRelatedResourceComponent o = (ModuleMetadataRelatedResourceComponent) other; - return compareDeep(type, o.type, true) && compareDeep(uri, o.uri, true) && compareDeep(description, o.description, true) - && compareDeep(document, o.document, true); + return compareDeep(type, o.type, true) && compareDeep(document, o.document, true) && compareDeep(resource, o.resource, true) + ; } @Override @@ -1449,14 +1541,11 @@ public class ModuleMetadata extends DomainResource { if (!(other instanceof ModuleMetadataRelatedResourceComponent)) return false; ModuleMetadataRelatedResourceComponent o = (ModuleMetadataRelatedResourceComponent) other; - return compareValues(type, o.type, true) && compareValues(uri, o.uri, true) && compareValues(description, o.description, true) - ; + return compareValues(type, o.type, true); } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (uri == null || uri.isEmpty()) - && (description == null || description.isEmpty()) && (document == null || document.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, document, resource); } public String fhirType() { @@ -1466,150 +1555,154 @@ public class ModuleMetadata extends DomainResource { } + /** + * An absolute URL that is used to identify this module when it is referenced. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this module definition is (or will be) published. + */ + @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Logical URL to reference this module", formalDefinition="An absolute URL that is used to identify this module when it is referenced. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this module definition is (or will be) published." ) + protected UriType url; + /** * A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact. */ - @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Logical identifier", formalDefinition="A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact." ) + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Logical identifier(s) for the module", formalDefinition="A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact." ) protected List identifier; /** - * The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + * The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. Note that the version is required for non-experimental published artifact. */ - @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The version of the module, if any", formalDefinition="The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification." ) + @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The version of the module, if any", formalDefinition="The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. Note that the version is required for non-experimental published artifact." ) protected StringType version; /** - * A short, descriptive title for the module. + * A machine-friendly name for the module. This name should be usable as an identifier for the module by machine processing applications such as code generation. */ - @Child(name = "title", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="", formalDefinition="A short, descriptive title for the module." ) + @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="A machine-friendly name for the module", formalDefinition="A machine-friendly name for the module. This name should be usable as an identifier for the module by machine processing applications such as code generation." ) + protected StringType name; + + /** + * A short, descriptive, user-friendly title for the module. + */ + @Child(name = "title", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="A user-friendly title for the module", formalDefinition="A short, descriptive, user-friendly title for the module." ) protected StringType title; /** * Identifies the type of knowledge module, such as a rule, library, documentation template, or measure. */ - @Child(name = "type", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) + @Child(name = "type", type = {CodeType.class}, order=5, min=1, max=1, modifier=true, summary=true) @Description(shortDefinition="module | library | decision-support-rule | documentation-template | order-set", formalDefinition="Identifies the type of knowledge module, such as a rule, library, documentation template, or measure." ) protected Enumeration type; /** * The status of the module. */ - @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true) - @Description(shortDefinition="draft | test | active | inactive", formalDefinition="The status of the module." ) + @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="draft | active | inactive", formalDefinition="The status of the module." ) protected Enumeration status; /** - * A description of the module from the consumer perspective. + * Determines whether the module was developed for testing purposes (or education/evaluation/marketing), and is not intended to be used in production environments. */ - @Child(name = "description", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="A description of the module from the consumer perspective." ) + @Child(name = "experimental", type = {BooleanType.class}, order=7, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="Determines whether the module was developed for testing purposes (or education/evaluation/marketing), and is not intended to be used in production environments." ) + protected BooleanType experimental; + + /** + * A free text natural language description of the module from the consumer's perspective. + */ + @Child(name = "description", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Natural language description of the module", formalDefinition="A free text natural language description of the module from the consumer's perspective." ) protected StringType description; /** * A brief description of the purpose of the module. */ - @Child(name = "purpose", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="A brief description of the purpose of the module." ) + @Child(name = "purpose", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Describes the purpose of the module", formalDefinition="A brief description of the purpose of the module." ) protected StringType purpose; /** - * Notes about usage of the module. + * A detailed description of how the module is used from a clinical perspective. */ - @Child(name = "usage", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Notes about usage of the module." ) + @Child(name = "usage", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Describes the clinical usage of the module", formalDefinition="A detailed description of how the module is used from a clinical perspective." ) protected StringType usage; /** * The date on which the module was published. */ - @Child(name = "publicationDate", type = {DateType.class}, order=8, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The date on which the module was published." ) + @Child(name = "publicationDate", type = {DateType.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Publication date for this version of the module", formalDefinition="The date on which the module was published." ) protected DateType publicationDate; /** * The date on which the module content was last reviewed. */ - @Child(name = "lastReviewDate", type = {DateType.class}, order=9, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The date on which the module content was last reviewed." ) + @Child(name = "lastReviewDate", type = {DateType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Last review date for the module", formalDefinition="The date on which the module content was last reviewed." ) protected DateType lastReviewDate; /** * The period during which the module content is effective. */ - @Child(name = "effectivePeriod", type = {Period.class}, order=10, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The period during which the module content is effective." ) + @Child(name = "effectivePeriod", type = {Period.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The effective date range for the module", formalDefinition="The period during which the module content is effective." ) protected Period effectivePeriod; /** * Specifies various attributes of the patient population for whom and/or environment of care in which, the knowledge module is applicable. */ - @Child(name = "coverage", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Specifies various attributes of the patient population for whom and/or environment of care in which, the knowledge module is applicable." ) + @Child(name = "coverage", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Describes the context of use for this module", formalDefinition="Specifies various attributes of the patient population for whom and/or environment of care in which, the knowledge module is applicable." ) protected List coverage; /** * Clinical topics related to the content of the module. */ - @Child(name = "topic", type = {CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Clinical topics related to the content of the module." ) + @Child(name = "topic", type = {CodeableConcept.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Descriptional topics for the module", formalDefinition="Clinical topics related to the content of the module." ) protected List topic; /** - * Keywords associated with the module. + * A contributor to the content of the module, including authors, editors, reviewers, and endorsers. */ - @Child(name = "keyword", type = {StringType.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Keywords associated with the module." ) - protected List keyword; - - /** - * A contributor to the content of the module. - */ - @Child(name = "contributor", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="A contributor to the content of the module." ) + @Child(name = "contributor", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="A content contributor", formalDefinition="A contributor to the content of the module, including authors, editors, reviewers, and endorsers." ) protected List contributor; /** - * The organization responsible for publishing the module. + * The name of the individual or organization that published the module (also known as the steward for the module). This information is required for non-experimental published artifacts. */ - @Child(name = "publisher", type = {Organization.class}, order=15, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The organization responsible for publishing the module." ) - protected Reference publisher; + @Child(name = "publisher", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the module (also known as the steward for the module). This information is required for non-experimental published artifacts." ) + protected StringType publisher; /** - * The actual object that is the target of the reference (The organization responsible for publishing the module.) + * Contacts to assist a user in finding and communicating with the publisher. */ - protected Organization publisherTarget; + @Child(name = "contact", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; /** - * The organization responsible for stewardship of the module content. + * A copyright statement relating to the module and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the module. */ - @Child(name = "steward", type = {Organization.class}, order=16, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The organization responsible for stewardship of the module content." ) - protected Reference steward; + @Child(name = "copyright", type = {StringType.class}, order=19, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the module and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the module." ) + protected StringType copyright; /** - * The actual object that is the target of the reference (The organization responsible for stewardship of the module content.) + * Related resources such as additional documentation, justification, or bibliographic references. */ - protected Organization stewardTarget; - - /** - * The legal rights declaration for the module. - */ - @Child(name = "rightsDeclaration", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The legal rights declaration for the module." ) - protected StringType rightsDeclaration; - - /** - * Related resources such as additional documentation, supporting evidence, or bibliographic references. - */ - @Child(name = "relatedResource", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Related resources such as additional documentation, supporting evidence, or bibliographic references." ) + @Child(name = "relatedResource", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Related resources for the module", formalDefinition="Related resources such as additional documentation, justification, or bibliographic references." ) protected List relatedResource; - private static final long serialVersionUID = -1125568771L; + private static final long serialVersionUID = 1528493169L; /** * Constructor @@ -1627,6 +1720,55 @@ public class ModuleMetadata extends DomainResource { this.status = status; } + /** + * @return {@link #url} (An absolute URL that is used to identify this module when it is referenced. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this module definition is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An absolute URL that is used to identify this module when it is referenced. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this module definition is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public ModuleMetadata setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An absolute URL that is used to identify this module when it is referenced. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this module definition is (or will be) published. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An absolute URL that is used to identify this module when it is referenced. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this module definition is (or will be) published. + */ + public ModuleMetadata setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + } + return this; + } + /** * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) */ @@ -1668,7 +1810,7 @@ public class ModuleMetadata extends DomainResource { } /** - * @return {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + * @return {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. Note that the version is required for non-experimental published artifact.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value */ public StringType getVersionElement() { if (this.version == null) @@ -1688,7 +1830,7 @@ public class ModuleMetadata extends DomainResource { } /** - * @param value {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + * @param value {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. Note that the version is required for non-experimental published artifact.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value */ public ModuleMetadata setVersionElement(StringType value) { this.version = value; @@ -1696,14 +1838,14 @@ public class ModuleMetadata extends DomainResource { } /** - * @return The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + * @return The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. Note that the version is required for non-experimental published artifact. */ public String getVersion() { return this.version == null ? null : this.version.getValue(); } /** - * @param value The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. + * @param value The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. Note that the version is required for non-experimental published artifact. */ public ModuleMetadata setVersion(String value) { if (Utilities.noString(value)) @@ -1717,7 +1859,56 @@ public class ModuleMetadata extends DomainResource { } /** - * @return {@link #title} (A short, descriptive title for the module.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + * @return {@link #name} (A machine-friendly name for the module. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A machine-friendly name for the module. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ModuleMetadata setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A machine-friendly name for the module. This name should be usable as an identifier for the module by machine processing applications such as code generation. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A machine-friendly name for the module. This name should be usable as an identifier for the module by machine processing applications such as code generation. + */ + public ModuleMetadata setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #title} (A short, descriptive, user-friendly title for the module.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value */ public StringType getTitleElement() { if (this.title == null) @@ -1737,7 +1928,7 @@ public class ModuleMetadata extends DomainResource { } /** - * @param value {@link #title} (A short, descriptive title for the module.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value + * @param value {@link #title} (A short, descriptive, user-friendly title for the module.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value */ public ModuleMetadata setTitleElement(StringType value) { this.title = value; @@ -1745,14 +1936,14 @@ public class ModuleMetadata extends DomainResource { } /** - * @return A short, descriptive title for the module. + * @return A short, descriptive, user-friendly title for the module. */ public String getTitle() { return this.title == null ? null : this.title.getValue(); } /** - * @param value A short, descriptive title for the module. + * @param value A short, descriptive, user-friendly title for the module. */ public ModuleMetadata setTitle(String value) { if (Utilities.noString(value)) @@ -1856,7 +2047,52 @@ public class ModuleMetadata extends DomainResource { } /** - * @return {@link #description} (A description of the module from the consumer perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + * @return {@link #experimental} (Determines whether the module was developed for testing purposes (or education/evaluation/marketing), and is not intended to be used in production environments.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public BooleanType getExperimentalElement() { + if (this.experimental == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.experimental"); + else if (Configuration.doAutoCreate()) + this.experimental = new BooleanType(); // bb + return this.experimental; + } + + public boolean hasExperimentalElement() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + public boolean hasExperimental() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + /** + * @param value {@link #experimental} (Determines whether the module was developed for testing purposes (or education/evaluation/marketing), and is not intended to be used in production environments.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public ModuleMetadata setExperimentalElement(BooleanType value) { + this.experimental = value; + return this; + } + + /** + * @return Determines whether the module was developed for testing purposes (or education/evaluation/marketing), and is not intended to be used in production environments. + */ + public boolean getExperimental() { + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); + } + + /** + * @param value Determines whether the module was developed for testing purposes (or education/evaluation/marketing), and is not intended to be used in production environments. + */ + public ModuleMetadata setExperimental(boolean value) { + if (this.experimental == null) + this.experimental = new BooleanType(); + this.experimental.setValue(value); + return this; + } + + /** + * @return {@link #description} (A free text natural language description of the module from the consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value */ public StringType getDescriptionElement() { if (this.description == null) @@ -1876,7 +2112,7 @@ public class ModuleMetadata extends DomainResource { } /** - * @param value {@link #description} (A description of the module from the consumer perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + * @param value {@link #description} (A free text natural language description of the module from the consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value */ public ModuleMetadata setDescriptionElement(StringType value) { this.description = value; @@ -1884,14 +2120,14 @@ public class ModuleMetadata extends DomainResource { } /** - * @return A description of the module from the consumer perspective. + * @return A free text natural language description of the module from the consumer's perspective. */ public String getDescription() { return this.description == null ? null : this.description.getValue(); } /** - * @param value A description of the module from the consumer perspective. + * @param value A free text natural language description of the module from the consumer's perspective. */ public ModuleMetadata setDescription(String value) { if (Utilities.noString(value)) @@ -1954,7 +2190,7 @@ public class ModuleMetadata extends DomainResource { } /** - * @return {@link #usage} (Notes about usage of the module.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value + * @return {@link #usage} (A detailed description of how the module is used from a clinical perspective.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value */ public StringType getUsageElement() { if (this.usage == null) @@ -1974,7 +2210,7 @@ public class ModuleMetadata extends DomainResource { } /** - * @param value {@link #usage} (Notes about usage of the module.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value + * @param value {@link #usage} (A detailed description of how the module is used from a clinical perspective.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value */ public ModuleMetadata setUsageElement(StringType value) { this.usage = value; @@ -1982,14 +2218,14 @@ public class ModuleMetadata extends DomainResource { } /** - * @return Notes about usage of the module. + * @return A detailed description of how the module is used from a clinical perspective. */ public String getUsage() { return this.usage == null ? null : this.usage.getValue(); } /** - * @param value Notes about usage of the module. + * @param value A detailed description of how the module is used from a clinical perspective. */ public ModuleMetadata setUsage(String value) { if (Utilities.noString(value)) @@ -2205,61 +2441,7 @@ public class ModuleMetadata extends DomainResource { } /** - * @return {@link #keyword} (Keywords associated with the module.) - */ - public List getKeyword() { - if (this.keyword == null) - this.keyword = new ArrayList(); - return this.keyword; - } - - public boolean hasKeyword() { - if (this.keyword == null) - return false; - for (StringType item : this.keyword) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #keyword} (Keywords associated with the module.) - */ - // syntactic sugar - public StringType addKeywordElement() {//2 - StringType t = new StringType(); - if (this.keyword == null) - this.keyword = new ArrayList(); - this.keyword.add(t); - return t; - } - - /** - * @param value {@link #keyword} (Keywords associated with the module.) - */ - public ModuleMetadata addKeyword(String value) { //1 - StringType t = new StringType(); - t.setValue(value); - if (this.keyword == null) - this.keyword = new ArrayList(); - this.keyword.add(t); - return this; - } - - /** - * @param value {@link #keyword} (Keywords associated with the module.) - */ - public boolean hasKeyword(String value) { - if (this.keyword == null) - return false; - for (StringType v : this.keyword) - if (v.equals(value)) // string - return true; - return false; - } - - /** - * @return {@link #contributor} (A contributor to the content of the module.) + * @return {@link #contributor} (A contributor to the content of the module, including authors, editors, reviewers, and endorsers.) */ public List getContributor() { if (this.contributor == null) @@ -2277,7 +2459,7 @@ public class ModuleMetadata extends DomainResource { } /** - * @return {@link #contributor} (A contributor to the content of the module.) + * @return {@link #contributor} (A contributor to the content of the module, including authors, editors, reviewers, and endorsers.) */ // syntactic sugar public ModuleMetadataContributorComponent addContributor() { //3 @@ -2299,144 +2481,145 @@ public class ModuleMetadata extends DomainResource { } /** - * @return {@link #publisher} (The organization responsible for publishing the module.) + * @return {@link #publisher} (The name of the individual or organization that published the module (also known as the steward for the module). This information is required for non-experimental published artifacts.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value */ - public Reference getPublisher() { + public StringType getPublisherElement() { if (this.publisher == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ModuleMetadata.publisher"); else if (Configuration.doAutoCreate()) - this.publisher = new Reference(); // cc + this.publisher = new StringType(); // bb return this.publisher; } + public boolean hasPublisherElement() { + return this.publisher != null && !this.publisher.isEmpty(); + } + public boolean hasPublisher() { return this.publisher != null && !this.publisher.isEmpty(); } /** - * @param value {@link #publisher} (The organization responsible for publishing the module.) + * @param value {@link #publisher} (The name of the individual or organization that published the module (also known as the steward for the module). This information is required for non-experimental published artifacts.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value */ - public ModuleMetadata setPublisher(Reference value) { + public ModuleMetadata setPublisherElement(StringType value) { this.publisher = value; return this; } /** - * @return {@link #publisher} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization responsible for publishing the module.) + * @return The name of the individual or organization that published the module (also known as the steward for the module). This information is required for non-experimental published artifacts. */ - public Organization getPublisherTarget() { - if (this.publisherTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ModuleMetadata.publisher"); - else if (Configuration.doAutoCreate()) - this.publisherTarget = new Organization(); // aa - return this.publisherTarget; + public String getPublisher() { + return this.publisher == null ? null : this.publisher.getValue(); } /** - * @param value {@link #publisher} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization responsible for publishing the module.) + * @param value The name of the individual or organization that published the module (also known as the steward for the module). This information is required for non-experimental published artifacts. */ - public ModuleMetadata setPublisherTarget(Organization value) { - this.publisherTarget = value; - return this; - } - - /** - * @return {@link #steward} (The organization responsible for stewardship of the module content.) - */ - public Reference getSteward() { - if (this.steward == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ModuleMetadata.steward"); - else if (Configuration.doAutoCreate()) - this.steward = new Reference(); // cc - return this.steward; - } - - public boolean hasSteward() { - return this.steward != null && !this.steward.isEmpty(); - } - - /** - * @param value {@link #steward} (The organization responsible for stewardship of the module content.) - */ - public ModuleMetadata setSteward(Reference value) { - this.steward = value; - return this; - } - - /** - * @return {@link #steward} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization responsible for stewardship of the module content.) - */ - public Organization getStewardTarget() { - if (this.stewardTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ModuleMetadata.steward"); - else if (Configuration.doAutoCreate()) - this.stewardTarget = new Organization(); // aa - return this.stewardTarget; - } - - /** - * @param value {@link #steward} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization responsible for stewardship of the module content.) - */ - public ModuleMetadata setStewardTarget(Organization value) { - this.stewardTarget = value; - return this; - } - - /** - * @return {@link #rightsDeclaration} (The legal rights declaration for the module.). This is the underlying object with id, value and extensions. The accessor "getRightsDeclaration" gives direct access to the value - */ - public StringType getRightsDeclarationElement() { - if (this.rightsDeclaration == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ModuleMetadata.rightsDeclaration"); - else if (Configuration.doAutoCreate()) - this.rightsDeclaration = new StringType(); // bb - return this.rightsDeclaration; - } - - public boolean hasRightsDeclarationElement() { - return this.rightsDeclaration != null && !this.rightsDeclaration.isEmpty(); - } - - public boolean hasRightsDeclaration() { - return this.rightsDeclaration != null && !this.rightsDeclaration.isEmpty(); - } - - /** - * @param value {@link #rightsDeclaration} (The legal rights declaration for the module.). This is the underlying object with id, value and extensions. The accessor "getRightsDeclaration" gives direct access to the value - */ - public ModuleMetadata setRightsDeclarationElement(StringType value) { - this.rightsDeclaration = value; - return this; - } - - /** - * @return The legal rights declaration for the module. - */ - public String getRightsDeclaration() { - return this.rightsDeclaration == null ? null : this.rightsDeclaration.getValue(); - } - - /** - * @param value The legal rights declaration for the module. - */ - public ModuleMetadata setRightsDeclaration(String value) { + public ModuleMetadata setPublisher(String value) { if (Utilities.noString(value)) - this.rightsDeclaration = null; + this.publisher = null; else { - if (this.rightsDeclaration == null) - this.rightsDeclaration = new StringType(); - this.rightsDeclaration.setValue(value); + if (this.publisher == null) + this.publisher = new StringType(); + this.publisher.setValue(value); } return this; } /** - * @return {@link #relatedResource} (Related resources such as additional documentation, supporting evidence, or bibliographic references.) + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (ModuleMetadataContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + // syntactic sugar + public ModuleMetadataContactComponent addContact() { //3 + ModuleMetadataContactComponent t = new ModuleMetadataContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public ModuleMetadata addContact(ModuleMetadataContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return {@link #copyright} (A copyright statement relating to the module and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the module.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public StringType getCopyrightElement() { + if (this.copyright == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ModuleMetadata.copyright"); + else if (Configuration.doAutoCreate()) + this.copyright = new StringType(); // bb + return this.copyright; + } + + public boolean hasCopyrightElement() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + public boolean hasCopyright() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + /** + * @param value {@link #copyright} (A copyright statement relating to the module and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the module.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public ModuleMetadata setCopyrightElement(StringType value) { + this.copyright = value; + return this; + } + + /** + * @return A copyright statement relating to the module and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the module. + */ + public String getCopyright() { + return this.copyright == null ? null : this.copyright.getValue(); + } + + /** + * @param value A copyright statement relating to the module and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the module. + */ + public ModuleMetadata setCopyright(String value) { + if (Utilities.noString(value)) + this.copyright = null; + else { + if (this.copyright == null) + this.copyright = new StringType(); + this.copyright.setValue(value); + } + return this; + } + + /** + * @return {@link #relatedResource} (Related resources such as additional documentation, justification, or bibliographic references.) */ public List getRelatedResource() { if (this.relatedResource == null) @@ -2454,7 +2637,7 @@ public class ModuleMetadata extends DomainResource { } /** - * @return {@link #relatedResource} (Related resources such as additional documentation, supporting evidence, or bibliographic references.) + * @return {@link #relatedResource} (Related resources such as additional documentation, justification, or bibliographic references.) */ // syntactic sugar public ModuleMetadataRelatedResourceComponent addRelatedResource() { //3 @@ -2477,39 +2660,47 @@ public class ModuleMetadata extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); + childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this module when it is referenced. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this module definition is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); childrenList.add(new Property("identifier", "Identifier", "A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("version", "string", "The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.", 0, java.lang.Integer.MAX_VALUE, version)); - childrenList.add(new Property("title", "string", "A short, descriptive title for the module.", 0, java.lang.Integer.MAX_VALUE, title)); + childrenList.add(new Property("version", "string", "The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. Note that the version is required for non-experimental published artifact.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("name", "string", "A machine-friendly name for the module. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("title", "string", "A short, descriptive, user-friendly title for the module.", 0, java.lang.Integer.MAX_VALUE, title)); childrenList.add(new Property("type", "code", "Identifies the type of knowledge module, such as a rule, library, documentation template, or measure.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("status", "code", "The status of the module.", 0, java.lang.Integer.MAX_VALUE, status)); - childrenList.add(new Property("description", "string", "A description of the module from the consumer perspective.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("experimental", "boolean", "Determines whether the module was developed for testing purposes (or education/evaluation/marketing), and is not intended to be used in production environments.", 0, java.lang.Integer.MAX_VALUE, experimental)); + childrenList.add(new Property("description", "string", "A free text natural language description of the module from the consumer's perspective.", 0, java.lang.Integer.MAX_VALUE, description)); childrenList.add(new Property("purpose", "string", "A brief description of the purpose of the module.", 0, java.lang.Integer.MAX_VALUE, purpose)); - childrenList.add(new Property("usage", "string", "Notes about usage of the module.", 0, java.lang.Integer.MAX_VALUE, usage)); + childrenList.add(new Property("usage", "string", "A detailed description of how the module is used from a clinical perspective.", 0, java.lang.Integer.MAX_VALUE, usage)); childrenList.add(new Property("publicationDate", "date", "The date on which the module was published.", 0, java.lang.Integer.MAX_VALUE, publicationDate)); childrenList.add(new Property("lastReviewDate", "date", "The date on which the module content was last reviewed.", 0, java.lang.Integer.MAX_VALUE, lastReviewDate)); childrenList.add(new Property("effectivePeriod", "Period", "The period during which the module content is effective.", 0, java.lang.Integer.MAX_VALUE, effectivePeriod)); childrenList.add(new Property("coverage", "", "Specifies various attributes of the patient population for whom and/or environment of care in which, the knowledge module is applicable.", 0, java.lang.Integer.MAX_VALUE, coverage)); childrenList.add(new Property("topic", "CodeableConcept", "Clinical topics related to the content of the module.", 0, java.lang.Integer.MAX_VALUE, topic)); - childrenList.add(new Property("keyword", "string", "Keywords associated with the module.", 0, java.lang.Integer.MAX_VALUE, keyword)); - childrenList.add(new Property("contributor", "", "A contributor to the content of the module.", 0, java.lang.Integer.MAX_VALUE, contributor)); - childrenList.add(new Property("publisher", "Reference(Organization)", "The organization responsible for publishing the module.", 0, java.lang.Integer.MAX_VALUE, publisher)); - childrenList.add(new Property("steward", "Reference(Organization)", "The organization responsible for stewardship of the module content.", 0, java.lang.Integer.MAX_VALUE, steward)); - childrenList.add(new Property("rightsDeclaration", "string", "The legal rights declaration for the module.", 0, java.lang.Integer.MAX_VALUE, rightsDeclaration)); - childrenList.add(new Property("relatedResource", "", "Related resources such as additional documentation, supporting evidence, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedResource)); + childrenList.add(new Property("contributor", "", "A contributor to the content of the module, including authors, editors, reviewers, and endorsers.", 0, java.lang.Integer.MAX_VALUE, contributor)); + childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the module (also known as the steward for the module). This information is required for non-experimental published artifacts.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("copyright", "string", "A copyright statement relating to the module and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the module.", 0, java.lang.Integer.MAX_VALUE, copyright)); + childrenList.add(new Property("relatedResource", "", "Related resources such as additional documentation, justification, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedResource)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("identifier")) + if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); else if (name.equals("version")) this.version = castToString(value); // StringType + else if (name.equals("name")) + this.name = castToString(value); // StringType else if (name.equals("title")) this.title = castToString(value); // StringType else if (name.equals("type")) this.type = new ModuleMetadataTypeEnumFactory().fromType(value); // Enumeration else if (name.equals("status")) this.status = new ModuleMetadataStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("experimental")) + this.experimental = castToBoolean(value); // BooleanType else if (name.equals("description")) this.description = castToString(value); // StringType else if (name.equals("purpose")) @@ -2526,16 +2717,14 @@ public class ModuleMetadata extends DomainResource { this.getCoverage().add((ModuleMetadataCoverageComponent) value); else if (name.equals("topic")) this.getTopic().add(castToCodeableConcept(value)); - else if (name.equals("keyword")) - this.getKeyword().add(castToString(value)); else if (name.equals("contributor")) this.getContributor().add((ModuleMetadataContributorComponent) value); else if (name.equals("publisher")) - this.publisher = castToReference(value); // Reference - else if (name.equals("steward")) - this.steward = castToReference(value); // Reference - else if (name.equals("rightsDeclaration")) - this.rightsDeclaration = castToString(value); // StringType + this.publisher = castToString(value); // StringType + else if (name.equals("contact")) + this.getContact().add((ModuleMetadataContactComponent) value); + else if (name.equals("copyright")) + this.copyright = castToString(value); // StringType else if (name.equals("relatedResource")) this.getRelatedResource().add((ModuleMetadataRelatedResourceComponent) value); else @@ -2544,12 +2733,18 @@ public class ModuleMetadata extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("identifier")) { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.url"); + } + else if (name.equals("identifier")) { return addIdentifier(); } else if (name.equals("version")) { throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.version"); } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.name"); + } else if (name.equals("title")) { throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.title"); } @@ -2559,6 +2754,9 @@ public class ModuleMetadata extends DomainResource { else if (name.equals("status")) { throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.status"); } + else if (name.equals("experimental")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.experimental"); + } else if (name.equals("description")) { throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.description"); } @@ -2584,22 +2782,17 @@ public class ModuleMetadata extends DomainResource { else if (name.equals("topic")) { return addTopic(); } - else if (name.equals("keyword")) { - throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.keyword"); - } else if (name.equals("contributor")) { return addContributor(); } else if (name.equals("publisher")) { - this.publisher = new Reference(); - return this.publisher; + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.publisher"); } - else if (name.equals("steward")) { - this.steward = new Reference(); - return this.steward; + else if (name.equals("contact")) { + return addContact(); } - else if (name.equals("rightsDeclaration")) { - throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.rightsDeclaration"); + else if (name.equals("copyright")) { + throw new FHIRException("Cannot call addChild on a primitive type ModuleMetadata.copyright"); } else if (name.equals("relatedResource")) { return addRelatedResource(); @@ -2616,15 +2809,18 @@ public class ModuleMetadata extends DomainResource { public ModuleMetadata copy() { ModuleMetadata dst = new ModuleMetadata(); copyValues(dst); + dst.url = url == null ? null : url.copy(); if (identifier != null) { dst.identifier = new ArrayList(); for (Identifier i : identifier) dst.identifier.add(i.copy()); }; dst.version = version == null ? null : version.copy(); + dst.name = name == null ? null : name.copy(); dst.title = title == null ? null : title.copy(); dst.type = type == null ? null : type.copy(); dst.status = status == null ? null : status.copy(); + dst.experimental = experimental == null ? null : experimental.copy(); dst.description = description == null ? null : description.copy(); dst.purpose = purpose == null ? null : purpose.copy(); dst.usage = usage == null ? null : usage.copy(); @@ -2641,19 +2837,18 @@ public class ModuleMetadata extends DomainResource { for (CodeableConcept i : topic) dst.topic.add(i.copy()); }; - if (keyword != null) { - dst.keyword = new ArrayList(); - for (StringType i : keyword) - dst.keyword.add(i.copy()); - }; if (contributor != null) { dst.contributor = new ArrayList(); for (ModuleMetadataContributorComponent i : contributor) dst.contributor.add(i.copy()); }; dst.publisher = publisher == null ? null : publisher.copy(); - dst.steward = steward == null ? null : steward.copy(); - dst.rightsDeclaration = rightsDeclaration == null ? null : rightsDeclaration.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (ModuleMetadataContactComponent i : contact) + dst.contact.add(i.copy()); + }; + dst.copyright = copyright == null ? null : copyright.copy(); if (relatedResource != null) { dst.relatedResource = new ArrayList(); for (ModuleMetadataRelatedResourceComponent i : relatedResource) @@ -2673,14 +2868,14 @@ public class ModuleMetadata extends DomainResource { if (!(other instanceof ModuleMetadata)) return false; ModuleMetadata o = (ModuleMetadata) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(title, o.title, true) - && compareDeep(type, o.type, true) && compareDeep(status, o.status, true) && compareDeep(description, o.description, true) + return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) + && compareDeep(name, o.name, true) && compareDeep(title, o.title, true) && compareDeep(type, o.type, true) + && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) && compareDeep(description, o.description, true) && compareDeep(purpose, o.purpose, true) && compareDeep(usage, o.usage, true) && compareDeep(publicationDate, o.publicationDate, true) && compareDeep(lastReviewDate, o.lastReviewDate, true) && compareDeep(effectivePeriod, o.effectivePeriod, true) - && compareDeep(coverage, o.coverage, true) && compareDeep(topic, o.topic, true) && compareDeep(keyword, o.keyword, true) - && compareDeep(contributor, o.contributor, true) && compareDeep(publisher, o.publisher, true) && compareDeep(steward, o.steward, true) - && compareDeep(rightsDeclaration, o.rightsDeclaration, true) && compareDeep(relatedResource, o.relatedResource, true) - ; + && compareDeep(coverage, o.coverage, true) && compareDeep(topic, o.topic, true) && compareDeep(contributor, o.contributor, true) + && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(copyright, o.copyright, true) + && compareDeep(relatedResource, o.relatedResource, true); } @Override @@ -2690,170 +2885,21 @@ public class ModuleMetadata extends DomainResource { if (!(other instanceof ModuleMetadata)) return false; ModuleMetadata o = (ModuleMetadata) other; - return compareValues(version, o.version, true) && compareValues(title, o.title, true) && compareValues(type, o.type, true) - && compareValues(status, o.status, true) && compareValues(description, o.description, true) && compareValues(purpose, o.purpose, true) - && compareValues(usage, o.usage, true) && compareValues(publicationDate, o.publicationDate, true) && compareValues(lastReviewDate, o.lastReviewDate, true) - && compareValues(keyword, o.keyword, true) && compareValues(rightsDeclaration, o.rightsDeclaration, true) - ; + return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) + && compareValues(title, o.title, true) && compareValues(type, o.type, true) && compareValues(status, o.status, true) + && compareValues(experimental, o.experimental, true) && compareValues(description, o.description, true) + && compareValues(purpose, o.purpose, true) && compareValues(usage, o.usage, true) && compareValues(publicationDate, o.publicationDate, true) + && compareValues(lastReviewDate, o.lastReviewDate, true) && compareValues(publisher, o.publisher, true) + && compareValues(copyright, o.copyright, true); } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) - && (title == null || title.isEmpty()) && (type == null || type.isEmpty()) && (status == null || status.isEmpty()) - && (description == null || description.isEmpty()) && (purpose == null || purpose.isEmpty()) - && (usage == null || usage.isEmpty()) && (publicationDate == null || publicationDate.isEmpty()) - && (lastReviewDate == null || lastReviewDate.isEmpty()) && (effectivePeriod == null || effectivePeriod.isEmpty()) - && (coverage == null || coverage.isEmpty()) && (topic == null || topic.isEmpty()) && (keyword == null || keyword.isEmpty()) - && (contributor == null || contributor.isEmpty()) && (publisher == null || publisher.isEmpty()) - && (steward == null || steward.isEmpty()) && (rightsDeclaration == null || rightsDeclaration.isEmpty()) - && (relatedResource == null || relatedResource.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, identifier, version, name + , title, type, status, experimental, description, purpose, usage, publicationDate, lastReviewDate + , effectivePeriod, coverage, topic, contributor, publisher, contact, copyright, relatedResource + ); } - @Override - public ResourceType getResourceType() { - return ResourceType.ModuleMetadata; - } - - /** - * Search parameter: identifier - *

- * Description: Logical identifier for the module (e.g. CMS-143)
- * Type: token
- * Path: ModuleMetadata.identifier
- *

- */ - @SearchParamDefinition(name="identifier", path="ModuleMetadata.identifier", description="Logical identifier for the module (e.g. CMS-143)", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - /** - * Fluent Client search parameter constant for identifier - *

- * Description: Logical identifier for the module (e.g. CMS-143)
- * Type: token
- * Path: ModuleMetadata.identifier
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); - - /** - * Search parameter: topic - *

- * Description: Topics associated with the module
- * Type: token
- * Path: ModuleMetadata.topic
- *

- */ - @SearchParamDefinition(name="topic", path="ModuleMetadata.topic", description="Topics associated with the module", type="token" ) - public static final String SP_TOPIC = "topic"; - /** - * Fluent Client search parameter constant for topic - *

- * Description: Topics associated with the module
- * Type: token
- * Path: ModuleMetadata.topic
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TOPIC); - - /** - * Search parameter: description - *

- * Description: Text search against the description
- * Type: string
- * Path: ModuleMetadata.description
- *

- */ - @SearchParamDefinition(name="description", path="ModuleMetadata.description", description="Text search against the description", type="string" ) - public static final String SP_DESCRIPTION = "description"; - /** - * Fluent Client search parameter constant for description - *

- * Description: Text search against the description
- * Type: string
- * Path: ModuleMetadata.description
- *

- */ - public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); - - /** - * Search parameter: keyword - *

- * Description: Keywords associated with the module
- * Type: string
- * Path: ModuleMetadata.keyword
- *

- */ - @SearchParamDefinition(name="keyword", path="ModuleMetadata.keyword", description="Keywords associated with the module", type="string" ) - public static final String SP_KEYWORD = "keyword"; - /** - * Fluent Client search parameter constant for keyword - *

- * Description: Keywords associated with the module
- * Type: string
- * Path: ModuleMetadata.keyword
- *

- */ - public static final ca.uhn.fhir.rest.gclient.StringClientParam KEYWORD = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_KEYWORD); - - /** - * Search parameter: title - *

- * Description: Text search against the title
- * Type: string
- * Path: ModuleMetadata.title
- *

- */ - @SearchParamDefinition(name="title", path="ModuleMetadata.title", description="Text search against the title", type="string" ) - public static final String SP_TITLE = "title"; - /** - * Fluent Client search parameter constant for title - *

- * Description: Text search against the title
- * Type: string
- * Path: ModuleMetadata.title
- *

- */ - public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); - - /** - * Search parameter: version - *

- * Description: Version of the module (e.g. 1.0.0)
- * Type: string
- * Path: ModuleMetadata.version
- *

- */ - @SearchParamDefinition(name="version", path="ModuleMetadata.version", description="Version of the module (e.g. 1.0.0)", type="string" ) - public static final String SP_VERSION = "version"; - /** - * Fluent Client search parameter constant for version - *

- * Description: Version of the module (e.g. 1.0.0)
- * Type: string
- * Path: ModuleMetadata.version
- *

- */ - public static final ca.uhn.fhir.rest.gclient.StringClientParam VERSION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_VERSION); - - /** - * Search parameter: status - *

- * Description: Status of the module
- * Type: token
- * Path: ModuleMetadata.status
- *

- */ - @SearchParamDefinition(name="status", path="ModuleMetadata.status", description="Status of the module", type="token" ) - public static final String SP_STATUS = "status"; - /** - * Fluent Client search parameter constant for status - *

- * Description: Status of the module
- * Type: token
- * Path: ModuleMetadata.status
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); - } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Money.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Money.java index 87a4e487749..626bd4ac67e 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Money.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Money.java @@ -29,13 +29,12 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. */ @@ -82,9 +81,8 @@ public class Money extends Quantity { } public boolean isEmpty() { - return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty()) - && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value, comparator, unit, system + , code); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/NamingSystem.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/NamingSystem.java index 16e93649f75..ebb7d822cac 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/NamingSystem.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/NamingSystem.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a "System" used within the Identifier and Coding data types. */ @@ -278,7 +276,7 @@ public class NamingSystem extends DomainResource { * The name of an individual to contact regarding the naming system. */ @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the naming system." ) + @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the naming system." ) protected StringType name; /** @@ -447,8 +445,7 @@ public class NamingSystem extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); } public String fhirType() { @@ -739,8 +736,8 @@ public class NamingSystem extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (value == null || value.isEmpty()) - && (preferred == null || preferred.isEmpty()) && (period == null || period.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, value, preferred, period + ); } public String fhirType() { @@ -771,34 +768,34 @@ public class NamingSystem extends DomainResource { @Description(shortDefinition="codesystem | identifier | root", formalDefinition="Indicates the purpose for the naming system - what kinds of things does it make unique?" ) protected Enumeration kind; + /** + * The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes. + */ + @Child(name = "date", type = {DateTimeType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Publication Date(/time)", formalDefinition="The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes." ) + protected DateTimeType date; + /** * The name of the individual or organization that published the naming system. */ - @Child(name = "publisher", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "publisher", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the naming system." ) protected StringType publisher; /** * Contacts to assist a user in finding and communicating with the publisher. */ - @Child(name = "contact", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "contact", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) protected List contact; /** * The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision. */ - @Child(name = "responsible", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) + @Child(name = "responsible", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Who maintains system namespace?", formalDefinition="The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision." ) protected StringType responsible; - /** - * The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes. - */ - @Child(name = "date", type = {DateTimeType.class}, order=6, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="Publication Date(/time)", formalDefinition="The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes." ) - protected DateTimeType date; - /** * Categorizes a naming system for easier search by grouping related naming systems. */ @@ -846,7 +843,7 @@ public class NamingSystem extends DomainResource { */ protected NamingSystem replacedByTarget; - private static final long serialVersionUID = -1337110053L; + private static final long serialVersionUID = -1633030631L; /** * Constructor @@ -1001,6 +998,51 @@ public class NamingSystem extends DomainResource { return this; } + /** + * @return {@link #date} (The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NamingSystem.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public NamingSystem setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes. + */ + public NamingSystem setDate(Date value) { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + return this; + } + /** * @return {@link #publisher} (The name of the individual or organization that published the naming system.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value */ @@ -1139,51 +1181,6 @@ public class NamingSystem extends DomainResource { return this; } - /** - * @return {@link #date} (The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value - */ - public DateTimeType getDateElement() { - if (this.date == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create NamingSystem.date"); - else if (Configuration.doAutoCreate()) - this.date = new DateTimeType(); // bb - return this.date; - } - - public boolean hasDateElement() { - return this.date != null && !this.date.isEmpty(); - } - - public boolean hasDate() { - return this.date != null && !this.date.isEmpty(); - } - - /** - * @param value {@link #date} (The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value - */ - public NamingSystem setDateElement(DateTimeType value) { - this.date = value; - return this; - } - - /** - * @return The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes. - */ - public Date getDate() { - return this.date == null ? null : this.date.getValue(); - } - - /** - * @param value The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes. - */ - public NamingSystem setDate(Date value) { - if (this.date == null) - this.date = new DateTimeType(); - this.date.setValue(value); - return this; - } - /** * @return {@link #type} (Categorizes a naming system for easier search by grouping related naming systems.) */ @@ -1435,10 +1432,10 @@ public class NamingSystem extends DomainResource { childrenList.add(new Property("name", "string", "The descriptive name of this particular identifier type or code system.", 0, java.lang.Integer.MAX_VALUE, name)); childrenList.add(new Property("status", "code", "Indicates whether the naming system is \"ready for use\" or not.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("kind", "code", "Indicates the purpose for the naming system - what kinds of things does it make unique?", 0, java.lang.Integer.MAX_VALUE, kind)); + childrenList.add(new Property("date", "dateTime", "The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.", 0, java.lang.Integer.MAX_VALUE, date)); childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the naming system.", 0, java.lang.Integer.MAX_VALUE, publisher)); childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); childrenList.add(new Property("responsible", "string", "The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.", 0, java.lang.Integer.MAX_VALUE, responsible)); - childrenList.add(new Property("date", "dateTime", "The date (and optionally time) when the system was registered or published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the registration changes.", 0, java.lang.Integer.MAX_VALUE, date)); childrenList.add(new Property("type", "CodeableConcept", "Categorizes a naming system for easier search by grouping related naming systems.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("description", "string", "Details about what the namespace identifies including scope, granularity, version labeling, etc.", 0, java.lang.Integer.MAX_VALUE, description)); childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of naming systems.", 0, java.lang.Integer.MAX_VALUE, useContext)); @@ -1455,14 +1452,14 @@ public class NamingSystem extends DomainResource { this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration else if (name.equals("kind")) this.kind = new NamingSystemTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType else if (name.equals("publisher")) this.publisher = castToString(value); // StringType else if (name.equals("contact")) this.getContact().add((NamingSystemContactComponent) value); else if (name.equals("responsible")) this.responsible = castToString(value); // StringType - else if (name.equals("date")) - this.date = castToDateTime(value); // DateTimeType else if (name.equals("type")) this.type = castToCodeableConcept(value); // CodeableConcept else if (name.equals("description")) @@ -1490,6 +1487,9 @@ public class NamingSystem extends DomainResource { else if (name.equals("kind")) { throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.kind"); } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.date"); + } else if (name.equals("publisher")) { throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.publisher"); } @@ -1499,9 +1499,6 @@ public class NamingSystem extends DomainResource { else if (name.equals("responsible")) { throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.responsible"); } - else if (name.equals("date")) { - throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.date"); - } else if (name.equals("type")) { this.type = new CodeableConcept(); return this.type; @@ -1537,6 +1534,7 @@ public class NamingSystem extends DomainResource { dst.name = name == null ? null : name.copy(); dst.status = status == null ? null : status.copy(); dst.kind = kind == null ? null : kind.copy(); + dst.date = date == null ? null : date.copy(); dst.publisher = publisher == null ? null : publisher.copy(); if (contact != null) { dst.contact = new ArrayList(); @@ -1544,7 +1542,6 @@ public class NamingSystem extends DomainResource { dst.contact.add(i.copy()); }; dst.responsible = responsible == null ? null : responsible.copy(); - dst.date = date == null ? null : date.copy(); dst.type = type == null ? null : type.copy(); dst.description = description == null ? null : description.copy(); if (useContext != null) { @@ -1574,8 +1571,8 @@ public class NamingSystem extends DomainResource { return false; NamingSystem o = (NamingSystem) other; return compareDeep(name, o.name, true) && compareDeep(status, o.status, true) && compareDeep(kind, o.kind, true) - && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(responsible, o.responsible, true) - && compareDeep(date, o.date, true) && compareDeep(type, o.type, true) && compareDeep(description, o.description, true) + && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) + && compareDeep(responsible, o.responsible, true) && compareDeep(type, o.type, true) && compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true) && compareDeep(usage, o.usage, true) && compareDeep(uniqueId, o.uniqueId, true) && compareDeep(replacedBy, o.replacedBy, true); } @@ -1588,17 +1585,13 @@ public class NamingSystem extends DomainResource { return false; NamingSystem o = (NamingSystem) other; return compareValues(name, o.name, true) && compareValues(status, o.status, true) && compareValues(kind, o.kind, true) - && compareValues(publisher, o.publisher, true) && compareValues(responsible, o.responsible, true) && compareValues(date, o.date, true) + && compareValues(date, o.date, true) && compareValues(publisher, o.publisher, true) && compareValues(responsible, o.responsible, true) && compareValues(description, o.description, true) && compareValues(usage, o.usage, true); } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) - && (kind == null || kind.isEmpty()) && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) - && (responsible == null || responsible.isEmpty()) && (date == null || date.isEmpty()) && (type == null || type.isEmpty()) - && (description == null || description.isEmpty()) && (useContext == null || useContext.isEmpty()) - && (usage == null || usage.isEmpty()) && (uniqueId == null || uniqueId.isEmpty()) && (replacedBy == null || replacedBy.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, status, kind, date, publisher + , contact, responsible, type, description, useContext, usage, uniqueId, replacedBy); } @Override @@ -1729,17 +1722,17 @@ public class NamingSystem extends DomainResource { /** * Search parameter: contact *

- * Description: Name of a individual to contact
+ * Description: Name of an individual to contact
* Type: string
* Path: NamingSystem.contact.name
*

*/ - @SearchParamDefinition(name="contact", path="NamingSystem.contact.name", description="Name of a individual to contact", type="string" ) + @SearchParamDefinition(name="contact", path="NamingSystem.contact.name", description="Name of an individual to contact", type="string" ) public static final String SP_CONTACT = "contact"; /** * Fluent Client search parameter constant for contact *

- * Description: Name of a individual to contact
+ * Description: Name of an individual to contact
* Type: string
* Path: NamingSystem.contact.name
*

diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Narrative.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Narrative.java index 4b429cb043f..e707248a363 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Narrative.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Narrative.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.xhtml.XhtmlNode; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A human-readable formatted text, including images. */ @@ -328,8 +327,7 @@ public class Narrative extends BaseNarrative implements INarrative { } public boolean isEmpty() { - return super.isEmpty() && (status == null || status.isEmpty()) && (div == null || div.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( status, div); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/NutritionOrder.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/NutritionOrder.java index 8b946da5c08..49a44af4b23 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/NutritionOrder.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/NutritionOrder.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident. */ @@ -656,9 +655,8 @@ public class NutritionOrder extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (schedule == null || schedule.isEmpty()) - && (nutrient == null || nutrient.isEmpty()) && (texture == null || texture.isEmpty()) && (fluidConsistencyType == null || fluidConsistencyType.isEmpty()) - && (instruction == null || instruction.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, schedule, nutrient, texture + , fluidConsistencyType, instruction); } public String fhirType() { @@ -800,8 +798,7 @@ public class NutritionOrder extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (modifier == null || modifier.isEmpty()) && (amount == null || amount.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( modifier, amount); } public String fhirType() { @@ -943,8 +940,7 @@ public class NutritionOrder extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (modifier == null || modifier.isEmpty()) && (foodType == null || foodType.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( modifier, foodType); } public String fhirType() { @@ -1272,9 +1268,8 @@ public class NutritionOrder extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (productName == null || productName.isEmpty()) - && (schedule == null || schedule.isEmpty()) && (quantity == null || quantity.isEmpty()) && (instruction == null || instruction.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, productName, schedule, quantity + , instruction); } public String fhirType() { @@ -1785,11 +1780,9 @@ public class NutritionOrder extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (baseFormulaType == null || baseFormulaType.isEmpty()) && (baseFormulaProductName == null || baseFormulaProductName.isEmpty()) - && (additiveType == null || additiveType.isEmpty()) && (additiveProductName == null || additiveProductName.isEmpty()) - && (caloricDensity == null || caloricDensity.isEmpty()) && (routeofAdministration == null || routeofAdministration.isEmpty()) - && (administration == null || administration.isEmpty()) && (maxVolumeToDeliver == null || maxVolumeToDeliver.isEmpty()) - && (administrationInstruction == null || administrationInstruction.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( baseFormulaType, baseFormulaProductName + , additiveType, additiveProductName, caloricDensity, routeofAdministration, administration + , maxVolumeToDeliver, administrationInstruction); } public String fhirType() { @@ -1996,8 +1989,7 @@ public class NutritionOrder extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (schedule == null || schedule.isEmpty()) && (quantity == null || quantity.isEmpty()) - && (rate == null || rate.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( schedule, quantity, rate); } public String fhirType() { @@ -2007,10 +1999,24 @@ public class NutritionOrder extends DomainResource { } + /** + * Identifiers assigned to this order by the order sender or by the order receiver. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Identifiers assigned to this order", formalDefinition="Identifiers assigned to this order by the order sender or by the order receiver." ) + protected List identifier; + + /** + * The workflow status of the nutrition order/request. + */ + @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) + @Description(shortDefinition="proposed | draft | planned | requested | active | on-hold | completed | cancelled | entered-in-error", formalDefinition="The workflow status of the nutrition order/request." ) + protected Enumeration status; + /** * The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding. */ - @Child(name = "patient", type = {Patient.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Child(name = "patient", type = {Patient.class}, order=2, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="The person who requires the diet, formula or nutritional supplement", formalDefinition="The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding." ) protected Reference patient; @@ -2019,25 +2025,6 @@ public class NutritionOrder extends DomainResource { */ protected Patient patientTarget; - /** - * The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings. - */ - @Child(name = "orderer", type = {Practitioner.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Who ordered the diet, formula or nutritional supplement", formalDefinition="The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings." ) - protected Reference orderer; - - /** - * The actual object that is the target of the reference (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) - */ - protected Practitioner ordererTarget; - - /** - * Identifiers assigned to this order by the order sender or by the order receiver. - */ - @Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Identifiers assigned to this order", formalDefinition="Identifiers assigned to this order by the order sender or by the order receiver." ) - protected List identifier; - /** * An encounter that provides additional information about the healthcare context in which this request is made. */ @@ -2058,11 +2045,16 @@ public class NutritionOrder extends DomainResource { protected DateTimeType dateTime; /** - * The workflow status of the nutrition order/request. + * The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings. */ - @Child(name = "status", type = {CodeType.class}, order=5, min=0, max=1, modifier=true, summary=true) - @Description(shortDefinition="proposed | draft | planned | requested | active | on-hold | completed | cancelled | entered-in-error", formalDefinition="The workflow status of the nutrition order/request." ) - protected Enumeration status; + @Child(name = "orderer", type = {Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who ordered the diet, formula or nutritional supplement", formalDefinition="The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings." ) + protected Reference orderer; + + /** + * The actual object that is the target of the reference (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) + */ + protected Practitioner ordererTarget; /** * A link to a record of allergies or intolerances which should be included in the nutrition order. @@ -2111,7 +2103,7 @@ public class NutritionOrder extends DomainResource { @Description(shortDefinition="Enteral formula components", formalDefinition="Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity." ) protected NutritionOrderEnteralFormulaComponent enteralFormula; - private static final long serialVersionUID = 1139624085L; + private static final long serialVersionUID = 1429947433L; /** * Constructor @@ -2129,6 +2121,95 @@ public class NutritionOrder extends DomainResource { this.dateTime = dateTime; } + /** + * @return {@link #identifier} (Identifiers assigned to this order by the order sender or by the order receiver.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Identifiers assigned to this order by the order sender or by the order receiver.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public NutritionOrder addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #status} (The workflow status of the nutrition order/request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrder.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new NutritionOrderStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The workflow status of the nutrition order/request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public NutritionOrder setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The workflow status of the nutrition order/request. + */ + public NutritionOrderStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The workflow status of the nutrition order/request. + */ + public NutritionOrder setStatus(NutritionOrderStatus value) { + if (value == null) + this.status = null; + else { + if (this.status == null) + this.status = new Enumeration(new NutritionOrderStatusEnumFactory()); + this.status.setValue(value); + } + return this; + } + /** * @return {@link #patient} (The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.) */ @@ -2173,90 +2254,6 @@ public class NutritionOrder extends DomainResource { return this; } - /** - * @return {@link #orderer} (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) - */ - public Reference getOrderer() { - if (this.orderer == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create NutritionOrder.orderer"); - else if (Configuration.doAutoCreate()) - this.orderer = new Reference(); // cc - return this.orderer; - } - - public boolean hasOrderer() { - return this.orderer != null && !this.orderer.isEmpty(); - } - - /** - * @param value {@link #orderer} (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) - */ - public NutritionOrder setOrderer(Reference value) { - this.orderer = value; - return this; - } - - /** - * @return {@link #orderer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) - */ - public Practitioner getOrdererTarget() { - if (this.ordererTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create NutritionOrder.orderer"); - else if (Configuration.doAutoCreate()) - this.ordererTarget = new Practitioner(); // aa - return this.ordererTarget; - } - - /** - * @param value {@link #orderer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) - */ - public NutritionOrder setOrdererTarget(Practitioner value) { - this.ordererTarget = value; - return this; - } - - /** - * @return {@link #identifier} (Identifiers assigned to this order by the order sender or by the order receiver.) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (Identifiers assigned to this order by the order sender or by the order receiver.) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - // syntactic sugar - public NutritionOrder addIdentifier(Identifier t) { //3 - if (t == null) - return this; - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return this; - } - /** * @return {@link #encounter} (An encounter that provides additional information about the healthcare context in which this request is made.) */ @@ -2347,51 +2344,46 @@ public class NutritionOrder extends DomainResource { } /** - * @return {@link #status} (The workflow status of the nutrition order/request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + * @return {@link #orderer} (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) */ - public Enumeration getStatusElement() { - if (this.status == null) + public Reference getOrderer() { + if (this.orderer == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create NutritionOrder.status"); + throw new Error("Attempt to auto-create NutritionOrder.orderer"); else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new NutritionOrderStatusEnumFactory()); // bb - return this.status; + this.orderer = new Reference(); // cc + return this.orderer; } - public boolean hasStatusElement() { - return this.status != null && !this.status.isEmpty(); - } - - public boolean hasStatus() { - return this.status != null && !this.status.isEmpty(); + public boolean hasOrderer() { + return this.orderer != null && !this.orderer.isEmpty(); } /** - * @param value {@link #status} (The workflow status of the nutrition order/request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + * @param value {@link #orderer} (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) */ - public NutritionOrder setStatusElement(Enumeration value) { - this.status = value; + public NutritionOrder setOrderer(Reference value) { + this.orderer = value; return this; } /** - * @return The workflow status of the nutrition order/request. + * @return {@link #orderer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) */ - public NutritionOrderStatus getStatus() { - return this.status == null ? null : this.status.getValue(); + public Practitioner getOrdererTarget() { + if (this.ordererTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create NutritionOrder.orderer"); + else if (Configuration.doAutoCreate()) + this.ordererTarget = new Practitioner(); // aa + return this.ordererTarget; } /** - * @param value The workflow status of the nutrition order/request. + * @param value {@link #orderer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) */ - public NutritionOrder setStatus(NutritionOrderStatus value) { - if (value == null) - this.status = null; - else { - if (this.status == null) - this.status = new Enumeration(new NutritionOrderStatusEnumFactory()); - this.status.setValue(value); - } + public NutritionOrder setOrdererTarget(Practitioner value) { + this.ordererTarget = value; return this; } @@ -2626,12 +2618,12 @@ public class NutritionOrder extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("patient", "Reference(Patient)", "The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.", 0, java.lang.Integer.MAX_VALUE, patient)); - childrenList.add(new Property("orderer", "Reference(Practitioner)", "The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.", 0, java.lang.Integer.MAX_VALUE, orderer)); childrenList.add(new Property("identifier", "Identifier", "Identifiers assigned to this order by the order sender or by the order receiver.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("status", "code", "The workflow status of the nutrition order/request.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("patient", "Reference(Patient)", "The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.", 0, java.lang.Integer.MAX_VALUE, patient)); childrenList.add(new Property("encounter", "Reference(Encounter)", "An encounter that provides additional information about the healthcare context in which this request is made.", 0, java.lang.Integer.MAX_VALUE, encounter)); childrenList.add(new Property("dateTime", "dateTime", "The date and time that this nutrition order was requested.", 0, java.lang.Integer.MAX_VALUE, dateTime)); - childrenList.add(new Property("status", "code", "The workflow status of the nutrition order/request.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("orderer", "Reference(Practitioner)", "The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.", 0, java.lang.Integer.MAX_VALUE, orderer)); childrenList.add(new Property("allergyIntolerance", "Reference(AllergyIntolerance)", "A link to a record of allergies or intolerances which should be included in the nutrition order.", 0, java.lang.Integer.MAX_VALUE, allergyIntolerance)); childrenList.add(new Property("foodPreferenceModifier", "CodeableConcept", "This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.", 0, java.lang.Integer.MAX_VALUE, foodPreferenceModifier)); childrenList.add(new Property("excludeFoodModifier", "CodeableConcept", "This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced allergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.", 0, java.lang.Integer.MAX_VALUE, excludeFoodModifier)); @@ -2642,18 +2634,18 @@ public class NutritionOrder extends DomainResource { @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("patient")) - this.patient = castToReference(value); // Reference - else if (name.equals("orderer")) - this.orderer = castToReference(value); // Reference - else if (name.equals("identifier")) + if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("status")) + this.status = new NutritionOrderStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference else if (name.equals("encounter")) this.encounter = castToReference(value); // Reference else if (name.equals("dateTime")) this.dateTime = castToDateTime(value); // DateTimeType - else if (name.equals("status")) - this.status = new NutritionOrderStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("orderer")) + this.orderer = castToReference(value); // Reference else if (name.equals("allergyIntolerance")) this.getAllergyIntolerance().add(castToReference(value)); else if (name.equals("foodPreferenceModifier")) @@ -2672,17 +2664,16 @@ public class NutritionOrder extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("patient")) { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.status"); + } + else if (name.equals("patient")) { this.patient = new Reference(); return this.patient; } - else if (name.equals("orderer")) { - this.orderer = new Reference(); - return this.orderer; - } - else if (name.equals("identifier")) { - return addIdentifier(); - } else if (name.equals("encounter")) { this.encounter = new Reference(); return this.encounter; @@ -2690,8 +2681,9 @@ public class NutritionOrder extends DomainResource { else if (name.equals("dateTime")) { throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.dateTime"); } - else if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.status"); + else if (name.equals("orderer")) { + this.orderer = new Reference(); + return this.orderer; } else if (name.equals("allergyIntolerance")) { return addAllergyIntolerance(); @@ -2725,16 +2717,16 @@ public class NutritionOrder extends DomainResource { public NutritionOrder copy() { NutritionOrder dst = new NutritionOrder(); copyValues(dst); - dst.patient = patient == null ? null : patient.copy(); - dst.orderer = orderer == null ? null : orderer.copy(); if (identifier != null) { dst.identifier = new ArrayList(); for (Identifier i : identifier) dst.identifier.add(i.copy()); }; + dst.status = status == null ? null : status.copy(); + dst.patient = patient == null ? null : patient.copy(); dst.encounter = encounter == null ? null : encounter.copy(); dst.dateTime = dateTime == null ? null : dateTime.copy(); - dst.status = status == null ? null : status.copy(); + dst.orderer = orderer == null ? null : orderer.copy(); if (allergyIntolerance != null) { dst.allergyIntolerance = new ArrayList(); for (Reference i : allergyIntolerance) @@ -2771,8 +2763,8 @@ public class NutritionOrder extends DomainResource { if (!(other instanceof NutritionOrder)) return false; NutritionOrder o = (NutritionOrder) other; - return compareDeep(patient, o.patient, true) && compareDeep(orderer, o.orderer, true) && compareDeep(identifier, o.identifier, true) - && compareDeep(encounter, o.encounter, true) && compareDeep(dateTime, o.dateTime, true) && compareDeep(status, o.status, true) + return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(patient, o.patient, true) + && compareDeep(encounter, o.encounter, true) && compareDeep(dateTime, o.dateTime, true) && compareDeep(orderer, o.orderer, true) && compareDeep(allergyIntolerance, o.allergyIntolerance, true) && compareDeep(foodPreferenceModifier, o.foodPreferenceModifier, true) && compareDeep(excludeFoodModifier, o.excludeFoodModifier, true) && compareDeep(oralDiet, o.oralDiet, true) && compareDeep(supplement, o.supplement, true) && compareDeep(enteralFormula, o.enteralFormula, true) @@ -2786,16 +2778,13 @@ public class NutritionOrder extends DomainResource { if (!(other instanceof NutritionOrder)) return false; NutritionOrder o = (NutritionOrder) other; - return compareValues(dateTime, o.dateTime, true) && compareValues(status, o.status, true); + return compareValues(status, o.status, true) && compareValues(dateTime, o.dateTime, true); } public boolean isEmpty() { - return super.isEmpty() && (patient == null || patient.isEmpty()) && (orderer == null || orderer.isEmpty()) - && (identifier == null || identifier.isEmpty()) && (encounter == null || encounter.isEmpty()) - && (dateTime == null || dateTime.isEmpty()) && (status == null || status.isEmpty()) && (allergyIntolerance == null || allergyIntolerance.isEmpty()) - && (foodPreferenceModifier == null || foodPreferenceModifier.isEmpty()) && (excludeFoodModifier == null || excludeFoodModifier.isEmpty()) - && (oralDiet == null || oralDiet.isEmpty()) && (supplement == null || supplement.isEmpty()) - && (enteralFormula == null || enteralFormula.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, patient, encounter + , dateTime, orderer, allergyIntolerance, foodPreferenceModifier, excludeFoodModifier, oralDiet + , supplement, enteralFormula); } @Override @@ -2851,7 +2840,7 @@ public class NutritionOrder extends DomainResource { * Path: NutritionOrder.orderer
*

*/ - @SearchParamDefinition(name="provider", path="NutritionOrder.orderer", description="The identify of the provider who placed the nutrition order", type="reference" ) + @SearchParamDefinition(name="provider", path="NutritionOrder.orderer", description="The identify of the provider who placed the nutrition order", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_PROVIDER = "provider"; /** * Fluent Client search parameter constant for provider @@ -2877,7 +2866,7 @@ public class NutritionOrder extends DomainResource { * Path: NutritionOrder.patient
*

*/ - @SearchParamDefinition(name="patient", path="NutritionOrder.patient", description="The identity of the person who requires the diet, formula or nutritional supplement", type="reference" ) + @SearchParamDefinition(name="patient", path="NutritionOrder.patient", description="The identity of the person who requires the diet, formula or nutritional supplement", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient @@ -2943,7 +2932,7 @@ public class NutritionOrder extends DomainResource { * Path: NutritionOrder.encounter
*

*/ - @SearchParamDefinition(name="encounter", path="NutritionOrder.encounter", description="Return nutrition orders with this encounter identifier", type="reference" ) + @SearchParamDefinition(name="encounter", path="NutritionOrder.encounter", description="Return nutrition orders with this encounter identifier", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) public static final String SP_ENCOUNTER = "encounter"; /** * Fluent Client search parameter constant for encounter diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Observation.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Observation.java index 0b5af7a5aa2..de57e743319 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Observation.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Observation.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Measurements and simple assertions made about a patient, device or other subject. */ @@ -58,7 +57,7 @@ public class Observation extends DomainResource { */ PRELIMINARY, /** - * The observation is complete and verified by an authorized person. + * The observation is complete and verified by an authorized person (who may be the same person who entered the observation based on policy). */ FINAL, /** @@ -128,7 +127,7 @@ public class Observation extends DomainResource { switch (this) { case REGISTERED: return "The existence of the observation is registered, but there is no result yet available."; case PRELIMINARY: return "This is an initial or interim observation: data may be incomplete or unverified."; - case FINAL: return "The observation is complete and verified by an authorized person."; + case FINAL: return "The observation is complete and verified by an authorized person (who may be the same person who entered the observation based on policy)."; case AMENDED: return "The observation has been modified subsequent to being Final, and is complete and verified by an authorized person."; case CANCELLED: return "The observation is unavailable because the measurement was not started or not completed (also sometimes called \"aborted\")."; case ENTEREDINERROR: return "The observation has been withdrawn following previous final release."; @@ -640,9 +639,8 @@ public class Observation extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (low == null || low.isEmpty()) && (high == null || high.isEmpty()) - && (meaning == null || meaning.isEmpty()) && (age == null || age.isEmpty()) && (text == null || text.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( low, high, meaning, age, text + ); } public String fhirType() { @@ -836,8 +834,7 @@ public class Observation extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (target == null || target.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, target); } public String fhirType() { @@ -1246,9 +1243,8 @@ public class Observation extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (value == null || value.isEmpty()) - && (dataAbsentReason == null || dataAbsentReason.isEmpty()) && (referenceRange == null || referenceRange.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, value, dataAbsentReason + , referenceRange); } public String fhirType() { @@ -1360,9 +1356,9 @@ public class Observation extends DomainResource { /** * May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result. */ - @Child(name = "comments", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Child(name = "comment", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Comments about result", formalDefinition="May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result." ) - protected StringType comments; + protected StringType comment; /** * Indicates the site on the subject's body where the observation was made (i.e. the target site). @@ -1423,7 +1419,7 @@ public class Observation extends DomainResource { @Description(shortDefinition="Component results", formalDefinition="Some observations have multiple component observations. These component observations are expressed as separate code value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations." ) protected List component; - private static final long serialVersionUID = -931593572L; + private static final long serialVersionUID = -1812700333L; /** * Constructor @@ -1998,50 +1994,50 @@ public class Observation extends DomainResource { } /** - * @return {@link #comments} (May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value + * @return {@link #comment} (May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value */ - public StringType getCommentsElement() { - if (this.comments == null) + public StringType getCommentElement() { + if (this.comment == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Observation.comments"); + throw new Error("Attempt to auto-create Observation.comment"); else if (Configuration.doAutoCreate()) - this.comments = new StringType(); // bb - return this.comments; + this.comment = new StringType(); // bb + return this.comment; } - public boolean hasCommentsElement() { - return this.comments != null && !this.comments.isEmpty(); + public boolean hasCommentElement() { + return this.comment != null && !this.comment.isEmpty(); } - public boolean hasComments() { - return this.comments != null && !this.comments.isEmpty(); + public boolean hasComment() { + return this.comment != null && !this.comment.isEmpty(); } /** - * @param value {@link #comments} (May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.). This is the underlying object with id, value and extensions. The accessor "getComments" gives direct access to the value + * @param value {@link #comment} (May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value */ - public Observation setCommentsElement(StringType value) { - this.comments = value; + public Observation setCommentElement(StringType value) { + this.comment = value; return this; } /** * @return May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result. */ - public String getComments() { - return this.comments == null ? null : this.comments.getValue(); + public String getComment() { + return this.comment == null ? null : this.comment.getValue(); } /** * @param value May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result. */ - public Observation setComments(String value) { + public Observation setComment(String value) { if (Utilities.noString(value)) - this.comments = null; + this.comment = null; else { - if (this.comments == null) - this.comments = new StringType(); - this.comments.setValue(value); + if (this.comment == null) + this.comment = new StringType(); + this.comment.setValue(value); } return this; } @@ -2311,7 +2307,7 @@ public class Observation extends DomainResource { childrenList.add(new Property("value[x]", "Quantity|CodeableConcept|string|Range|Ratio|SampledData|Attachment|time|dateTime|Period", "The information determined as a result of making the observation, if the information has a simple value.", 0, java.lang.Integer.MAX_VALUE, value)); childrenList.add(new Property("dataAbsentReason", "CodeableConcept", "Provides a reason why the expected value in the element Observation.value[x] is missing.", 0, java.lang.Integer.MAX_VALUE, dataAbsentReason)); childrenList.add(new Property("interpretation", "CodeableConcept", "The assessment made based on the result of the observation. Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.", 0, java.lang.Integer.MAX_VALUE, interpretation)); - childrenList.add(new Property("comments", "string", "May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.", 0, java.lang.Integer.MAX_VALUE, comments)); + childrenList.add(new Property("comment", "string", "May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.", 0, java.lang.Integer.MAX_VALUE, comment)); childrenList.add(new Property("bodySite", "CodeableConcept", "Indicates the site on the subject's body where the observation was made (i.e. the target site).", 0, java.lang.Integer.MAX_VALUE, bodySite)); childrenList.add(new Property("method", "CodeableConcept", "Indicates the mechanism used to perform the observation.", 0, java.lang.Integer.MAX_VALUE, method)); childrenList.add(new Property("specimen", "Reference(Specimen)", "The specimen that was used when this observation was made.", 0, java.lang.Integer.MAX_VALUE, specimen)); @@ -2347,8 +2343,8 @@ public class Observation extends DomainResource { this.dataAbsentReason = castToCodeableConcept(value); // CodeableConcept else if (name.equals("interpretation")) this.interpretation = castToCodeableConcept(value); // CodeableConcept - else if (name.equals("comments")) - this.comments = castToString(value); // StringType + else if (name.equals("comment")) + this.comment = castToString(value); // StringType else if (name.equals("bodySite")) this.bodySite = castToCodeableConcept(value); // CodeableConcept else if (name.equals("method")) @@ -2453,8 +2449,8 @@ public class Observation extends DomainResource { this.interpretation = new CodeableConcept(); return this.interpretation; } - else if (name.equals("comments")) { - throw new FHIRException("Cannot call addChild on a primitive type Observation.comments"); + else if (name.equals("comment")) { + throw new FHIRException("Cannot call addChild on a primitive type Observation.comment"); } else if (name.equals("bodySite")) { this.bodySite = new CodeableConcept(); @@ -2513,7 +2509,7 @@ public class Observation extends DomainResource { dst.value = value == null ? null : value.copy(); dst.dataAbsentReason = dataAbsentReason == null ? null : dataAbsentReason.copy(); dst.interpretation = interpretation == null ? null : interpretation.copy(); - dst.comments = comments == null ? null : comments.copy(); + dst.comment = comment == null ? null : comment.copy(); dst.bodySite = bodySite == null ? null : bodySite.copy(); dst.method = method == null ? null : method.copy(); dst.specimen = specimen == null ? null : specimen.copy(); @@ -2551,7 +2547,7 @@ public class Observation extends DomainResource { && compareDeep(code, o.code, true) && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) && compareDeep(effective, o.effective, true) && compareDeep(issued, o.issued, true) && compareDeep(performer, o.performer, true) && compareDeep(value, o.value, true) && compareDeep(dataAbsentReason, o.dataAbsentReason, true) - && compareDeep(interpretation, o.interpretation, true) && compareDeep(comments, o.comments, true) + && compareDeep(interpretation, o.interpretation, true) && compareDeep(comment, o.comment, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(method, o.method, true) && compareDeep(specimen, o.specimen, true) && compareDeep(device, o.device, true) && compareDeep(referenceRange, o.referenceRange, true) && compareDeep(related, o.related, true) && compareDeep(component, o.component, true); @@ -2564,19 +2560,14 @@ public class Observation extends DomainResource { if (!(other instanceof Observation)) return false; Observation o = (Observation) other; - return compareValues(status, o.status, true) && compareValues(issued, o.issued, true) && compareValues(comments, o.comments, true) + return compareValues(status, o.status, true) && compareValues(issued, o.issued, true) && compareValues(comment, o.comment, true) ; } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) - && (category == null || category.isEmpty()) && (code == null || code.isEmpty()) && (subject == null || subject.isEmpty()) - && (encounter == null || encounter.isEmpty()) && (effective == null || effective.isEmpty()) - && (issued == null || issued.isEmpty()) && (performer == null || performer.isEmpty()) && (value == null || value.isEmpty()) - && (dataAbsentReason == null || dataAbsentReason.isEmpty()) && (interpretation == null || interpretation.isEmpty()) - && (comments == null || comments.isEmpty()) && (bodySite == null || bodySite.isEmpty()) && (method == null || method.isEmpty()) - && (specimen == null || specimen.isEmpty()) && (device == null || device.isEmpty()) && (referenceRange == null || referenceRange.isEmpty()) - && (related == null || related.isEmpty()) && (component == null || component.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, category + , code, subject, encounter, effective, issued, performer, value, dataAbsentReason, interpretation + , comment, bodySite, method, specimen, device, referenceRange, related, component); } @Override @@ -2632,7 +2623,7 @@ public class Observation extends DomainResource { * Path: Observation.subject
*

*/ - @SearchParamDefinition(name="subject", path="Observation.subject", description="The subject that the observation is about", type="reference" ) + @SearchParamDefinition(name="subject", path="Observation.subject", description="The subject that the observation is about", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject @@ -3010,7 +3001,7 @@ public class Observation extends DomainResource { * Path: Observation.performer
*

*/ - @SearchParamDefinition(name="performer", path="Observation.performer", description="Who performed the observation", type="reference" ) + @SearchParamDefinition(name="performer", path="Observation.performer", description="Who performed the observation", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_PERFORMER = "performer"; /** * Fluent Client search parameter constant for performer @@ -3096,7 +3087,7 @@ public class Observation extends DomainResource { * Path: Observation.encounter
*

*/ - @SearchParamDefinition(name="encounter", path="Observation.encounter", description="Healthcare event related to the observation", type="reference" ) + @SearchParamDefinition(name="encounter", path="Observation.encounter", description="Healthcare event related to the observation", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) public static final String SP_ENCOUNTER = "encounter"; /** * Fluent Client search parameter constant for encounter @@ -3228,7 +3219,7 @@ public class Observation extends DomainResource { * Path: Observation.device
*

*/ - @SearchParamDefinition(name="device", path="Observation.device", description="The Device that generated the observation data.", type="reference" ) + @SearchParamDefinition(name="device", path="Observation.device", description="The Device that generated the observation data.", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device") } ) public static final String SP_DEVICE = "device"; /** * Fluent Client search parameter constant for device diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/OperationDefinition.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/OperationDefinition.java index aaef1bba995..bc07daf5a40 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/OperationDefinition.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/OperationDefinition.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Mar 26, 2016 11:49-0400 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/OperationOutcome.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/OperationOutcome.java index 24fe846a9bc..cf87f56c934 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/OperationOutcome.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/OperationOutcome.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A collection of error, warning or information messages that result from a system action. */ @@ -723,7 +722,14 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu @Description(shortDefinition="XPath of element(s) related to issue", formalDefinition="A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised." ) protected List location; - private static final long serialVersionUID = 930165515L; + /** + * A simple FluentPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised. + */ + @Child(name = "expression", type = {StringType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="FluentPath of element(s) related to issue", formalDefinition="A simple FluentPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised." ) + protected List expression; + + private static final long serialVersionUID = -1681095438L; /** * Constructor @@ -958,6 +964,60 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu return false; } + /** + * @return {@link #expression} (A simple FluentPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.) + */ + public List getExpression() { + if (this.expression == null) + this.expression = new ArrayList(); + return this.expression; + } + + public boolean hasExpression() { + if (this.expression == null) + return false; + for (StringType item : this.expression) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #expression} (A simple FluentPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.) + */ + // syntactic sugar + public StringType addExpressionElement() {//2 + StringType t = new StringType(); + if (this.expression == null) + this.expression = new ArrayList(); + this.expression.add(t); + return t; + } + + /** + * @param value {@link #expression} (A simple FluentPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.) + */ + public OperationOutcomeIssueComponent addExpression(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.expression == null) + this.expression = new ArrayList(); + this.expression.add(t); + return this; + } + + /** + * @param value {@link #expression} (A simple FluentPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.) + */ + public boolean hasExpression(String value) { + if (this.expression == null) + return false; + for (StringType v : this.expression) + if (v.equals(value)) // string + return true; + return false; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("severity", "code", "Indicates whether the issue indicates a variation from successful processing.", 0, java.lang.Integer.MAX_VALUE, severity)); @@ -965,6 +1025,7 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu childrenList.add(new Property("details", "CodeableConcept", "Additional details about the error. This may be a text description of the error, or a system code that identifies the error.", 0, java.lang.Integer.MAX_VALUE, details)); childrenList.add(new Property("diagnostics", "string", "Additional diagnostic information about the issue. Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.", 0, java.lang.Integer.MAX_VALUE, diagnostics)); childrenList.add(new Property("location", "string", "A simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("expression", "string", "A simple FluentPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.", 0, java.lang.Integer.MAX_VALUE, expression)); } @Override @@ -979,6 +1040,8 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu this.diagnostics = castToString(value); // StringType else if (name.equals("location")) this.getLocation().add(castToString(value)); + else if (name.equals("expression")) + this.getExpression().add(castToString(value)); else super.setProperty(name, value); } @@ -1001,6 +1064,9 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu else if (name.equals("location")) { throw new FHIRException("Cannot call addChild on a primitive type OperationOutcome.location"); } + else if (name.equals("expression")) { + throw new FHIRException("Cannot call addChild on a primitive type OperationOutcome.expression"); + } else return super.addChild(name); } @@ -1017,6 +1083,11 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu for (StringType i : location) dst.location.add(i.copy()); }; + if (expression != null) { + dst.expression = new ArrayList(); + for (StringType i : expression) + dst.expression.add(i.copy()); + }; return dst; } @@ -1028,7 +1099,8 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu return false; OperationOutcomeIssueComponent o = (OperationOutcomeIssueComponent) other; return compareDeep(severity, o.severity, true) && compareDeep(code, o.code, true) && compareDeep(details, o.details, true) - && compareDeep(diagnostics, o.diagnostics, true) && compareDeep(location, o.location, true); + && compareDeep(diagnostics, o.diagnostics, true) && compareDeep(location, o.location, true) && compareDeep(expression, o.expression, true) + ; } @Override @@ -1039,13 +1111,12 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu return false; OperationOutcomeIssueComponent o = (OperationOutcomeIssueComponent) other; return compareValues(severity, o.severity, true) && compareValues(code, o.code, true) && compareValues(diagnostics, o.diagnostics, true) - && compareValues(location, o.location, true); + && compareValues(location, o.location, true) && compareValues(expression, o.expression, true); } public boolean isEmpty() { - return super.isEmpty() && (severity == null || severity.isEmpty()) && (code == null || code.isEmpty()) - && (details == null || details.isEmpty()) && (diagnostics == null || diagnostics.isEmpty()) - && (location == null || location.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( severity, code, details, diagnostics + , location, expression); } public String fhirType() { @@ -1174,7 +1245,7 @@ public class OperationOutcome extends DomainResource implements IBaseOperationOu } public boolean isEmpty() { - return super.isEmpty() && (issue == null || issue.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( issue); } @Override diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Order.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Order.java index 9c8474d5e81..3f5159c35ec 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Order.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Order.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -38,9 +38,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A request to perform an action. */ @@ -179,8 +178,7 @@ public class Order extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (schedule == null || schedule.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, schedule); } public String fhirType() { @@ -726,10 +724,8 @@ public class Order extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (date == null || date.isEmpty()) - && (subject == null || subject.isEmpty()) && (source == null || source.isEmpty()) && (target == null || target.isEmpty()) - && (reason == null || reason.isEmpty()) && (when == null || when.isEmpty()) && (detail == null || detail.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, date, subject, source + , target, reason, when, detail); } @Override @@ -785,7 +781,7 @@ public class Order extends DomainResource { * Path: Order.subject
*

*/ - @SearchParamDefinition(name="subject", path="Order.subject", description="Patient this order is about", type="reference" ) + @SearchParamDefinition(name="subject", path="Order.subject", description="Patient this order is about", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject @@ -837,7 +833,7 @@ public class Order extends DomainResource { * Path: Order.source
*

*/ - @SearchParamDefinition(name="source", path="Order.source", description="Who initiated the order", type="reference" ) + @SearchParamDefinition(name="source", path="Order.source", description="Who initiated the order", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_SOURCE = "source"; /** * Fluent Client search parameter constant for source @@ -909,7 +905,7 @@ public class Order extends DomainResource { * Path: Order.target
*

*/ - @SearchParamDefinition(name="target", path="Order.target", description="Who is intended to fulfill the order", type="reference" ) + @SearchParamDefinition(name="target", path="Order.target", description="Who is intended to fulfill the order", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_TARGET = "target"; /** * Fluent Client search parameter constant for target diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/OrderResponse.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/OrderResponse.java index a175fc289cc..d7223a7b66a 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/OrderResponse.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/OrderResponse.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A response to an order. */ @@ -758,10 +757,8 @@ public class OrderResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty()) - && (date == null || date.isEmpty()) && (who == null || who.isEmpty()) && (orderStatus == null || orderStatus.isEmpty()) - && (description == null || description.isEmpty()) && (fulfillment == null || fulfillment.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, request, date, who + , orderStatus, description, fulfillment); } @Override @@ -889,7 +886,7 @@ public class OrderResponse extends DomainResource { * Path: OrderResponse.who
*

*/ - @SearchParamDefinition(name="who", path="OrderResponse.who", description="Who made the response", type="reference" ) + @SearchParamDefinition(name="who", path="OrderResponse.who", description="Who made the response", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_WHO = "who"; /** * Fluent Client search parameter constant for who diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/OrderSet.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/OrderSet.java index 87c9708a6cf..d0e2e25a485 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/OrderSet.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/OrderSet.java @@ -29,2189 +29,34 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; -import org.hl7.fhir.utilities.Utilities; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * This resource allows for the definition of an order set as a sharable, consumable, and executable artifact in support of clinical decision support. */ @ResourceDef(name="OrderSet", profile="http://hl7.org/fhir/Profile/OrderSet") public class OrderSet extends DomainResource { - public enum OrderSetParticipantType { - /** - * The participant is the patient under evaluation - */ - PATIENT, - /** - * The participant is a person - */ - PERSON, - /** - * The participant is a practitioner involved in the patient's care - */ - PRACTITIONER, - /** - * The participant is a person related to the patient - */ - RELATEDPERSON, - /** - * added to help the parsers - */ - NULL; - public static OrderSetParticipantType fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("patient".equals(codeString)) - return PATIENT; - if ("person".equals(codeString)) - return PERSON; - if ("practitioner".equals(codeString)) - return PRACTITIONER; - if ("related-person".equals(codeString)) - return RELATEDPERSON; - throw new FHIRException("Unknown OrderSetParticipantType code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case PATIENT: return "patient"; - case PERSON: return "person"; - case PRACTITIONER: return "practitioner"; - case RELATEDPERSON: return "related-person"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case PATIENT: return "http://hl7.org/fhir/order-set-participant"; - case PERSON: return "http://hl7.org/fhir/order-set-participant"; - case PRACTITIONER: return "http://hl7.org/fhir/order-set-participant"; - case RELATEDPERSON: return "http://hl7.org/fhir/order-set-participant"; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case PATIENT: return "The participant is the patient under evaluation"; - case PERSON: return "The participant is a person"; - case PRACTITIONER: return "The participant is a practitioner involved in the patient's care"; - case RELATEDPERSON: return "The participant is a person related to the patient"; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case PATIENT: return "Patient"; - case PERSON: return "Person"; - case PRACTITIONER: return "Practitioner"; - case RELATEDPERSON: return "Related Person"; - default: return "?"; - } - } - } - - public static class OrderSetParticipantTypeEnumFactory implements EnumFactory { - public OrderSetParticipantType fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("patient".equals(codeString)) - return OrderSetParticipantType.PATIENT; - if ("person".equals(codeString)) - return OrderSetParticipantType.PERSON; - if ("practitioner".equals(codeString)) - return OrderSetParticipantType.PRACTITIONER; - if ("related-person".equals(codeString)) - return OrderSetParticipantType.RELATEDPERSON; - throw new IllegalArgumentException("Unknown OrderSetParticipantType code '"+codeString+"'"); - } - public Enumeration fromType(Base code) throws FHIRException { - if (code == null || code.isEmpty()) - return null; - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return null; - if ("patient".equals(codeString)) - return new Enumeration(this, OrderSetParticipantType.PATIENT); - if ("person".equals(codeString)) - return new Enumeration(this, OrderSetParticipantType.PERSON); - if ("practitioner".equals(codeString)) - return new Enumeration(this, OrderSetParticipantType.PRACTITIONER); - if ("related-person".equals(codeString)) - return new Enumeration(this, OrderSetParticipantType.RELATEDPERSON); - throw new FHIRException("Unknown OrderSetParticipantType code '"+codeString+"'"); - } - public String toCode(OrderSetParticipantType code) { - if (code == OrderSetParticipantType.PATIENT) - return "patient"; - if (code == OrderSetParticipantType.PERSON) - return "person"; - if (code == OrderSetParticipantType.PRACTITIONER) - return "practitioner"; - if (code == OrderSetParticipantType.RELATEDPERSON) - return "related-person"; - return "?"; - } - public String toSystem(OrderSetParticipantType code) { - return code.getSystem(); - } - } - - public enum OrderSetItemType { - /** - * The action is to create a new resource - */ - CREATE, - /** - * The action is to update an existing resource - */ - UPDATE, - /** - * The action is to remove an existing resource - */ - REMOVE, - /** - * The action is to fire a specific event - */ - FIREEVENT, - /** - * added to help the parsers - */ - NULL; - public static OrderSetItemType fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("create".equals(codeString)) - return CREATE; - if ("update".equals(codeString)) - return UPDATE; - if ("remove".equals(codeString)) - return REMOVE; - if ("fire-event".equals(codeString)) - return FIREEVENT; - throw new FHIRException("Unknown OrderSetItemType code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case CREATE: return "create"; - case UPDATE: return "update"; - case REMOVE: return "remove"; - case FIREEVENT: return "fire-event"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case CREATE: return "http://hl7.org/fhir/order-set-item-type"; - case UPDATE: return "http://hl7.org/fhir/order-set-item-type"; - case REMOVE: return "http://hl7.org/fhir/order-set-item-type"; - case FIREEVENT: return "http://hl7.org/fhir/order-set-item-type"; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case CREATE: return "The action is to create a new resource"; - case UPDATE: return "The action is to update an existing resource"; - case REMOVE: return "The action is to remove an existing resource"; - case FIREEVENT: return "The action is to fire a specific event"; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case CREATE: return "Create"; - case UPDATE: return "Update"; - case REMOVE: return "Remove"; - case FIREEVENT: return "Fire Event"; - default: return "?"; - } - } - } - - public static class OrderSetItemTypeEnumFactory implements EnumFactory { - public OrderSetItemType fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("create".equals(codeString)) - return OrderSetItemType.CREATE; - if ("update".equals(codeString)) - return OrderSetItemType.UPDATE; - if ("remove".equals(codeString)) - return OrderSetItemType.REMOVE; - if ("fire-event".equals(codeString)) - return OrderSetItemType.FIREEVENT; - throw new IllegalArgumentException("Unknown OrderSetItemType code '"+codeString+"'"); - } - public Enumeration fromType(Base code) throws FHIRException { - if (code == null || code.isEmpty()) - return null; - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return null; - if ("create".equals(codeString)) - return new Enumeration(this, OrderSetItemType.CREATE); - if ("update".equals(codeString)) - return new Enumeration(this, OrderSetItemType.UPDATE); - if ("remove".equals(codeString)) - return new Enumeration(this, OrderSetItemType.REMOVE); - if ("fire-event".equals(codeString)) - return new Enumeration(this, OrderSetItemType.FIREEVENT); - throw new FHIRException("Unknown OrderSetItemType code '"+codeString+"'"); - } - public String toCode(OrderSetItemType code) { - if (code == OrderSetItemType.CREATE) - return "create"; - if (code == OrderSetItemType.UPDATE) - return "update"; - if (code == OrderSetItemType.REMOVE) - return "remove"; - if (code == OrderSetItemType.FIREEVENT) - return "fire-event"; - return "?"; - } - public String toSystem(OrderSetItemType code) { - return code.getSystem(); - } - } - - public enum OrderSetItemGroupingBehavior { - /** - * Any group marked with this behavior should be displayed as a visual group to the end user - */ - VISUALGROUP, - /** - * A group with this behavior logically groups its sub-elements, and may be shown as a visual group to the end user, but it is not required to do so - */ - LOGICALGROUP, - /** - * A group of related alternative items is a sentence group if the target referenced by the item is the same in all the items, and each item simply constitutes a different variation on how to specify the details for the target. For example, two items that could be in a SentenceGroup are "aspirin, 500 mg, 2 times per day" and "aspirin, 300 mg, 3 times per day". In both cases, aspirin is the target referenced by the item, and the two items represent two different options for how aspirin might be ordered for the patient. Note that a SentenceGroup would almost always have an associated selection behavior of "AtMostOne", unless it's a required item, in which case, it would be "ExactlyOne" - */ - SENTENCEGROUP, - /** - * added to help the parsers - */ - NULL; - public static OrderSetItemGroupingBehavior fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("visual-group".equals(codeString)) - return VISUALGROUP; - if ("logical-group".equals(codeString)) - return LOGICALGROUP; - if ("sentence-group".equals(codeString)) - return SENTENCEGROUP; - throw new FHIRException("Unknown OrderSetItemGroupingBehavior code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case VISUALGROUP: return "visual-group"; - case LOGICALGROUP: return "logical-group"; - case SENTENCEGROUP: return "sentence-group"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case VISUALGROUP: return "http://hl7.org/fhir/grouping-behavior"; - case LOGICALGROUP: return "http://hl7.org/fhir/grouping-behavior"; - case SENTENCEGROUP: return "http://hl7.org/fhir/grouping-behavior"; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case VISUALGROUP: return "Any group marked with this behavior should be displayed as a visual group to the end user"; - case LOGICALGROUP: return "A group with this behavior logically groups its sub-elements, and may be shown as a visual group to the end user, but it is not required to do so"; - case SENTENCEGROUP: return "A group of related alternative items is a sentence group if the target referenced by the item is the same in all the items, and each item simply constitutes a different variation on how to specify the details for the target. For example, two items that could be in a SentenceGroup are \"aspirin, 500 mg, 2 times per day\" and \"aspirin, 300 mg, 3 times per day\". In both cases, aspirin is the target referenced by the item, and the two items represent two different options for how aspirin might be ordered for the patient. Note that a SentenceGroup would almost always have an associated selection behavior of \"AtMostOne\", unless it's a required item, in which case, it would be \"ExactlyOne\""; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case VISUALGROUP: return "Visual Group"; - case LOGICALGROUP: return "Logical Group"; - case SENTENCEGROUP: return "Sentence Group"; - default: return "?"; - } - } - } - - public static class OrderSetItemGroupingBehaviorEnumFactory implements EnumFactory { - public OrderSetItemGroupingBehavior fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("visual-group".equals(codeString)) - return OrderSetItemGroupingBehavior.VISUALGROUP; - if ("logical-group".equals(codeString)) - return OrderSetItemGroupingBehavior.LOGICALGROUP; - if ("sentence-group".equals(codeString)) - return OrderSetItemGroupingBehavior.SENTENCEGROUP; - throw new IllegalArgumentException("Unknown OrderSetItemGroupingBehavior code '"+codeString+"'"); - } - public Enumeration fromType(Base code) throws FHIRException { - if (code == null || code.isEmpty()) - return null; - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return null; - if ("visual-group".equals(codeString)) - return new Enumeration(this, OrderSetItemGroupingBehavior.VISUALGROUP); - if ("logical-group".equals(codeString)) - return new Enumeration(this, OrderSetItemGroupingBehavior.LOGICALGROUP); - if ("sentence-group".equals(codeString)) - return new Enumeration(this, OrderSetItemGroupingBehavior.SENTENCEGROUP); - throw new FHIRException("Unknown OrderSetItemGroupingBehavior code '"+codeString+"'"); - } - public String toCode(OrderSetItemGroupingBehavior code) { - if (code == OrderSetItemGroupingBehavior.VISUALGROUP) - return "visual-group"; - if (code == OrderSetItemGroupingBehavior.LOGICALGROUP) - return "logical-group"; - if (code == OrderSetItemGroupingBehavior.SENTENCEGROUP) - return "sentence-group"; - return "?"; - } - public String toSystem(OrderSetItemGroupingBehavior code) { - return code.getSystem(); - } - } - - public enum OrderSetItemSelectionBehavior { - /** - * Any number of the items in the group may be chosen, from zero to all - */ - ANY, - /** - * All the items in the group must be selected as a single unit - */ - ALL, - /** - * All the items in the group are meant to be chosen as a single unit: either all must be selected by the end user, or none may be selected - */ - ALLORNONE, - /** - * The end user must choose one and only one of the selectable items in the group. The user may not choose none of the items in the group - */ - EXACTLYONE, - /** - * The end user may choose zero or at most one of the items in the group - */ - ATMOSTONE, - /** - * The end user must choose a minimum of one, and as many additional as desired - */ - ONEORMORE, - /** - * added to help the parsers - */ - NULL; - public static OrderSetItemSelectionBehavior fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("any".equals(codeString)) - return ANY; - if ("all".equals(codeString)) - return ALL; - if ("all-or-none".equals(codeString)) - return ALLORNONE; - if ("exactly-one".equals(codeString)) - return EXACTLYONE; - if ("at-most-one".equals(codeString)) - return ATMOSTONE; - if ("one-or-more".equals(codeString)) - return ONEORMORE; - throw new FHIRException("Unknown OrderSetItemSelectionBehavior code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case ANY: return "any"; - case ALL: return "all"; - case ALLORNONE: return "all-or-none"; - case EXACTLYONE: return "exactly-one"; - case ATMOSTONE: return "at-most-one"; - case ONEORMORE: return "one-or-more"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case ANY: return "http://hl7.org/fhir/selection-behavior"; - case ALL: return "http://hl7.org/fhir/selection-behavior"; - case ALLORNONE: return "http://hl7.org/fhir/selection-behavior"; - case EXACTLYONE: return "http://hl7.org/fhir/selection-behavior"; - case ATMOSTONE: return "http://hl7.org/fhir/selection-behavior"; - case ONEORMORE: return "http://hl7.org/fhir/selection-behavior"; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case ANY: return "Any number of the items in the group may be chosen, from zero to all"; - case ALL: return "All the items in the group must be selected as a single unit"; - case ALLORNONE: return "All the items in the group are meant to be chosen as a single unit: either all must be selected by the end user, or none may be selected"; - case EXACTLYONE: return "The end user must choose one and only one of the selectable items in the group. The user may not choose none of the items in the group"; - case ATMOSTONE: return "The end user may choose zero or at most one of the items in the group"; - case ONEORMORE: return "The end user must choose a minimum of one, and as many additional as desired"; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case ANY: return "Any"; - case ALL: return "All"; - case ALLORNONE: return "All Or None"; - case EXACTLYONE: return "Exactly One"; - case ATMOSTONE: return "At Most One"; - case ONEORMORE: return "One Or More"; - default: return "?"; - } - } - } - - public static class OrderSetItemSelectionBehaviorEnumFactory implements EnumFactory { - public OrderSetItemSelectionBehavior fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("any".equals(codeString)) - return OrderSetItemSelectionBehavior.ANY; - if ("all".equals(codeString)) - return OrderSetItemSelectionBehavior.ALL; - if ("all-or-none".equals(codeString)) - return OrderSetItemSelectionBehavior.ALLORNONE; - if ("exactly-one".equals(codeString)) - return OrderSetItemSelectionBehavior.EXACTLYONE; - if ("at-most-one".equals(codeString)) - return OrderSetItemSelectionBehavior.ATMOSTONE; - if ("one-or-more".equals(codeString)) - return OrderSetItemSelectionBehavior.ONEORMORE; - throw new IllegalArgumentException("Unknown OrderSetItemSelectionBehavior code '"+codeString+"'"); - } - public Enumeration fromType(Base code) throws FHIRException { - if (code == null || code.isEmpty()) - return null; - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return null; - if ("any".equals(codeString)) - return new Enumeration(this, OrderSetItemSelectionBehavior.ANY); - if ("all".equals(codeString)) - return new Enumeration(this, OrderSetItemSelectionBehavior.ALL); - if ("all-or-none".equals(codeString)) - return new Enumeration(this, OrderSetItemSelectionBehavior.ALLORNONE); - if ("exactly-one".equals(codeString)) - return new Enumeration(this, OrderSetItemSelectionBehavior.EXACTLYONE); - if ("at-most-one".equals(codeString)) - return new Enumeration(this, OrderSetItemSelectionBehavior.ATMOSTONE); - if ("one-or-more".equals(codeString)) - return new Enumeration(this, OrderSetItemSelectionBehavior.ONEORMORE); - throw new FHIRException("Unknown OrderSetItemSelectionBehavior code '"+codeString+"'"); - } - public String toCode(OrderSetItemSelectionBehavior code) { - if (code == OrderSetItemSelectionBehavior.ANY) - return "any"; - if (code == OrderSetItemSelectionBehavior.ALL) - return "all"; - if (code == OrderSetItemSelectionBehavior.ALLORNONE) - return "all-or-none"; - if (code == OrderSetItemSelectionBehavior.EXACTLYONE) - return "exactly-one"; - if (code == OrderSetItemSelectionBehavior.ATMOSTONE) - return "at-most-one"; - if (code == OrderSetItemSelectionBehavior.ONEORMORE) - return "one-or-more"; - return "?"; - } - public String toSystem(OrderSetItemSelectionBehavior code) { - return code.getSystem(); - } - } - - public enum OrderSetItemRequiredBehavior { - /** - * An item with this behavior must be included in the items processed by the end user; the end user may not choose not to include this item - */ - MUST, - /** - * An item with this behavior may be included in the set of items processed by the end user - */ - COULD, - /** - * An item with this behavior must be included in the set of items processed by the end user, unless the end user provides documentation as to why the item was not included - */ - MUSTUNLESSDOCUMENTED, - /** - * added to help the parsers - */ - NULL; - public static OrderSetItemRequiredBehavior fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("must".equals(codeString)) - return MUST; - if ("could".equals(codeString)) - return COULD; - if ("must-unless-documented".equals(codeString)) - return MUSTUNLESSDOCUMENTED; - throw new FHIRException("Unknown OrderSetItemRequiredBehavior code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case MUST: return "must"; - case COULD: return "could"; - case MUSTUNLESSDOCUMENTED: return "must-unless-documented"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case MUST: return "http://hl7.org/fhir/required-behavior"; - case COULD: return "http://hl7.org/fhir/required-behavior"; - case MUSTUNLESSDOCUMENTED: return "http://hl7.org/fhir/required-behavior"; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case MUST: return "An item with this behavior must be included in the items processed by the end user; the end user may not choose not to include this item"; - case COULD: return "An item with this behavior may be included in the set of items processed by the end user"; - case MUSTUNLESSDOCUMENTED: return "An item with this behavior must be included in the set of items processed by the end user, unless the end user provides documentation as to why the item was not included"; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case MUST: return "Must"; - case COULD: return "Could"; - case MUSTUNLESSDOCUMENTED: return "Must Unless Documented"; - default: return "?"; - } - } - } - - public static class OrderSetItemRequiredBehaviorEnumFactory implements EnumFactory { - public OrderSetItemRequiredBehavior fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("must".equals(codeString)) - return OrderSetItemRequiredBehavior.MUST; - if ("could".equals(codeString)) - return OrderSetItemRequiredBehavior.COULD; - if ("must-unless-documented".equals(codeString)) - return OrderSetItemRequiredBehavior.MUSTUNLESSDOCUMENTED; - throw new IllegalArgumentException("Unknown OrderSetItemRequiredBehavior code '"+codeString+"'"); - } - public Enumeration fromType(Base code) throws FHIRException { - if (code == null || code.isEmpty()) - return null; - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return null; - if ("must".equals(codeString)) - return new Enumeration(this, OrderSetItemRequiredBehavior.MUST); - if ("could".equals(codeString)) - return new Enumeration(this, OrderSetItemRequiredBehavior.COULD); - if ("must-unless-documented".equals(codeString)) - return new Enumeration(this, OrderSetItemRequiredBehavior.MUSTUNLESSDOCUMENTED); - throw new FHIRException("Unknown OrderSetItemRequiredBehavior code '"+codeString+"'"); - } - public String toCode(OrderSetItemRequiredBehavior code) { - if (code == OrderSetItemRequiredBehavior.MUST) - return "must"; - if (code == OrderSetItemRequiredBehavior.COULD) - return "could"; - if (code == OrderSetItemRequiredBehavior.MUSTUNLESSDOCUMENTED) - return "must-unless-documented"; - return "?"; - } - public String toSystem(OrderSetItemRequiredBehavior code) { - return code.getSystem(); - } - } - - public enum OrderSetItemPrecheckBehavior { - /** - * An item with this behavior is one of the most frequent items that is, or should be, included by an end user, for the particular context in which the item occurs. The system displaying the item to the end user should consider "pre-checking" such an item as a convenience for the user - */ - YES, - /** - * An item with this behavior is one of the less frequent items included by the end user, for the particular context in which the item occurs. The system displaying the items to the end user would typically not "pre-check" such an item - */ - NO, - /** - * added to help the parsers - */ - NULL; - public static OrderSetItemPrecheckBehavior fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("yes".equals(codeString)) - return YES; - if ("no".equals(codeString)) - return NO; - throw new FHIRException("Unknown OrderSetItemPrecheckBehavior code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case YES: return "yes"; - case NO: return "no"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case YES: return "http://hl7.org/fhir/precheck-behavior"; - case NO: return "http://hl7.org/fhir/precheck-behavior"; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case YES: return "An item with this behavior is one of the most frequent items that is, or should be, included by an end user, for the particular context in which the item occurs. The system displaying the item to the end user should consider \"pre-checking\" such an item as a convenience for the user"; - case NO: return "An item with this behavior is one of the less frequent items included by the end user, for the particular context in which the item occurs. The system displaying the items to the end user would typically not \"pre-check\" such an item"; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case YES: return "Yes"; - case NO: return "No"; - default: return "?"; - } - } - } - - public static class OrderSetItemPrecheckBehaviorEnumFactory implements EnumFactory { - public OrderSetItemPrecheckBehavior fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("yes".equals(codeString)) - return OrderSetItemPrecheckBehavior.YES; - if ("no".equals(codeString)) - return OrderSetItemPrecheckBehavior.NO; - throw new IllegalArgumentException("Unknown OrderSetItemPrecheckBehavior code '"+codeString+"'"); - } - public Enumeration fromType(Base code) throws FHIRException { - if (code == null || code.isEmpty()) - return null; - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return null; - if ("yes".equals(codeString)) - return new Enumeration(this, OrderSetItemPrecheckBehavior.YES); - if ("no".equals(codeString)) - return new Enumeration(this, OrderSetItemPrecheckBehavior.NO); - throw new FHIRException("Unknown OrderSetItemPrecheckBehavior code '"+codeString+"'"); - } - public String toCode(OrderSetItemPrecheckBehavior code) { - if (code == OrderSetItemPrecheckBehavior.YES) - return "yes"; - if (code == OrderSetItemPrecheckBehavior.NO) - return "no"; - return "?"; - } - public String toSystem(OrderSetItemPrecheckBehavior code) { - return code.getSystem(); - } - } - - public enum OrderSetItemCardinalityBehavior { - /** - * The item may only be selected one time - */ - SINGLE, - /** - * The item may be selected multiple times - */ - MULTIPLE, - /** - * added to help the parsers - */ - NULL; - public static OrderSetItemCardinalityBehavior fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("single".equals(codeString)) - return SINGLE; - if ("multiple".equals(codeString)) - return MULTIPLE; - throw new FHIRException("Unknown OrderSetItemCardinalityBehavior code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case SINGLE: return "single"; - case MULTIPLE: return "multiple"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case SINGLE: return "http://hl7.org/fhir/cardinality-behavior"; - case MULTIPLE: return "http://hl7.org/fhir/cardinality-behavior"; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case SINGLE: return "The item may only be selected one time"; - case MULTIPLE: return "The item may be selected multiple times"; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case SINGLE: return "Single"; - case MULTIPLE: return "Multiple"; - default: return "?"; - } - } - } - - public static class OrderSetItemCardinalityBehaviorEnumFactory implements EnumFactory { - public OrderSetItemCardinalityBehavior fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("single".equals(codeString)) - return OrderSetItemCardinalityBehavior.SINGLE; - if ("multiple".equals(codeString)) - return OrderSetItemCardinalityBehavior.MULTIPLE; - throw new IllegalArgumentException("Unknown OrderSetItemCardinalityBehavior code '"+codeString+"'"); - } - public Enumeration fromType(Base code) throws FHIRException { - if (code == null || code.isEmpty()) - return null; - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return null; - if ("single".equals(codeString)) - return new Enumeration(this, OrderSetItemCardinalityBehavior.SINGLE); - if ("multiple".equals(codeString)) - return new Enumeration(this, OrderSetItemCardinalityBehavior.MULTIPLE); - throw new FHIRException("Unknown OrderSetItemCardinalityBehavior code '"+codeString+"'"); - } - public String toCode(OrderSetItemCardinalityBehavior code) { - if (code == OrderSetItemCardinalityBehavior.SINGLE) - return "single"; - if (code == OrderSetItemCardinalityBehavior.MULTIPLE) - return "multiple"; - return "?"; - } - public String toSystem(OrderSetItemCardinalityBehavior code) { - return code.getSystem(); - } - } - - @Block() - public static class OrderSetItemComponent extends BackboneElement implements IBaseBackboneElement { - /** - * A unique identifier for the item. - */ - @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="A unique identifier for the item." ) - protected Identifier identifier; - - /** - * A user-visible number for the item. - */ - @Child(name = "number", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="A user-visible number for the item." ) - protected StringType number; - - /** - * The title of the item. - */ - @Child(name = "title", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The title of the item." ) - protected StringType title; - - /** - * A short description of the item. - */ - @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="A short description of the item." ) - protected StringType description; - - /** - * A text equivalent of the item in the orderset. - */ - @Child(name = "textEquivalent", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="A text equivalent of the item in the orderset." ) - protected StringType textEquivalent; - - /** - * Supporting evidence for the item. - */ - @Child(name = "supportingEvidence", type = {Attachment.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Supporting evidence for the item." ) - protected List supportingEvidence; - - /** - * Supporting documentation for the item. - */ - @Child(name = "documentation", type = {Attachment.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Supporting documentation for the item." ) - protected List documentation; - - /** - * The type of participant in the item. - */ - @Child(name = "participantType", type = {CodeType.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="patient | person | practitioner | related-person", formalDefinition="The type of participant in the item." ) - protected List> participantType; - - /** - * Concepts associated with the item. - */ - @Child(name = "concept", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Concepts associated with the item." ) - protected List concept; - - /** - * The type of item (create, update, remove). - */ - @Child(name = "type", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="create | update | remove | fire-event", formalDefinition="The type of item (create, update, remove)." ) - protected Enumeration type; - - /** - * Defines organization behavior of a group: gives the reason why the items are grouped together. - */ - @Child(name = "groupingBehavior", type = {CodeType.class}, order=11, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="visual-group | logical-group | sentence-group", formalDefinition="Defines organization behavior of a group: gives the reason why the items are grouped together." ) - protected Enumeration groupingBehavior; - - /** - * Defines selection behavior of a group: specifies the number of selectable items in the group that may be selected by the end user when the items of the group are displayed. - */ - @Child(name = "selectionBehavior", type = {CodeType.class}, order=12, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="any | all | all-or-none | exactly-one | at-most-one | one-or-more", formalDefinition="Defines selection behavior of a group: specifies the number of selectable items in the group that may be selected by the end user when the items of the group are displayed." ) - protected Enumeration selectionBehavior; - - /** - * Defines requiredness behavior for selecting an action or an action group; i.e., whether the action or action group is required or optional. - */ - @Child(name = "requiredBehavior", type = {CodeType.class}, order=13, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="must | could | must-unless-documented", formalDefinition="Defines requiredness behavior for selecting an action or an action group; i.e., whether the action or action group is required or optional." ) - protected Enumeration requiredBehavior; - - /** - * Defines selection frequency behavior for an action or group; i.e., for most frequently selected items, the end-user system may provide convenience options in the UI (such as pre-selection) in order to (1) communicate to the end user what the most frequently selected item is, or should, be in a particular context, and (2) save the end user time. - */ - @Child(name = "precheckBehavior", type = {CodeType.class}, order=14, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="yes | no", formalDefinition="Defines selection frequency behavior for an action or group; i.e., for most frequently selected items, the end-user system may provide convenience options in the UI (such as pre-selection) in order to (1) communicate to the end user what the most frequently selected item is, or should, be in a particular context, and (2) save the end user time." ) - protected Enumeration precheckBehavior; - - /** - * Defines behavior for an action or a group for how many times that item may be repeated, i.e., cardinality. For example, if a user is documenting lesions, the lesion element may be repeated several times, once for each occurrence of a lesion on the patient or tissue sample or image. - */ - @Child(name = "cardinalityBehavior", type = {CodeType.class}, order=15, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="single | multiple", formalDefinition="Defines behavior for an action or a group for how many times that item may be repeated, i.e., cardinality. For example, if a user is documenting lesions, the lesion element may be repeated several times, once for each occurrence of a lesion on the patient or tissue sample or image." ) - protected Enumeration cardinalityBehavior; - - /** - * The resource that is the target of the item (e.g. CommunicationRequest). - */ - @Child(name = "resource", type = {}, order=16, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The resource that is the target of the item (e.g. CommunicationRequest)." ) - protected Reference resource; - - /** - * The actual object that is the target of the reference (The resource that is the target of the item (e.g. CommunicationRequest).) - */ - protected Resource resourceTarget; - - /** - * Customizations that should be applied to the statically defined resource. - */ - @Child(name = "customization", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Customizations that should be applied to the statically defined resource." ) - protected List customization; - - /** - * Sub items for the orderable. - */ - @Child(name = "items", type = {OrderSetItemComponent.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="Sub items for the orderable." ) - protected List items; - - private static final long serialVersionUID = -357042086L; - - /** - * Constructor - */ - public OrderSetItemComponent() { - super(); - } - - /** - * @return {@link #identifier} (A unique identifier for the item.) - */ - public Identifier getIdentifier() { - if (this.identifier == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrderSetItemComponent.identifier"); - else if (Configuration.doAutoCreate()) - this.identifier = new Identifier(); // cc - return this.identifier; - } - - public boolean hasIdentifier() { - return this.identifier != null && !this.identifier.isEmpty(); - } - - /** - * @param value {@link #identifier} (A unique identifier for the item.) - */ - public OrderSetItemComponent setIdentifier(Identifier value) { - this.identifier = value; - return this; - } - - /** - * @return {@link #number} (A user-visible number for the item.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value - */ - public StringType getNumberElement() { - if (this.number == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrderSetItemComponent.number"); - else if (Configuration.doAutoCreate()) - this.number = new StringType(); // bb - return this.number; - } - - public boolean hasNumberElement() { - return this.number != null && !this.number.isEmpty(); - } - - public boolean hasNumber() { - return this.number != null && !this.number.isEmpty(); - } - - /** - * @param value {@link #number} (A user-visible number for the item.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value - */ - public OrderSetItemComponent setNumberElement(StringType value) { - this.number = value; - return this; - } - - /** - * @return A user-visible number for the item. - */ - public String getNumber() { - return this.number == null ? null : this.number.getValue(); - } - - /** - * @param value A user-visible number for the item. - */ - public OrderSetItemComponent setNumber(String value) { - if (Utilities.noString(value)) - this.number = null; - else { - if (this.number == null) - this.number = new StringType(); - this.number.setValue(value); - } - return this; - } - - /** - * @return {@link #title} (The title of the item.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value - */ - public StringType getTitleElement() { - if (this.title == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrderSetItemComponent.title"); - else if (Configuration.doAutoCreate()) - this.title = new StringType(); // bb - return this.title; - } - - public boolean hasTitleElement() { - return this.title != null && !this.title.isEmpty(); - } - - public boolean hasTitle() { - return this.title != null && !this.title.isEmpty(); - } - - /** - * @param value {@link #title} (The title of the item.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value - */ - public OrderSetItemComponent setTitleElement(StringType value) { - this.title = value; - return this; - } - - /** - * @return The title of the item. - */ - public String getTitle() { - return this.title == null ? null : this.title.getValue(); - } - - /** - * @param value The title of the item. - */ - public OrderSetItemComponent setTitle(String value) { - if (Utilities.noString(value)) - this.title = null; - else { - if (this.title == null) - this.title = new StringType(); - this.title.setValue(value); - } - return this; - } - - /** - * @return {@link #description} (A short description of the item.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public StringType getDescriptionElement() { - if (this.description == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrderSetItemComponent.description"); - else if (Configuration.doAutoCreate()) - this.description = new StringType(); // bb - return this.description; - } - - public boolean hasDescriptionElement() { - return this.description != null && !this.description.isEmpty(); - } - - public boolean hasDescription() { - return this.description != null && !this.description.isEmpty(); - } - - /** - * @param value {@link #description} (A short description of the item.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value - */ - public OrderSetItemComponent setDescriptionElement(StringType value) { - this.description = value; - return this; - } - - /** - * @return A short description of the item. - */ - public String getDescription() { - return this.description == null ? null : this.description.getValue(); - } - - /** - * @param value A short description of the item. - */ - public OrderSetItemComponent setDescription(String value) { - if (Utilities.noString(value)) - this.description = null; - else { - if (this.description == null) - this.description = new StringType(); - this.description.setValue(value); - } - return this; - } - - /** - * @return {@link #textEquivalent} (A text equivalent of the item in the orderset.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value - */ - public StringType getTextEquivalentElement() { - if (this.textEquivalent == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrderSetItemComponent.textEquivalent"); - else if (Configuration.doAutoCreate()) - this.textEquivalent = new StringType(); // bb - return this.textEquivalent; - } - - public boolean hasTextEquivalentElement() { - return this.textEquivalent != null && !this.textEquivalent.isEmpty(); - } - - public boolean hasTextEquivalent() { - return this.textEquivalent != null && !this.textEquivalent.isEmpty(); - } - - /** - * @param value {@link #textEquivalent} (A text equivalent of the item in the orderset.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value - */ - public OrderSetItemComponent setTextEquivalentElement(StringType value) { - this.textEquivalent = value; - return this; - } - - /** - * @return A text equivalent of the item in the orderset. - */ - public String getTextEquivalent() { - return this.textEquivalent == null ? null : this.textEquivalent.getValue(); - } - - /** - * @param value A text equivalent of the item in the orderset. - */ - public OrderSetItemComponent setTextEquivalent(String value) { - if (Utilities.noString(value)) - this.textEquivalent = null; - else { - if (this.textEquivalent == null) - this.textEquivalent = new StringType(); - this.textEquivalent.setValue(value); - } - return this; - } - - /** - * @return {@link #supportingEvidence} (Supporting evidence for the item.) - */ - public List getSupportingEvidence() { - if (this.supportingEvidence == null) - this.supportingEvidence = new ArrayList(); - return this.supportingEvidence; - } - - public boolean hasSupportingEvidence() { - if (this.supportingEvidence == null) - return false; - for (Attachment item : this.supportingEvidence) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #supportingEvidence} (Supporting evidence for the item.) - */ - // syntactic sugar - public Attachment addSupportingEvidence() { //3 - Attachment t = new Attachment(); - if (this.supportingEvidence == null) - this.supportingEvidence = new ArrayList(); - this.supportingEvidence.add(t); - return t; - } - - // syntactic sugar - public OrderSetItemComponent addSupportingEvidence(Attachment t) { //3 - if (t == null) - return this; - if (this.supportingEvidence == null) - this.supportingEvidence = new ArrayList(); - this.supportingEvidence.add(t); - return this; - } - - /** - * @return {@link #documentation} (Supporting documentation for the item.) - */ - public List getDocumentation() { - if (this.documentation == null) - this.documentation = new ArrayList(); - return this.documentation; - } - - public boolean hasDocumentation() { - if (this.documentation == null) - return false; - for (Attachment item : this.documentation) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #documentation} (Supporting documentation for the item.) - */ - // syntactic sugar - public Attachment addDocumentation() { //3 - Attachment t = new Attachment(); - if (this.documentation == null) - this.documentation = new ArrayList(); - this.documentation.add(t); - return t; - } - - // syntactic sugar - public OrderSetItemComponent addDocumentation(Attachment t) { //3 - if (t == null) - return this; - if (this.documentation == null) - this.documentation = new ArrayList(); - this.documentation.add(t); - return this; - } - - /** - * @return {@link #participantType} (The type of participant in the item.) - */ - public List> getParticipantType() { - if (this.participantType == null) - this.participantType = new ArrayList>(); - return this.participantType; - } - - public boolean hasParticipantType() { - if (this.participantType == null) - return false; - for (Enumeration item : this.participantType) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #participantType} (The type of participant in the item.) - */ - // syntactic sugar - public Enumeration addParticipantTypeElement() {//2 - Enumeration t = new Enumeration(new OrderSetParticipantTypeEnumFactory()); - if (this.participantType == null) - this.participantType = new ArrayList>(); - this.participantType.add(t); - return t; - } - - /** - * @param value {@link #participantType} (The type of participant in the item.) - */ - public OrderSetItemComponent addParticipantType(OrderSetParticipantType value) { //1 - Enumeration t = new Enumeration(new OrderSetParticipantTypeEnumFactory()); - t.setValue(value); - if (this.participantType == null) - this.participantType = new ArrayList>(); - this.participantType.add(t); - return this; - } - - /** - * @param value {@link #participantType} (The type of participant in the item.) - */ - public boolean hasParticipantType(OrderSetParticipantType value) { - if (this.participantType == null) - return false; - for (Enumeration v : this.participantType) - if (v.equals(value)) // code - return true; - return false; - } - - /** - * @return {@link #concept} (Concepts associated with the item.) - */ - public List getConcept() { - if (this.concept == null) - this.concept = new ArrayList(); - return this.concept; - } - - public boolean hasConcept() { - if (this.concept == null) - return false; - for (CodeableConcept item : this.concept) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #concept} (Concepts associated with the item.) - */ - // syntactic sugar - public CodeableConcept addConcept() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.concept == null) - this.concept = new ArrayList(); - this.concept.add(t); - return t; - } - - // syntactic sugar - public OrderSetItemComponent addConcept(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.concept == null) - this.concept = new ArrayList(); - this.concept.add(t); - return this; - } - - /** - * @return {@link #type} (The type of item (create, update, remove).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value - */ - public Enumeration getTypeElement() { - if (this.type == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrderSetItemComponent.type"); - else if (Configuration.doAutoCreate()) - this.type = new Enumeration(new OrderSetItemTypeEnumFactory()); // bb - return this.type; - } - - public boolean hasTypeElement() { - return this.type != null && !this.type.isEmpty(); - } - - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); - } - - /** - * @param value {@link #type} (The type of item (create, update, remove).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value - */ - public OrderSetItemComponent setTypeElement(Enumeration value) { - this.type = value; - return this; - } - - /** - * @return The type of item (create, update, remove). - */ - public OrderSetItemType getType() { - return this.type == null ? null : this.type.getValue(); - } - - /** - * @param value The type of item (create, update, remove). - */ - public OrderSetItemComponent setType(OrderSetItemType value) { - if (value == null) - this.type = null; - else { - if (this.type == null) - this.type = new Enumeration(new OrderSetItemTypeEnumFactory()); - this.type.setValue(value); - } - return this; - } - - /** - * @return {@link #groupingBehavior} (Defines organization behavior of a group: gives the reason why the items are grouped together.). This is the underlying object with id, value and extensions. The accessor "getGroupingBehavior" gives direct access to the value - */ - public Enumeration getGroupingBehaviorElement() { - if (this.groupingBehavior == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrderSetItemComponent.groupingBehavior"); - else if (Configuration.doAutoCreate()) - this.groupingBehavior = new Enumeration(new OrderSetItemGroupingBehaviorEnumFactory()); // bb - return this.groupingBehavior; - } - - public boolean hasGroupingBehaviorElement() { - return this.groupingBehavior != null && !this.groupingBehavior.isEmpty(); - } - - public boolean hasGroupingBehavior() { - return this.groupingBehavior != null && !this.groupingBehavior.isEmpty(); - } - - /** - * @param value {@link #groupingBehavior} (Defines organization behavior of a group: gives the reason why the items are grouped together.). This is the underlying object with id, value and extensions. The accessor "getGroupingBehavior" gives direct access to the value - */ - public OrderSetItemComponent setGroupingBehaviorElement(Enumeration value) { - this.groupingBehavior = value; - return this; - } - - /** - * @return Defines organization behavior of a group: gives the reason why the items are grouped together. - */ - public OrderSetItemGroupingBehavior getGroupingBehavior() { - return this.groupingBehavior == null ? null : this.groupingBehavior.getValue(); - } - - /** - * @param value Defines organization behavior of a group: gives the reason why the items are grouped together. - */ - public OrderSetItemComponent setGroupingBehavior(OrderSetItemGroupingBehavior value) { - if (value == null) - this.groupingBehavior = null; - else { - if (this.groupingBehavior == null) - this.groupingBehavior = new Enumeration(new OrderSetItemGroupingBehaviorEnumFactory()); - this.groupingBehavior.setValue(value); - } - return this; - } - - /** - * @return {@link #selectionBehavior} (Defines selection behavior of a group: specifies the number of selectable items in the group that may be selected by the end user when the items of the group are displayed.). This is the underlying object with id, value and extensions. The accessor "getSelectionBehavior" gives direct access to the value - */ - public Enumeration getSelectionBehaviorElement() { - if (this.selectionBehavior == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrderSetItemComponent.selectionBehavior"); - else if (Configuration.doAutoCreate()) - this.selectionBehavior = new Enumeration(new OrderSetItemSelectionBehaviorEnumFactory()); // bb - return this.selectionBehavior; - } - - public boolean hasSelectionBehaviorElement() { - return this.selectionBehavior != null && !this.selectionBehavior.isEmpty(); - } - - public boolean hasSelectionBehavior() { - return this.selectionBehavior != null && !this.selectionBehavior.isEmpty(); - } - - /** - * @param value {@link #selectionBehavior} (Defines selection behavior of a group: specifies the number of selectable items in the group that may be selected by the end user when the items of the group are displayed.). This is the underlying object with id, value and extensions. The accessor "getSelectionBehavior" gives direct access to the value - */ - public OrderSetItemComponent setSelectionBehaviorElement(Enumeration value) { - this.selectionBehavior = value; - return this; - } - - /** - * @return Defines selection behavior of a group: specifies the number of selectable items in the group that may be selected by the end user when the items of the group are displayed. - */ - public OrderSetItemSelectionBehavior getSelectionBehavior() { - return this.selectionBehavior == null ? null : this.selectionBehavior.getValue(); - } - - /** - * @param value Defines selection behavior of a group: specifies the number of selectable items in the group that may be selected by the end user when the items of the group are displayed. - */ - public OrderSetItemComponent setSelectionBehavior(OrderSetItemSelectionBehavior value) { - if (value == null) - this.selectionBehavior = null; - else { - if (this.selectionBehavior == null) - this.selectionBehavior = new Enumeration(new OrderSetItemSelectionBehaviorEnumFactory()); - this.selectionBehavior.setValue(value); - } - return this; - } - - /** - * @return {@link #requiredBehavior} (Defines requiredness behavior for selecting an action or an action group; i.e., whether the action or action group is required or optional.). This is the underlying object with id, value and extensions. The accessor "getRequiredBehavior" gives direct access to the value - */ - public Enumeration getRequiredBehaviorElement() { - if (this.requiredBehavior == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrderSetItemComponent.requiredBehavior"); - else if (Configuration.doAutoCreate()) - this.requiredBehavior = new Enumeration(new OrderSetItemRequiredBehaviorEnumFactory()); // bb - return this.requiredBehavior; - } - - public boolean hasRequiredBehaviorElement() { - return this.requiredBehavior != null && !this.requiredBehavior.isEmpty(); - } - - public boolean hasRequiredBehavior() { - return this.requiredBehavior != null && !this.requiredBehavior.isEmpty(); - } - - /** - * @param value {@link #requiredBehavior} (Defines requiredness behavior for selecting an action or an action group; i.e., whether the action or action group is required or optional.). This is the underlying object with id, value and extensions. The accessor "getRequiredBehavior" gives direct access to the value - */ - public OrderSetItemComponent setRequiredBehaviorElement(Enumeration value) { - this.requiredBehavior = value; - return this; - } - - /** - * @return Defines requiredness behavior for selecting an action or an action group; i.e., whether the action or action group is required or optional. - */ - public OrderSetItemRequiredBehavior getRequiredBehavior() { - return this.requiredBehavior == null ? null : this.requiredBehavior.getValue(); - } - - /** - * @param value Defines requiredness behavior for selecting an action or an action group; i.e., whether the action or action group is required or optional. - */ - public OrderSetItemComponent setRequiredBehavior(OrderSetItemRequiredBehavior value) { - if (value == null) - this.requiredBehavior = null; - else { - if (this.requiredBehavior == null) - this.requiredBehavior = new Enumeration(new OrderSetItemRequiredBehaviorEnumFactory()); - this.requiredBehavior.setValue(value); - } - return this; - } - - /** - * @return {@link #precheckBehavior} (Defines selection frequency behavior for an action or group; i.e., for most frequently selected items, the end-user system may provide convenience options in the UI (such as pre-selection) in order to (1) communicate to the end user what the most frequently selected item is, or should, be in a particular context, and (2) save the end user time.). This is the underlying object with id, value and extensions. The accessor "getPrecheckBehavior" gives direct access to the value - */ - public Enumeration getPrecheckBehaviorElement() { - if (this.precheckBehavior == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrderSetItemComponent.precheckBehavior"); - else if (Configuration.doAutoCreate()) - this.precheckBehavior = new Enumeration(new OrderSetItemPrecheckBehaviorEnumFactory()); // bb - return this.precheckBehavior; - } - - public boolean hasPrecheckBehaviorElement() { - return this.precheckBehavior != null && !this.precheckBehavior.isEmpty(); - } - - public boolean hasPrecheckBehavior() { - return this.precheckBehavior != null && !this.precheckBehavior.isEmpty(); - } - - /** - * @param value {@link #precheckBehavior} (Defines selection frequency behavior for an action or group; i.e., for most frequently selected items, the end-user system may provide convenience options in the UI (such as pre-selection) in order to (1) communicate to the end user what the most frequently selected item is, or should, be in a particular context, and (2) save the end user time.). This is the underlying object with id, value and extensions. The accessor "getPrecheckBehavior" gives direct access to the value - */ - public OrderSetItemComponent setPrecheckBehaviorElement(Enumeration value) { - this.precheckBehavior = value; - return this; - } - - /** - * @return Defines selection frequency behavior for an action or group; i.e., for most frequently selected items, the end-user system may provide convenience options in the UI (such as pre-selection) in order to (1) communicate to the end user what the most frequently selected item is, or should, be in a particular context, and (2) save the end user time. - */ - public OrderSetItemPrecheckBehavior getPrecheckBehavior() { - return this.precheckBehavior == null ? null : this.precheckBehavior.getValue(); - } - - /** - * @param value Defines selection frequency behavior for an action or group; i.e., for most frequently selected items, the end-user system may provide convenience options in the UI (such as pre-selection) in order to (1) communicate to the end user what the most frequently selected item is, or should, be in a particular context, and (2) save the end user time. - */ - public OrderSetItemComponent setPrecheckBehavior(OrderSetItemPrecheckBehavior value) { - if (value == null) - this.precheckBehavior = null; - else { - if (this.precheckBehavior == null) - this.precheckBehavior = new Enumeration(new OrderSetItemPrecheckBehaviorEnumFactory()); - this.precheckBehavior.setValue(value); - } - return this; - } - - /** - * @return {@link #cardinalityBehavior} (Defines behavior for an action or a group for how many times that item may be repeated, i.e., cardinality. For example, if a user is documenting lesions, the lesion element may be repeated several times, once for each occurrence of a lesion on the patient or tissue sample or image.). This is the underlying object with id, value and extensions. The accessor "getCardinalityBehavior" gives direct access to the value - */ - public Enumeration getCardinalityBehaviorElement() { - if (this.cardinalityBehavior == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrderSetItemComponent.cardinalityBehavior"); - else if (Configuration.doAutoCreate()) - this.cardinalityBehavior = new Enumeration(new OrderSetItemCardinalityBehaviorEnumFactory()); // bb - return this.cardinalityBehavior; - } - - public boolean hasCardinalityBehaviorElement() { - return this.cardinalityBehavior != null && !this.cardinalityBehavior.isEmpty(); - } - - public boolean hasCardinalityBehavior() { - return this.cardinalityBehavior != null && !this.cardinalityBehavior.isEmpty(); - } - - /** - * @param value {@link #cardinalityBehavior} (Defines behavior for an action or a group for how many times that item may be repeated, i.e., cardinality. For example, if a user is documenting lesions, the lesion element may be repeated several times, once for each occurrence of a lesion on the patient or tissue sample or image.). This is the underlying object with id, value and extensions. The accessor "getCardinalityBehavior" gives direct access to the value - */ - public OrderSetItemComponent setCardinalityBehaviorElement(Enumeration value) { - this.cardinalityBehavior = value; - return this; - } - - /** - * @return Defines behavior for an action or a group for how many times that item may be repeated, i.e., cardinality. For example, if a user is documenting lesions, the lesion element may be repeated several times, once for each occurrence of a lesion on the patient or tissue sample or image. - */ - public OrderSetItemCardinalityBehavior getCardinalityBehavior() { - return this.cardinalityBehavior == null ? null : this.cardinalityBehavior.getValue(); - } - - /** - * @param value Defines behavior for an action or a group for how many times that item may be repeated, i.e., cardinality. For example, if a user is documenting lesions, the lesion element may be repeated several times, once for each occurrence of a lesion on the patient or tissue sample or image. - */ - public OrderSetItemComponent setCardinalityBehavior(OrderSetItemCardinalityBehavior value) { - if (value == null) - this.cardinalityBehavior = null; - else { - if (this.cardinalityBehavior == null) - this.cardinalityBehavior = new Enumeration(new OrderSetItemCardinalityBehaviorEnumFactory()); - this.cardinalityBehavior.setValue(value); - } - return this; - } - - /** - * @return {@link #resource} (The resource that is the target of the item (e.g. CommunicationRequest).) - */ - public Reference getResource() { - if (this.resource == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrderSetItemComponent.resource"); - else if (Configuration.doAutoCreate()) - this.resource = new Reference(); // cc - return this.resource; - } - - public boolean hasResource() { - return this.resource != null && !this.resource.isEmpty(); - } - - /** - * @param value {@link #resource} (The resource that is the target of the item (e.g. CommunicationRequest).) - */ - public OrderSetItemComponent setResource(Reference value) { - this.resource = value; - return this; - } - - /** - * @return {@link #resource} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The resource that is the target of the item (e.g. CommunicationRequest).) - */ - public Resource getResourceTarget() { - return this.resourceTarget; - } - - /** - * @param value {@link #resource} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The resource that is the target of the item (e.g. CommunicationRequest).) - */ - public OrderSetItemComponent setResourceTarget(Resource value) { - this.resourceTarget = value; - return this; - } - - /** - * @return {@link #customization} (Customizations that should be applied to the statically defined resource.) - */ - public List getCustomization() { - if (this.customization == null) - this.customization = new ArrayList(); - return this.customization; - } - - public boolean hasCustomization() { - if (this.customization == null) - return false; - for (OrderSetItemCustomizationComponent item : this.customization) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #customization} (Customizations that should be applied to the statically defined resource.) - */ - // syntactic sugar - public OrderSetItemCustomizationComponent addCustomization() { //3 - OrderSetItemCustomizationComponent t = new OrderSetItemCustomizationComponent(); - if (this.customization == null) - this.customization = new ArrayList(); - this.customization.add(t); - return t; - } - - // syntactic sugar - public OrderSetItemComponent addCustomization(OrderSetItemCustomizationComponent t) { //3 - if (t == null) - return this; - if (this.customization == null) - this.customization = new ArrayList(); - this.customization.add(t); - return this; - } - - /** - * @return {@link #items} (Sub items for the orderable.) - */ - public List getItems() { - if (this.items == null) - this.items = new ArrayList(); - return this.items; - } - - public boolean hasItems() { - if (this.items == null) - return false; - for (OrderSetItemComponent item : this.items) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #items} (Sub items for the orderable.) - */ - // syntactic sugar - public OrderSetItemComponent addItems() { //3 - OrderSetItemComponent t = new OrderSetItemComponent(); - if (this.items == null) - this.items = new ArrayList(); - this.items.add(t); - return t; - } - - // syntactic sugar - public OrderSetItemComponent addItems(OrderSetItemComponent t) { //3 - if (t == null) - return this; - if (this.items == null) - this.items = new ArrayList(); - this.items.add(t); - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "A unique identifier for the item.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("number", "string", "A user-visible number for the item.", 0, java.lang.Integer.MAX_VALUE, number)); - childrenList.add(new Property("title", "string", "The title of the item.", 0, java.lang.Integer.MAX_VALUE, title)); - childrenList.add(new Property("description", "string", "A short description of the item.", 0, java.lang.Integer.MAX_VALUE, description)); - childrenList.add(new Property("textEquivalent", "string", "A text equivalent of the item in the orderset.", 0, java.lang.Integer.MAX_VALUE, textEquivalent)); - childrenList.add(new Property("supportingEvidence", "Attachment", "Supporting evidence for the item.", 0, java.lang.Integer.MAX_VALUE, supportingEvidence)); - childrenList.add(new Property("documentation", "Attachment", "Supporting documentation for the item.", 0, java.lang.Integer.MAX_VALUE, documentation)); - childrenList.add(new Property("participantType", "code", "The type of participant in the item.", 0, java.lang.Integer.MAX_VALUE, participantType)); - childrenList.add(new Property("concept", "CodeableConcept", "Concepts associated with the item.", 0, java.lang.Integer.MAX_VALUE, concept)); - childrenList.add(new Property("type", "code", "The type of item (create, update, remove).", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("groupingBehavior", "code", "Defines organization behavior of a group: gives the reason why the items are grouped together.", 0, java.lang.Integer.MAX_VALUE, groupingBehavior)); - childrenList.add(new Property("selectionBehavior", "code", "Defines selection behavior of a group: specifies the number of selectable items in the group that may be selected by the end user when the items of the group are displayed.", 0, java.lang.Integer.MAX_VALUE, selectionBehavior)); - childrenList.add(new Property("requiredBehavior", "code", "Defines requiredness behavior for selecting an action or an action group; i.e., whether the action or action group is required or optional.", 0, java.lang.Integer.MAX_VALUE, requiredBehavior)); - childrenList.add(new Property("precheckBehavior", "code", "Defines selection frequency behavior for an action or group; i.e., for most frequently selected items, the end-user system may provide convenience options in the UI (such as pre-selection) in order to (1) communicate to the end user what the most frequently selected item is, or should, be in a particular context, and (2) save the end user time.", 0, java.lang.Integer.MAX_VALUE, precheckBehavior)); - childrenList.add(new Property("cardinalityBehavior", "code", "Defines behavior for an action or a group for how many times that item may be repeated, i.e., cardinality. For example, if a user is documenting lesions, the lesion element may be repeated several times, once for each occurrence of a lesion on the patient or tissue sample or image.", 0, java.lang.Integer.MAX_VALUE, cardinalityBehavior)); - childrenList.add(new Property("resource", "Reference(Any)", "The resource that is the target of the item (e.g. CommunicationRequest).", 0, java.lang.Integer.MAX_VALUE, resource)); - childrenList.add(new Property("customization", "", "Customizations that should be applied to the statically defined resource.", 0, java.lang.Integer.MAX_VALUE, customization)); - childrenList.add(new Property("items", "@OrderSet.item", "Sub items for the orderable.", 0, java.lang.Integer.MAX_VALUE, items)); - } - - @Override - public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("identifier")) - this.identifier = castToIdentifier(value); // Identifier - else if (name.equals("number")) - this.number = castToString(value); // StringType - else if (name.equals("title")) - this.title = castToString(value); // StringType - else if (name.equals("description")) - this.description = castToString(value); // StringType - else if (name.equals("textEquivalent")) - this.textEquivalent = castToString(value); // StringType - else if (name.equals("supportingEvidence")) - this.getSupportingEvidence().add(castToAttachment(value)); - else if (name.equals("documentation")) - this.getDocumentation().add(castToAttachment(value)); - else if (name.equals("participantType")) - this.getParticipantType().add(new OrderSetParticipantTypeEnumFactory().fromType(value)); - else if (name.equals("concept")) - this.getConcept().add(castToCodeableConcept(value)); - else if (name.equals("type")) - this.type = new OrderSetItemTypeEnumFactory().fromType(value); // Enumeration - else if (name.equals("groupingBehavior")) - this.groupingBehavior = new OrderSetItemGroupingBehaviorEnumFactory().fromType(value); // Enumeration - else if (name.equals("selectionBehavior")) - this.selectionBehavior = new OrderSetItemSelectionBehaviorEnumFactory().fromType(value); // Enumeration - else if (name.equals("requiredBehavior")) - this.requiredBehavior = new OrderSetItemRequiredBehaviorEnumFactory().fromType(value); // Enumeration - else if (name.equals("precheckBehavior")) - this.precheckBehavior = new OrderSetItemPrecheckBehaviorEnumFactory().fromType(value); // Enumeration - else if (name.equals("cardinalityBehavior")) - this.cardinalityBehavior = new OrderSetItemCardinalityBehaviorEnumFactory().fromType(value); // Enumeration - else if (name.equals("resource")) - this.resource = castToReference(value); // Reference - else if (name.equals("customization")) - this.getCustomization().add((OrderSetItemCustomizationComponent) value); - else if (name.equals("items")) - this.getItems().add((OrderSetItemComponent) value); - else - super.setProperty(name, value); - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("identifier")) { - this.identifier = new Identifier(); - return this.identifier; - } - else if (name.equals("number")) { - throw new FHIRException("Cannot call addChild on a primitive type OrderSet.number"); - } - else if (name.equals("title")) { - throw new FHIRException("Cannot call addChild on a primitive type OrderSet.title"); - } - else if (name.equals("description")) { - throw new FHIRException("Cannot call addChild on a primitive type OrderSet.description"); - } - else if (name.equals("textEquivalent")) { - throw new FHIRException("Cannot call addChild on a primitive type OrderSet.textEquivalent"); - } - else if (name.equals("supportingEvidence")) { - return addSupportingEvidence(); - } - else if (name.equals("documentation")) { - return addDocumentation(); - } - else if (name.equals("participantType")) { - throw new FHIRException("Cannot call addChild on a primitive type OrderSet.participantType"); - } - else if (name.equals("concept")) { - return addConcept(); - } - else if (name.equals("type")) { - throw new FHIRException("Cannot call addChild on a primitive type OrderSet.type"); - } - else if (name.equals("groupingBehavior")) { - throw new FHIRException("Cannot call addChild on a primitive type OrderSet.groupingBehavior"); - } - else if (name.equals("selectionBehavior")) { - throw new FHIRException("Cannot call addChild on a primitive type OrderSet.selectionBehavior"); - } - else if (name.equals("requiredBehavior")) { - throw new FHIRException("Cannot call addChild on a primitive type OrderSet.requiredBehavior"); - } - else if (name.equals("precheckBehavior")) { - throw new FHIRException("Cannot call addChild on a primitive type OrderSet.precheckBehavior"); - } - else if (name.equals("cardinalityBehavior")) { - throw new FHIRException("Cannot call addChild on a primitive type OrderSet.cardinalityBehavior"); - } - else if (name.equals("resource")) { - this.resource = new Reference(); - return this.resource; - } - else if (name.equals("customization")) { - return addCustomization(); - } - else if (name.equals("items")) { - return addItems(); - } - else - return super.addChild(name); - } - - public OrderSetItemComponent copy() { - OrderSetItemComponent dst = new OrderSetItemComponent(); - copyValues(dst); - dst.identifier = identifier == null ? null : identifier.copy(); - dst.number = number == null ? null : number.copy(); - dst.title = title == null ? null : title.copy(); - dst.description = description == null ? null : description.copy(); - dst.textEquivalent = textEquivalent == null ? null : textEquivalent.copy(); - if (supportingEvidence != null) { - dst.supportingEvidence = new ArrayList(); - for (Attachment i : supportingEvidence) - dst.supportingEvidence.add(i.copy()); - }; - if (documentation != null) { - dst.documentation = new ArrayList(); - for (Attachment i : documentation) - dst.documentation.add(i.copy()); - }; - if (participantType != null) { - dst.participantType = new ArrayList>(); - for (Enumeration i : participantType) - dst.participantType.add(i.copy()); - }; - if (concept != null) { - dst.concept = new ArrayList(); - for (CodeableConcept i : concept) - dst.concept.add(i.copy()); - }; - dst.type = type == null ? null : type.copy(); - dst.groupingBehavior = groupingBehavior == null ? null : groupingBehavior.copy(); - dst.selectionBehavior = selectionBehavior == null ? null : selectionBehavior.copy(); - dst.requiredBehavior = requiredBehavior == null ? null : requiredBehavior.copy(); - dst.precheckBehavior = precheckBehavior == null ? null : precheckBehavior.copy(); - dst.cardinalityBehavior = cardinalityBehavior == null ? null : cardinalityBehavior.copy(); - dst.resource = resource == null ? null : resource.copy(); - if (customization != null) { - dst.customization = new ArrayList(); - for (OrderSetItemCustomizationComponent i : customization) - dst.customization.add(i.copy()); - }; - if (items != null) { - dst.items = new ArrayList(); - for (OrderSetItemComponent i : items) - dst.items.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof OrderSetItemComponent)) - return false; - OrderSetItemComponent o = (OrderSetItemComponent) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(number, o.number, true) && compareDeep(title, o.title, true) - && compareDeep(description, o.description, true) && compareDeep(textEquivalent, o.textEquivalent, true) - && compareDeep(supportingEvidence, o.supportingEvidence, true) && compareDeep(documentation, o.documentation, true) - && compareDeep(participantType, o.participantType, true) && compareDeep(concept, o.concept, true) - && compareDeep(type, o.type, true) && compareDeep(groupingBehavior, o.groupingBehavior, true) && compareDeep(selectionBehavior, o.selectionBehavior, true) - && compareDeep(requiredBehavior, o.requiredBehavior, true) && compareDeep(precheckBehavior, o.precheckBehavior, true) - && compareDeep(cardinalityBehavior, o.cardinalityBehavior, true) && compareDeep(resource, o.resource, true) - && compareDeep(customization, o.customization, true) && compareDeep(items, o.items, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof OrderSetItemComponent)) - return false; - OrderSetItemComponent o = (OrderSetItemComponent) other; - return compareValues(number, o.number, true) && compareValues(title, o.title, true) && compareValues(description, o.description, true) - && compareValues(textEquivalent, o.textEquivalent, true) && compareValues(participantType, o.participantType, true) - && compareValues(type, o.type, true) && compareValues(groupingBehavior, o.groupingBehavior, true) && compareValues(selectionBehavior, o.selectionBehavior, true) - && compareValues(requiredBehavior, o.requiredBehavior, true) && compareValues(precheckBehavior, o.precheckBehavior, true) - && compareValues(cardinalityBehavior, o.cardinalityBehavior, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (number == null || number.isEmpty()) - && (title == null || title.isEmpty()) && (description == null || description.isEmpty()) && (textEquivalent == null || textEquivalent.isEmpty()) - && (supportingEvidence == null || supportingEvidence.isEmpty()) && (documentation == null || documentation.isEmpty()) - && (participantType == null || participantType.isEmpty()) && (concept == null || concept.isEmpty()) - && (type == null || type.isEmpty()) && (groupingBehavior == null || groupingBehavior.isEmpty()) - && (selectionBehavior == null || selectionBehavior.isEmpty()) && (requiredBehavior == null || requiredBehavior.isEmpty()) - && (precheckBehavior == null || precheckBehavior.isEmpty()) && (cardinalityBehavior == null || cardinalityBehavior.isEmpty()) - && (resource == null || resource.isEmpty()) && (customization == null || customization.isEmpty()) - && (items == null || items.isEmpty()); - } - - public String fhirType() { - return "OrderSet.item"; - - } - - } - - @Block() - public static class OrderSetItemCustomizationComponent extends BackboneElement implements IBaseBackboneElement { - /** - * The path to the element to be customized. - */ - @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The path to the element to be customized." ) - protected StringType path; - - /** - * An expression specifying the value of the customized element. - */ - @Child(name = "expression", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="An expression specifying the value of the customized element." ) - protected StringType expression; - - private static final long serialVersionUID = -252690483L; - - /** - * Constructor - */ - public OrderSetItemCustomizationComponent() { - super(); - } - - /** - * Constructor - */ - public OrderSetItemCustomizationComponent(StringType path, StringType expression) { - super(); - this.path = path; - this.expression = expression; - } - - /** - * @return {@link #path} (The path to the element to be customized.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value - */ - public StringType getPathElement() { - if (this.path == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrderSetItemCustomizationComponent.path"); - else if (Configuration.doAutoCreate()) - this.path = new StringType(); // bb - return this.path; - } - - public boolean hasPathElement() { - return this.path != null && !this.path.isEmpty(); - } - - public boolean hasPath() { - return this.path != null && !this.path.isEmpty(); - } - - /** - * @param value {@link #path} (The path to the element to be customized.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value - */ - public OrderSetItemCustomizationComponent setPathElement(StringType value) { - this.path = value; - return this; - } - - /** - * @return The path to the element to be customized. - */ - public String getPath() { - return this.path == null ? null : this.path.getValue(); - } - - /** - * @param value The path to the element to be customized. - */ - public OrderSetItemCustomizationComponent setPath(String value) { - if (this.path == null) - this.path = new StringType(); - this.path.setValue(value); - return this; - } - - /** - * @return {@link #expression} (An expression specifying the value of the customized element.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value - */ - public StringType getExpressionElement() { - if (this.expression == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrderSetItemCustomizationComponent.expression"); - else if (Configuration.doAutoCreate()) - this.expression = new StringType(); // bb - return this.expression; - } - - public boolean hasExpressionElement() { - return this.expression != null && !this.expression.isEmpty(); - } - - public boolean hasExpression() { - return this.expression != null && !this.expression.isEmpty(); - } - - /** - * @param value {@link #expression} (An expression specifying the value of the customized element.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value - */ - public OrderSetItemCustomizationComponent setExpressionElement(StringType value) { - this.expression = value; - return this; - } - - /** - * @return An expression specifying the value of the customized element. - */ - public String getExpression() { - return this.expression == null ? null : this.expression.getValue(); - } - - /** - * @param value An expression specifying the value of the customized element. - */ - public OrderSetItemCustomizationComponent setExpression(String value) { - if (this.expression == null) - this.expression = new StringType(); - this.expression.setValue(value); - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("path", "string", "The path to the element to be customized.", 0, java.lang.Integer.MAX_VALUE, path)); - childrenList.add(new Property("expression", "string", "An expression specifying the value of the customized element.", 0, java.lang.Integer.MAX_VALUE, expression)); - } - - @Override - public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("path")) - this.path = castToString(value); // StringType - else if (name.equals("expression")) - this.expression = castToString(value); // StringType - else - super.setProperty(name, value); - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("path")) { - throw new FHIRException("Cannot call addChild on a primitive type OrderSet.path"); - } - else if (name.equals("expression")) { - throw new FHIRException("Cannot call addChild on a primitive type OrderSet.expression"); - } - else - return super.addChild(name); - } - - public OrderSetItemCustomizationComponent copy() { - OrderSetItemCustomizationComponent dst = new OrderSetItemCustomizationComponent(); - copyValues(dst); - dst.path = path == null ? null : path.copy(); - dst.expression = expression == null ? null : expression.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof OrderSetItemCustomizationComponent)) - return false; - OrderSetItemCustomizationComponent o = (OrderSetItemCustomizationComponent) other; - return compareDeep(path, o.path, true) && compareDeep(expression, o.expression, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof OrderSetItemCustomizationComponent)) - return false; - OrderSetItemCustomizationComponent o = (OrderSetItemCustomizationComponent) other; - return compareValues(path, o.path, true) && compareValues(expression, o.expression, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (path == null || path.isEmpty()) && (expression == null || expression.isEmpty()) - ; - } - - public String fhirType() { - return "OrderSet.item.customization"; - - } - - } - - /** - * A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact. - */ - @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Logical identifier", formalDefinition="A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact." ) - protected List identifier; - - /** - * The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. - */ - @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="The version of the module, if any", formalDefinition="The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification." ) - protected StringType version; - /** * A reference to a ModuleMetadata resource containing metadata for the orderset. */ - @Child(name = "moduleMetadata", type = {ModuleMetadata.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Child(name = "moduleMetadata", type = {ModuleMetadata.class}, order=0, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="The metadata for the orderset", formalDefinition="A reference to a ModuleMetadata resource containing metadata for the orderset." ) - protected Reference moduleMetadata; - - /** - * The actual object that is the target of the reference (A reference to a ModuleMetadata resource containing metadata for the orderset.) - */ - protected ModuleMetadata moduleMetadataTarget; + protected ModuleMetadata moduleMetadata; /** * A reference to a Library resource containing any formal logic used by the orderset. */ - @Child(name = "library", type = {Library.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "library", type = {Library.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Logic used by the orderset", formalDefinition="A reference to a Library resource containing any formal logic used by the orderset." ) protected List library; /** @@ -2221,13 +66,13 @@ public class OrderSet extends DomainResource { /** - * The definition of the items that make up the orderset. + * The definition of the actions that make up the order set. Order set groups and sections are represented as actions which contain sub-actions. */ - @Child(name = "item", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="", formalDefinition="The definition of the items that make up the orderset." ) - protected List item; + @Child(name = "action", type = {ActionDefinition.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Groups, sections, and line items of the order set", formalDefinition="The definition of the actions that make up the order set. Order set groups and sections are represented as actions which contain sub-actions." ) + protected List action; - private static final long serialVersionUID = -1392358630L; + private static final long serialVersionUID = -728217200L; /** * Constructor @@ -2236,104 +81,15 @@ public class OrderSet extends DomainResource { super(); } - /** - * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) - */ - public List getIdentifier() { - if (this.identifier == null) - this.identifier = new ArrayList(); - return this.identifier; - } - - public boolean hasIdentifier() { - if (this.identifier == null) - return false; - for (Identifier item : this.identifier) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #identifier} (A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.) - */ - // syntactic sugar - public Identifier addIdentifier() { //3 - Identifier t = new Identifier(); - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return t; - } - - // syntactic sugar - public OrderSet addIdentifier(Identifier t) { //3 - if (t == null) - return this; - if (this.identifier == null) - this.identifier = new ArrayList(); - this.identifier.add(t); - return this; - } - - /** - * @return {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value - */ - public StringType getVersionElement() { - if (this.version == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrderSet.version"); - else if (Configuration.doAutoCreate()) - this.version = new StringType(); // bb - return this.version; - } - - public boolean hasVersionElement() { - return this.version != null && !this.version.isEmpty(); - } - - public boolean hasVersion() { - return this.version != null && !this.version.isEmpty(); - } - - /** - * @param value {@link #version} (The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value - */ - public OrderSet setVersionElement(StringType value) { - this.version = value; - return this; - } - - /** - * @return The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. - */ - public String getVersion() { - return this.version == null ? null : this.version.getValue(); - } - - /** - * @param value The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification. - */ - public OrderSet setVersion(String value) { - if (Utilities.noString(value)) - this.version = null; - else { - if (this.version == null) - this.version = new StringType(); - this.version.setValue(value); - } - return this; - } - /** * @return {@link #moduleMetadata} (A reference to a ModuleMetadata resource containing metadata for the orderset.) */ - public Reference getModuleMetadata() { + public ModuleMetadata getModuleMetadata() { if (this.moduleMetadata == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create OrderSet.moduleMetadata"); else if (Configuration.doAutoCreate()) - this.moduleMetadata = new Reference(); // cc + this.moduleMetadata = new ModuleMetadata(); // cc return this.moduleMetadata; } @@ -2344,31 +100,11 @@ public class OrderSet extends DomainResource { /** * @param value {@link #moduleMetadata} (A reference to a ModuleMetadata resource containing metadata for the orderset.) */ - public OrderSet setModuleMetadata(Reference value) { + public OrderSet setModuleMetadata(ModuleMetadata value) { this.moduleMetadata = value; return this; } - /** - * @return {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource containing metadata for the orderset.) - */ - public ModuleMetadata getModuleMetadataTarget() { - if (this.moduleMetadataTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create OrderSet.moduleMetadata"); - else if (Configuration.doAutoCreate()) - this.moduleMetadataTarget = new ModuleMetadata(); // aa - return this.moduleMetadataTarget; - } - - /** - * @param value {@link #moduleMetadata} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a ModuleMetadata resource containing metadata for the orderset.) - */ - public OrderSet setModuleMetadataTarget(ModuleMetadata value) { - this.moduleMetadataTarget = value; - return this; - } - /** * @return {@link #library} (A reference to a Library resource containing any formal logic used by the orderset.) */ @@ -2431,87 +167,75 @@ public class OrderSet extends DomainResource { } /** - * @return {@link #item} (The definition of the items that make up the orderset.) + * @return {@link #action} (The definition of the actions that make up the order set. Order set groups and sections are represented as actions which contain sub-actions.) */ - public List getItem() { - if (this.item == null) - this.item = new ArrayList(); - return this.item; + public List getAction() { + if (this.action == null) + this.action = new ArrayList(); + return this.action; } - public boolean hasItem() { - if (this.item == null) + public boolean hasAction() { + if (this.action == null) return false; - for (OrderSetItemComponent item : this.item) + for (ActionDefinition item : this.action) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #item} (The definition of the items that make up the orderset.) + * @return {@link #action} (The definition of the actions that make up the order set. Order set groups and sections are represented as actions which contain sub-actions.) */ // syntactic sugar - public OrderSetItemComponent addItem() { //3 - OrderSetItemComponent t = new OrderSetItemComponent(); - if (this.item == null) - this.item = new ArrayList(); - this.item.add(t); + public ActionDefinition addAction() { //3 + ActionDefinition t = new ActionDefinition(); + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); return t; } // syntactic sugar - public OrderSet addItem(OrderSetItemComponent t) { //3 + public OrderSet addAction(ActionDefinition t) { //3 if (t == null) return this; - if (this.item == null) - this.item = new ArrayList(); - this.item.add(t); + if (this.action == null) + this.action = new ArrayList(); + this.action.add(t); return this; } protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("identifier", "Identifier", "A logical identifier for the module such as the CMS or NQF identifiers for a measure artifact.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("version", "string", "The version of the module, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge modules, refer to the Decision Support Service specification.", 0, java.lang.Integer.MAX_VALUE, version)); - childrenList.add(new Property("moduleMetadata", "Reference(ModuleMetadata)", "A reference to a ModuleMetadata resource containing metadata for the orderset.", 0, java.lang.Integer.MAX_VALUE, moduleMetadata)); + childrenList.add(new Property("moduleMetadata", "ModuleMetadata", "A reference to a ModuleMetadata resource containing metadata for the orderset.", 0, java.lang.Integer.MAX_VALUE, moduleMetadata)); childrenList.add(new Property("library", "Reference(Library)", "A reference to a Library resource containing any formal logic used by the orderset.", 0, java.lang.Integer.MAX_VALUE, library)); - childrenList.add(new Property("item", "", "The definition of the items that make up the orderset.", 0, java.lang.Integer.MAX_VALUE, item)); + childrenList.add(new Property("action", "ActionDefinition", "The definition of the actions that make up the order set. Order set groups and sections are represented as actions which contain sub-actions.", 0, java.lang.Integer.MAX_VALUE, action)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("identifier")) - this.getIdentifier().add(castToIdentifier(value)); - else if (name.equals("version")) - this.version = castToString(value); // StringType - else if (name.equals("moduleMetadata")) - this.moduleMetadata = castToReference(value); // Reference + if (name.equals("moduleMetadata")) + this.moduleMetadata = castToModuleMetadata(value); // ModuleMetadata else if (name.equals("library")) this.getLibrary().add(castToReference(value)); - else if (name.equals("item")) - this.getItem().add((OrderSetItemComponent) value); + else if (name.equals("action")) + this.getAction().add(castToActionDefinition(value)); else super.setProperty(name, value); } @Override public Base addChild(String name) throws FHIRException { - if (name.equals("identifier")) { - return addIdentifier(); - } - else if (name.equals("version")) { - throw new FHIRException("Cannot call addChild on a primitive type OrderSet.version"); - } - else if (name.equals("moduleMetadata")) { - this.moduleMetadata = new Reference(); + if (name.equals("moduleMetadata")) { + this.moduleMetadata = new ModuleMetadata(); return this.moduleMetadata; } else if (name.equals("library")) { return addLibrary(); } - else if (name.equals("item")) { - return addItem(); + else if (name.equals("action")) { + return addAction(); } else return super.addChild(name); @@ -2525,22 +249,16 @@ public class OrderSet extends DomainResource { public OrderSet copy() { OrderSet dst = new OrderSet(); copyValues(dst); - if (identifier != null) { - dst.identifier = new ArrayList(); - for (Identifier i : identifier) - dst.identifier.add(i.copy()); - }; - dst.version = version == null ? null : version.copy(); dst.moduleMetadata = moduleMetadata == null ? null : moduleMetadata.copy(); if (library != null) { dst.library = new ArrayList(); for (Reference i : library) dst.library.add(i.copy()); }; - if (item != null) { - dst.item = new ArrayList(); - for (OrderSetItemComponent i : item) - dst.item.add(i.copy()); + if (action != null) { + dst.action = new ArrayList(); + for (ActionDefinition i : action) + dst.action.add(i.copy()); }; return dst; } @@ -2556,8 +274,8 @@ public class OrderSet extends DomainResource { if (!(other instanceof OrderSet)) return false; OrderSet o = (OrderSet) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(moduleMetadata, o.moduleMetadata, true) - && compareDeep(library, o.library, true) && compareDeep(item, o.item, true); + return compareDeep(moduleMetadata, o.moduleMetadata, true) && compareDeep(library, o.library, true) + && compareDeep(action, o.action, true); } @Override @@ -2567,13 +285,12 @@ public class OrderSet extends DomainResource { if (!(other instanceof OrderSet)) return false; OrderSet o = (OrderSet) other; - return compareValues(version, o.version, true); + return true; } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) - && (moduleMetadata == null || moduleMetadata.isEmpty()) && (library == null || library.isEmpty()) - && (item == null || item.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( moduleMetadata, library, action + ); } @Override @@ -2581,6 +298,126 @@ public class OrderSet extends DomainResource { return ResourceType.OrderSet; } + /** + * Search parameter: identifier + *

+ * Description: Logical identifier for the module (e.g. CMS-143)
+ * Type: token
+ * Path: OrderSet.moduleMetadata.identifier
+ *

+ */ + @SearchParamDefinition(name="identifier", path="OrderSet.moduleMetadata.identifier", description="Logical identifier for the module (e.g. CMS-143)", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + /** + * Fluent Client search parameter constant for identifier + *

+ * Description: Logical identifier for the module (e.g. CMS-143)
+ * Type: token
+ * Path: OrderSet.moduleMetadata.identifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); + + /** + * Search parameter: topic + *

+ * Description: Topics associated with the module
+ * Type: token
+ * Path: OrderSet.moduleMetadata.topic
+ *

+ */ + @SearchParamDefinition(name="topic", path="OrderSet.moduleMetadata.topic", description="Topics associated with the module", type="token" ) + public static final String SP_TOPIC = "topic"; + /** + * Fluent Client search parameter constant for topic + *

+ * Description: Topics associated with the module
+ * Type: token
+ * Path: OrderSet.moduleMetadata.topic
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TOPIC); + + /** + * Search parameter: description + *

+ * Description: Text search against the description
+ * Type: string
+ * Path: OrderSet.moduleMetadata.description
+ *

+ */ + @SearchParamDefinition(name="description", path="OrderSet.moduleMetadata.description", description="Text search against the description", type="string" ) + public static final String SP_DESCRIPTION = "description"; + /** + * Fluent Client search parameter constant for description + *

+ * Description: Text search against the description
+ * Type: string
+ * Path: OrderSet.moduleMetadata.description
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); + + /** + * Search parameter: title + *

+ * Description: Text search against the title
+ * Type: string
+ * Path: OrderSet.moduleMetadata.title
+ *

+ */ + @SearchParamDefinition(name="title", path="OrderSet.moduleMetadata.title", description="Text search against the title", type="string" ) + public static final String SP_TITLE = "title"; + /** + * Fluent Client search parameter constant for title + *

+ * Description: Text search against the title
+ * Type: string
+ * Path: OrderSet.moduleMetadata.title
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); + + /** + * Search parameter: version + *

+ * Description: Version of the module (e.g. 1.0.0)
+ * Type: string
+ * Path: OrderSet.moduleMetadata.version
+ *

+ */ + @SearchParamDefinition(name="version", path="OrderSet.moduleMetadata.version", description="Version of the module (e.g. 1.0.0)", type="string" ) + public static final String SP_VERSION = "version"; + /** + * Fluent Client search parameter constant for version + *

+ * Description: Version of the module (e.g. 1.0.0)
+ * Type: string
+ * Path: OrderSet.moduleMetadata.version
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam VERSION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_VERSION); + + /** + * Search parameter: status + *

+ * Description: Status of the module
+ * Type: token
+ * Path: OrderSet.moduleMetadata.status
+ *

+ */ + @SearchParamDefinition(name="status", path="OrderSet.moduleMetadata.status", description="Status of the module", type="token" ) + public static final String SP_STATUS = "status"; + /** + * Fluent Client search parameter constant for status + *

+ * Description: Status of the module
+ * Type: token
+ * Path: OrderSet.moduleMetadata.status
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); + } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Organization.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Organization.java index e6e70d98cdd..d119057a5c7 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Organization.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Organization.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc. */ @@ -278,8 +277,8 @@ public class Organization extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (purpose == null || purpose.isEmpty()) && (name == null || name.isEmpty()) - && (telecom == null || telecom.isEmpty()) && (address == null || address.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( purpose, name, telecom, address + ); } public String fhirType() { @@ -809,10 +808,8 @@ public class Organization extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (active == null || active.isEmpty()) - && (type == null || type.isEmpty()) && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) - && (address == null || address.isEmpty()) && (partOf == null || partOf.isEmpty()) && (contact == null || contact.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, active, type, name + , telecom, address, partOf, contact); } @Override diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ParameterDefinition.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ParameterDefinition.java new file mode 100644 index 00000000000..4167e81a3eb --- /dev/null +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ParameterDefinition.java @@ -0,0 +1,560 @@ +package org.hl7.fhir.dstu3.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu3.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; +/** + * The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse. + */ +@DatatypeDef(name="ParameterDefinition") +public class ParameterDefinition extends Type implements ICompositeType { + + /** + * The name of the parameter. + */ + @Child(name = "name", type = {CodeType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Parameter name", formalDefinition="The name of the parameter." ) + protected CodeType name; + + /** + * Whether the parameter is input or output for the module. + */ + @Child(name = "use", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="", formalDefinition="Whether the parameter is input or output for the module." ) + protected CodeType use; + + /** + * The minimum number of times this parameter SHALL appear in the request or response. + */ + @Child(name = "min", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Minimum cardinality", formalDefinition="The minimum number of times this parameter SHALL appear in the request or response." ) + protected IntegerType min; + + /** + * The maximum number of times this element is permitted to appear in the request or response. + */ + @Child(name = "max", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Maximum cardinality (a number of *)", formalDefinition="The maximum number of times this element is permitted to appear in the request or response." ) + protected StringType max; + + /** + * A brief discussion of what the parameter is for and how it is used by the module. + */ + @Child(name = "documentation", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="A brief description of the parameter", formalDefinition="A brief discussion of what the parameter is for and how it is used by the module." ) + protected StringType documentation; + + /** + * The type of the parameter. + */ + @Child(name = "type", type = {CodeType.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="", formalDefinition="The type of the parameter." ) + protected CodeType type; + + /** + * If specified, this indicates a profile that the input data must conform to, or that the output data will conform to. + */ + @Child(name = "profile", type = {StructureDefinition.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The profile of the parameter, any", formalDefinition="If specified, this indicates a profile that the input data must conform to, or that the output data will conform to." ) + protected Reference profile; + + /** + * The actual object that is the target of the reference (If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.) + */ + protected StructureDefinition profileTarget; + + private static final long serialVersionUID = -1284894445L; + + /** + * Constructor + */ + public ParameterDefinition() { + super(); + } + + /** + * Constructor + */ + public ParameterDefinition(CodeType use, CodeType type) { + super(); + this.use = use; + this.type = type; + } + + /** + * @return {@link #name} (The name of the parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public CodeType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ParameterDefinition.name"); + else if (Configuration.doAutoCreate()) + this.name = new CodeType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of the parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ParameterDefinition setNameElement(CodeType value) { + this.name = value; + return this; + } + + /** + * @return The name of the parameter. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of the parameter. + */ + public ParameterDefinition setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new CodeType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #use} (Whether the parameter is input or output for the module.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public CodeType getUseElement() { + if (this.use == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ParameterDefinition.use"); + else if (Configuration.doAutoCreate()) + this.use = new CodeType(); // bb + return this.use; + } + + public boolean hasUseElement() { + return this.use != null && !this.use.isEmpty(); + } + + public boolean hasUse() { + return this.use != null && !this.use.isEmpty(); + } + + /** + * @param value {@link #use} (Whether the parameter is input or output for the module.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value + */ + public ParameterDefinition setUseElement(CodeType value) { + this.use = value; + return this; + } + + /** + * @return Whether the parameter is input or output for the module. + */ + public String getUse() { + return this.use == null ? null : this.use.getValue(); + } + + /** + * @param value Whether the parameter is input or output for the module. + */ + public ParameterDefinition setUse(String value) { + if (this.use == null) + this.use = new CodeType(); + this.use.setValue(value); + return this; + } + + /** + * @return {@link #min} (The minimum number of times this parameter SHALL appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value + */ + public IntegerType getMinElement() { + if (this.min == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ParameterDefinition.min"); + else if (Configuration.doAutoCreate()) + this.min = new IntegerType(); // bb + return this.min; + } + + public boolean hasMinElement() { + return this.min != null && !this.min.isEmpty(); + } + + public boolean hasMin() { + return this.min != null && !this.min.isEmpty(); + } + + /** + * @param value {@link #min} (The minimum number of times this parameter SHALL appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value + */ + public ParameterDefinition setMinElement(IntegerType value) { + this.min = value; + return this; + } + + /** + * @return The minimum number of times this parameter SHALL appear in the request or response. + */ + public int getMin() { + return this.min == null || this.min.isEmpty() ? 0 : this.min.getValue(); + } + + /** + * @param value The minimum number of times this parameter SHALL appear in the request or response. + */ + public ParameterDefinition setMin(int value) { + if (this.min == null) + this.min = new IntegerType(); + this.min.setValue(value); + return this; + } + + /** + * @return {@link #max} (The maximum number of times this element is permitted to appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value + */ + public StringType getMaxElement() { + if (this.max == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ParameterDefinition.max"); + else if (Configuration.doAutoCreate()) + this.max = new StringType(); // bb + return this.max; + } + + public boolean hasMaxElement() { + return this.max != null && !this.max.isEmpty(); + } + + public boolean hasMax() { + return this.max != null && !this.max.isEmpty(); + } + + /** + * @param value {@link #max} (The maximum number of times this element is permitted to appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value + */ + public ParameterDefinition setMaxElement(StringType value) { + this.max = value; + return this; + } + + /** + * @return The maximum number of times this element is permitted to appear in the request or response. + */ + public String getMax() { + return this.max == null ? null : this.max.getValue(); + } + + /** + * @param value The maximum number of times this element is permitted to appear in the request or response. + */ + public ParameterDefinition setMax(String value) { + if (Utilities.noString(value)) + this.max = null; + else { + if (this.max == null) + this.max = new StringType(); + this.max.setValue(value); + } + return this; + } + + /** + * @return {@link #documentation} (A brief discussion of what the parameter is for and how it is used by the module.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StringType getDocumentationElement() { + if (this.documentation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ParameterDefinition.documentation"); + else if (Configuration.doAutoCreate()) + this.documentation = new StringType(); // bb + return this.documentation; + } + + public boolean hasDocumentationElement() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + public boolean hasDocumentation() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + /** + * @param value {@link #documentation} (A brief discussion of what the parameter is for and how it is used by the module.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public ParameterDefinition setDocumentationElement(StringType value) { + this.documentation = value; + return this; + } + + /** + * @return A brief discussion of what the parameter is for and how it is used by the module. + */ + public String getDocumentation() { + return this.documentation == null ? null : this.documentation.getValue(); + } + + /** + * @param value A brief discussion of what the parameter is for and how it is used by the module. + */ + public ParameterDefinition setDocumentation(String value) { + if (Utilities.noString(value)) + this.documentation = null; + else { + if (this.documentation == null) + this.documentation = new StringType(); + this.documentation.setValue(value); + } + return this; + } + + /** + * @return {@link #type} (The type of the parameter.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public CodeType getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ParameterDefinition.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeType(); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of the parameter.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public ParameterDefinition setTypeElement(CodeType value) { + this.type = value; + return this; + } + + /** + * @return The type of the parameter. + */ + public String getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of the parameter. + */ + public ParameterDefinition setType(String value) { + if (this.type == null) + this.type = new CodeType(); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #profile} (If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.) + */ + public Reference getProfile() { + if (this.profile == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ParameterDefinition.profile"); + else if (Configuration.doAutoCreate()) + this.profile = new Reference(); // cc + return this.profile; + } + + public boolean hasProfile() { + return this.profile != null && !this.profile.isEmpty(); + } + + /** + * @param value {@link #profile} (If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.) + */ + public ParameterDefinition setProfile(Reference value) { + this.profile = value; + return this; + } + + /** + * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.) + */ + public StructureDefinition getProfileTarget() { + if (this.profileTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ParameterDefinition.profile"); + else if (Configuration.doAutoCreate()) + this.profileTarget = new StructureDefinition(); // aa + return this.profileTarget; + } + + /** + * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.) + */ + public ParameterDefinition setProfileTarget(StructureDefinition value) { + this.profileTarget = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "code", "The name of the parameter.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("use", "code", "Whether the parameter is input or output for the module.", 0, java.lang.Integer.MAX_VALUE, use)); + childrenList.add(new Property("min", "integer", "The minimum number of times this parameter SHALL appear in the request or response.", 0, java.lang.Integer.MAX_VALUE, min)); + childrenList.add(new Property("max", "string", "The maximum number of times this element is permitted to appear in the request or response.", 0, java.lang.Integer.MAX_VALUE, max)); + childrenList.add(new Property("documentation", "string", "A brief discussion of what the parameter is for and how it is used by the module.", 0, java.lang.Integer.MAX_VALUE, documentation)); + childrenList.add(new Property("type", "code", "The type of the parameter.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("profile", "Reference(StructureDefinition)", "If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.", 0, java.lang.Integer.MAX_VALUE, profile)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToCode(value); // CodeType + else if (name.equals("use")) + this.use = castToCode(value); // CodeType + else if (name.equals("min")) + this.min = castToInteger(value); // IntegerType + else if (name.equals("max")) + this.max = castToString(value); // StringType + else if (name.equals("documentation")) + this.documentation = castToString(value); // StringType + else if (name.equals("type")) + this.type = castToCode(value); // CodeType + else if (name.equals("profile")) + this.profile = castToReference(value); // Reference + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type ParameterDefinition.name"); + } + else if (name.equals("use")) { + throw new FHIRException("Cannot call addChild on a primitive type ParameterDefinition.use"); + } + else if (name.equals("min")) { + throw new FHIRException("Cannot call addChild on a primitive type ParameterDefinition.min"); + } + else if (name.equals("max")) { + throw new FHIRException("Cannot call addChild on a primitive type ParameterDefinition.max"); + } + else if (name.equals("documentation")) { + throw new FHIRException("Cannot call addChild on a primitive type ParameterDefinition.documentation"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type ParameterDefinition.type"); + } + else if (name.equals("profile")) { + this.profile = new Reference(); + return this.profile; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "ParameterDefinition"; + + } + + public ParameterDefinition copy() { + ParameterDefinition dst = new ParameterDefinition(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.use = use == null ? null : use.copy(); + dst.min = min == null ? null : min.copy(); + dst.max = max == null ? null : max.copy(); + dst.documentation = documentation == null ? null : documentation.copy(); + dst.type = type == null ? null : type.copy(); + dst.profile = profile == null ? null : profile.copy(); + return dst; + } + + protected ParameterDefinition typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ParameterDefinition)) + return false; + ParameterDefinition o = (ParameterDefinition) other; + return compareDeep(name, o.name, true) && compareDeep(use, o.use, true) && compareDeep(min, o.min, true) + && compareDeep(max, o.max, true) && compareDeep(documentation, o.documentation, true) && compareDeep(type, o.type, true) + && compareDeep(profile, o.profile, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ParameterDefinition)) + return false; + ParameterDefinition o = (ParameterDefinition) other; + return compareValues(name, o.name, true) && compareValues(use, o.use, true) && compareValues(min, o.min, true) + && compareValues(max, o.max, true) && compareValues(documentation, o.documentation, true) && compareValues(type, o.type, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, use, min, max, documentation + , type, profile); + } + + +} + diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Parameters.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Parameters.java index beb5ec00acd..44443061620 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Parameters.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Parameters.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it. */ @@ -78,7 +77,7 @@ public class Parameters extends Resource implements IBaseParameters { @Description(shortDefinition="Named part of a parameter (e.g. Tuple)", formalDefinition="A named part of a parameter. In many implementation context, a set of named parts is known as a \"Tuple\"." ) protected List part; - private static final long serialVersionUID = -1484269842L; + private static final long serialVersionUID = -839605058L; /** * Constructor @@ -423,8 +422,8 @@ public class Parameters extends Resource implements IBaseParameters { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (value == null || value.isEmpty()) - && (resource == null || resource.isEmpty()) && (part == null || part.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, value, resource, part + ); } public String fhirType() { @@ -553,7 +552,7 @@ public class Parameters extends Resource implements IBaseParameters { } public boolean isEmpty() { - return super.isEmpty() && (parameter == null || parameter.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( parameter); } @Override diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Patient.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Patient.java index e4b5ecc854e..23dcba2bdbb 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Patient.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Patient.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Demographics and other administrative information about an individual or animal receiving care or other health-related services. */ @@ -569,10 +567,8 @@ public class Patient extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (relationship == null || relationship.isEmpty()) && (name == null || name.isEmpty()) - && (telecom == null || telecom.isEmpty()) && (address == null || address.isEmpty()) && (gender == null || gender.isEmpty()) - && (organization == null || organization.isEmpty()) && (period == null || period.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( relationship, name, telecom, address + , gender, organization, period); } public String fhirType() { @@ -762,8 +758,8 @@ public class Patient extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (species == null || species.isEmpty()) && (breed == null || breed.isEmpty()) - && (genderStatus == null || genderStatus.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( species, breed, genderStatus + ); } public String fhirType() { @@ -933,8 +929,7 @@ public class Patient extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (language == null || language.isEmpty()) && (preferred == null || preferred.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( language, preferred); } public String fhirType() { @@ -1130,8 +1125,7 @@ public class Patient extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (other == null || other.isEmpty()) && (type == null || type.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( other, type); } public String fhirType() { @@ -1205,10 +1199,10 @@ public class Patient extends DomainResource { protected CodeableConcept maritalStatus; /** - * Indicates whether the patient is part of a multiple or indicates the actual birth order. + * Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer). */ @Child(name = "multipleBirth", type = {BooleanType.class, IntegerType.class}, order=9, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Whether patient is part of a multiple birth", formalDefinition="Indicates whether the patient is part of a multiple or indicates the actual birth order." ) + @Description(shortDefinition="Whether patient is part of a multiple birth", formalDefinition="Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer)." ) protected Type multipleBirth; /** @@ -1652,14 +1646,14 @@ public class Patient extends DomainResource { } /** - * @return {@link #multipleBirth} (Indicates whether the patient is part of a multiple or indicates the actual birth order.) + * @return {@link #multipleBirth} (Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).) */ public Type getMultipleBirth() { return this.multipleBirth; } /** - * @return {@link #multipleBirth} (Indicates whether the patient is part of a multiple or indicates the actual birth order.) + * @return {@link #multipleBirth} (Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).) */ public BooleanType getMultipleBirthBooleanType() throws FHIRException { if (!(this.multipleBirth instanceof BooleanType)) @@ -1672,7 +1666,7 @@ public class Patient extends DomainResource { } /** - * @return {@link #multipleBirth} (Indicates whether the patient is part of a multiple or indicates the actual birth order.) + * @return {@link #multipleBirth} (Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).) */ public IntegerType getMultipleBirthIntegerType() throws FHIRException { if (!(this.multipleBirth instanceof IntegerType)) @@ -1689,7 +1683,7 @@ public class Patient extends DomainResource { } /** - * @param value {@link #multipleBirth} (Indicates whether the patient is part of a multiple or indicates the actual birth order.) + * @param value {@link #multipleBirth} (Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).) */ public Patient setMultipleBirth(Type value) { this.multipleBirth = value; @@ -1984,7 +1978,7 @@ public class Patient extends DomainResource { childrenList.add(new Property("deceased[x]", "boolean|dateTime", "Indicates if the individual is deceased or not.", 0, java.lang.Integer.MAX_VALUE, deceased)); childrenList.add(new Property("address", "Address", "Addresses for the individual.", 0, java.lang.Integer.MAX_VALUE, address)); childrenList.add(new Property("maritalStatus", "CodeableConcept", "This field contains a patient's most recent marital (civil) status.", 0, java.lang.Integer.MAX_VALUE, maritalStatus)); - childrenList.add(new Property("multipleBirth[x]", "boolean|integer", "Indicates whether the patient is part of a multiple or indicates the actual birth order.", 0, java.lang.Integer.MAX_VALUE, multipleBirth)); + childrenList.add(new Property("multipleBirth[x]", "boolean|integer", "Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).", 0, java.lang.Integer.MAX_VALUE, multipleBirth)); childrenList.add(new Property("photo", "Attachment", "Image of the patient.", 0, java.lang.Integer.MAX_VALUE, photo)); childrenList.add(new Property("contact", "", "A contact party (e.g. guardian, partner, friend) for the patient.", 0, java.lang.Integer.MAX_VALUE, contact)); childrenList.add(new Property("animal", "", "This patient is known to be an animal.", 0, java.lang.Integer.MAX_VALUE, animal)); @@ -2200,14 +2194,9 @@ public class Patient extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (active == null || active.isEmpty()) - && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) && (gender == null || gender.isEmpty()) - && (birthDate == null || birthDate.isEmpty()) && (deceased == null || deceased.isEmpty()) - && (address == null || address.isEmpty()) && (maritalStatus == null || maritalStatus.isEmpty()) - && (multipleBirth == null || multipleBirth.isEmpty()) && (photo == null || photo.isEmpty()) - && (contact == null || contact.isEmpty()) && (animal == null || animal.isEmpty()) && (communication == null || communication.isEmpty()) - && (careProvider == null || careProvider.isEmpty()) && (managingOrganization == null || managingOrganization.isEmpty()) - && (link == null || link.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, active, name, telecom + , gender, birthDate, deceased, address, maritalStatus, multipleBirth, photo, contact + , animal, communication, careProvider, managingOrganization, link); } @Override @@ -2323,7 +2312,7 @@ public class Patient extends DomainResource { * Path: Patient.link.other
*

*/ - @SearchParamDefinition(name="link", path="Patient.link.other", description="All patients linked to the given patient", type="reference" ) + @SearchParamDefinition(name="link", path="Patient.link.other", description="All patients linked to the given patient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_LINK = "link"; /** * Fluent Client search parameter constant for link @@ -2361,26 +2350,6 @@ public class Patient extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam LANGUAGE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_LANGUAGE); - /** - * Search parameter: deathdate - *

- * Description: The date of death has been provided and satisfies this search value
- * Type: date
- * Path: Patient.deceasedDateTime
- *

- */ - @SearchParamDefinition(name="deathdate", path="Patient.deceasedDateTime", description="The date of death has been provided and satisfies this search value", type="date" ) - public static final String SP_DEATHDATE = "deathdate"; - /** - * Fluent Client search parameter constant for deathdate - *

- * Description: The date of death has been provided and satisfies this search value
- * Type: date
- * Path: Patient.deceasedDateTime
- *

- */ - public static final ca.uhn.fhir.rest.gclient.DateClientParam DEATHDATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DEATHDATE); - /** * Search parameter: animal-breed *

@@ -2421,6 +2390,26 @@ public class Patient extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.StringClientParam ADDRESS_COUNTRY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_ADDRESS_COUNTRY); + /** + * Search parameter: death-date + *

+ * Description: The date of death has been provided and satisfies this search value
+ * Type: date
+ * Path: Patient.deceasedDateTime
+ *

+ */ + @SearchParamDefinition(name="death-date", path="Patient.deceasedDateTime", description="The date of death has been provided and satisfies this search value", type="date" ) + public static final String SP_DEATH_DATE = "death-date"; + /** + * Fluent Client search parameter constant for death-date + *

+ * Description: The date of death has been provided and satisfies this search value
+ * Type: date
+ * Path: Patient.deceasedDateTime
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.DateClientParam DEATH_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DEATH_DATE); + /** * Search parameter: phonetic *

@@ -2609,7 +2598,7 @@ public class Patient extends DomainResource { * Path: Patient.careProvider
*

*/ - @SearchParamDefinition(name="careprovider", path="Patient.careProvider", description="Patient's nominated care provider, could be a care manager, not the organization that manages the record", type="reference" ) + @SearchParamDefinition(name="careprovider", path="Patient.careProvider", description="Patient's nominated care provider, could be a care manager, not the organization that manages the record", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_CAREPROVIDER = "careprovider"; /** * Fluent Client search parameter constant for careprovider diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/PaymentNotice.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/PaymentNotice.java index e876cdc7ec2..d22cc7d866a 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/PaymentNotice.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/PaymentNotice.java @@ -29,19 +29,18 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * This resource provides the status of the payment for goods and services rendered, and the request and response resource references. */ @@ -79,62 +78,37 @@ public class PaymentNotice extends DomainResource { /** * The Insurer who is target of the request. */ - @Child(name = "target", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "target", type = {Identifier.class, Organization.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Insurer or Regulatory body", formalDefinition="The Insurer who is target of the request." ) - protected Reference target; - - /** - * The actual object that is the target of the reference (The Insurer who is target of the request.) - */ - protected Organization targetTarget; + protected Type target; /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name = "provider", type = {Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "provider", type = {Identifier.class, Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) - */ - protected Practitioner providerTarget; + protected Type provider; /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name = "organization", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "organization", type = {Identifier.class, Organization.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) - */ - protected Organization organizationTarget; + protected Type organization; /** * Reference of resource to reverse. */ - @Child(name = "request", type = {}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "request", type = {Identifier.class}, order=7, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) - protected Reference request; - - /** - * The actual object that is the target of the reference (Reference of resource to reverse.) - */ - protected Resource requestTarget; + protected Type request; /** * Reference of response to resource to reverse. */ - @Child(name = "response", type = {}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "response", type = {Identifier.class}, order=8, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Response reference", formalDefinition="Reference of response to resource to reverse." ) - protected Reference response; - - /** - * The actual object that is the target of the reference (Reference of response to resource to reverse.) - */ - protected Resource responseTarget; + protected Type response; /** * The payment status, typically paid: payment sent, cleared: payment received. @@ -150,7 +124,7 @@ public class PaymentNotice extends DomainResource { @Description(shortDefinition="Payment or clearing date", formalDefinition="The date when the above payment action occurrred." ) protected DateType statusDate; - private static final long serialVersionUID = -1574998728L; + private static final long serialVersionUID = -771143315L; /** * Constructor @@ -307,15 +281,36 @@ public class PaymentNotice extends DomainResource { /** * @return {@link #target} (The Insurer who is target of the request.) */ - public Reference getTarget() { - if (this.target == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PaymentNotice.target"); - else if (Configuration.doAutoCreate()) - this.target = new Reference(); // cc + public Type getTarget() { return this.target; } + /** + * @return {@link #target} (The Insurer who is target of the request.) + */ + public Identifier getTargetIdentifier() throws FHIRException { + if (!(this.target instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.target.getClass().getName()+" was encountered"); + return (Identifier) this.target; + } + + public boolean hasTargetIdentifier() { + return this.target instanceof Identifier; + } + + /** + * @return {@link #target} (The Insurer who is target of the request.) + */ + public Reference getTargetReference() throws FHIRException { + if (!(this.target instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.target.getClass().getName()+" was encountered"); + return (Reference) this.target; + } + + public boolean hasTargetReference() { + return this.target instanceof Reference; + } + public boolean hasTarget() { return this.target != null && !this.target.isEmpty(); } @@ -323,43 +318,44 @@ public class PaymentNotice extends DomainResource { /** * @param value {@link #target} (The Insurer who is target of the request.) */ - public PaymentNotice setTarget(Reference value) { + public PaymentNotice setTarget(Type value) { this.target = value; return this; } - /** - * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) - */ - public Organization getTargetTarget() { - if (this.targetTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PaymentNotice.target"); - else if (Configuration.doAutoCreate()) - this.targetTarget = new Organization(); // aa - return this.targetTarget; - } - - /** - * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who is target of the request.) - */ - public PaymentNotice setTargetTarget(Organization value) { - this.targetTarget = value; - return this; - } - /** * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PaymentNotice.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc + public Type getProvider() { return this.provider; } + /** + * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Identifier getProviderIdentifier() throws FHIRException { + if (!(this.provider instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.provider.getClass().getName()+" was encountered"); + return (Identifier) this.provider; + } + + public boolean hasProviderIdentifier() { + return this.provider instanceof Identifier; + } + + /** + * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getProviderReference() throws FHIRException { + if (!(this.provider instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.provider.getClass().getName()+" was encountered"); + return (Reference) this.provider; + } + + public boolean hasProviderReference() { + return this.provider instanceof Reference; + } + public boolean hasProvider() { return this.provider != null && !this.provider.isEmpty(); } @@ -367,43 +363,44 @@ public class PaymentNotice extends DomainResource { /** * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) */ - public PaymentNotice setProvider(Reference value) { + public PaymentNotice setProvider(Type value) { this.provider = value; return this; } - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PaymentNotice.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public PaymentNotice setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - /** * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PaymentNotice.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc + public Type getOrganization() { return this.organization; } + /** + * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) + */ + public Identifier getOrganizationIdentifier() throws FHIRException { + if (!(this.organization instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Identifier) this.organization; + } + + public boolean hasOrganizationIdentifier() { + return this.organization instanceof Identifier; + } + + /** + * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) + */ + public Reference getOrganizationReference() throws FHIRException { + if (!(this.organization instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Reference) this.organization; + } + + public boolean hasOrganizationReference() { + return this.organization instanceof Reference; + } + public boolean hasOrganization() { return this.organization != null && !this.organization.isEmpty(); } @@ -411,43 +408,44 @@ public class PaymentNotice extends DomainResource { /** * @param value {@link #organization} (The organization which is responsible for the services rendered to the patient.) */ - public PaymentNotice setOrganization(Reference value) { + public PaymentNotice setOrganization(Type value) { this.organization = value; return this; } - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PaymentNotice.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public PaymentNotice setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - /** * @return {@link #request} (Reference of resource to reverse.) */ - public Reference getRequest() { - if (this.request == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PaymentNotice.request"); - else if (Configuration.doAutoCreate()) - this.request = new Reference(); // cc + public Type getRequest() { return this.request; } + /** + * @return {@link #request} (Reference of resource to reverse.) + */ + public Identifier getRequestIdentifier() throws FHIRException { + if (!(this.request instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.request.getClass().getName()+" was encountered"); + return (Identifier) this.request; + } + + public boolean hasRequestIdentifier() { + return this.request instanceof Identifier; + } + + /** + * @return {@link #request} (Reference of resource to reverse.) + */ + public Reference getRequestReference() throws FHIRException { + if (!(this.request instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.request.getClass().getName()+" was encountered"); + return (Reference) this.request; + } + + public boolean hasRequestReference() { + return this.request instanceof Reference; + } + public boolean hasRequest() { return this.request != null && !this.request.isEmpty(); } @@ -455,38 +453,44 @@ public class PaymentNotice extends DomainResource { /** * @param value {@link #request} (Reference of resource to reverse.) */ - public PaymentNotice setRequest(Reference value) { + public PaymentNotice setRequest(Type value) { this.request = value; return this; } - /** - * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of resource to reverse.) - */ - public Resource getRequestTarget() { - return this.requestTarget; - } - - /** - * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of resource to reverse.) - */ - public PaymentNotice setRequestTarget(Resource value) { - this.requestTarget = value; - return this; - } - /** * @return {@link #response} (Reference of response to resource to reverse.) */ - public Reference getResponse() { - if (this.response == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PaymentNotice.response"); - else if (Configuration.doAutoCreate()) - this.response = new Reference(); // cc + public Type getResponse() { return this.response; } + /** + * @return {@link #response} (Reference of response to resource to reverse.) + */ + public Identifier getResponseIdentifier() throws FHIRException { + if (!(this.response instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.response.getClass().getName()+" was encountered"); + return (Identifier) this.response; + } + + public boolean hasResponseIdentifier() { + return this.response instanceof Identifier; + } + + /** + * @return {@link #response} (Reference of response to resource to reverse.) + */ + public Reference getResponseReference() throws FHIRException { + if (!(this.response instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.response.getClass().getName()+" was encountered"); + return (Reference) this.response; + } + + public boolean hasResponseReference() { + return this.response instanceof Reference; + } + public boolean hasResponse() { return this.response != null && !this.response.isEmpty(); } @@ -494,26 +498,11 @@ public class PaymentNotice extends DomainResource { /** * @param value {@link #response} (Reference of response to resource to reverse.) */ - public PaymentNotice setResponse(Reference value) { + public PaymentNotice setResponse(Type value) { this.response = value; return this; } - /** - * @return {@link #response} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of response to resource to reverse.) - */ - public Resource getResponseTarget() { - return this.responseTarget; - } - - /** - * @param value {@link #response} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of response to resource to reverse.) - */ - public PaymentNotice setResponseTarget(Resource value) { - this.responseTarget = value; - return this; - } - /** * @return {@link #paymentStatus} (The payment status, typically paid: payment sent, cleared: payment received.) */ @@ -593,11 +582,11 @@ public class PaymentNotice extends DomainResource { childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created)); - childrenList.add(new Property("target", "Reference(Organization)", "The Insurer who is target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("request", "Reference(Any)", "Reference of resource to reverse.", 0, java.lang.Integer.MAX_VALUE, request)); - childrenList.add(new Property("response", "Reference(Any)", "Reference of response to resource to reverse.", 0, java.lang.Integer.MAX_VALUE, response)); + childrenList.add(new Property("target[x]", "Identifier|Reference(Organization)", "The Insurer who is target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("provider[x]", "Identifier|Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); + childrenList.add(new Property("organization[x]", "Identifier|Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("request[x]", "Identifier|Reference(Any)", "Reference of resource to reverse.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("response[x]", "Identifier|Reference(Any)", "Reference of response to resource to reverse.", 0, java.lang.Integer.MAX_VALUE, response)); childrenList.add(new Property("paymentStatus", "Coding", "The payment status, typically paid: payment sent, cleared: payment received.", 0, java.lang.Integer.MAX_VALUE, paymentStatus)); childrenList.add(new Property("statusDate", "date", "The date when the above payment action occurrred.", 0, java.lang.Integer.MAX_VALUE, statusDate)); } @@ -612,16 +601,16 @@ public class PaymentNotice extends DomainResource { this.originalRuleset = castToCoding(value); // Coding else if (name.equals("created")) this.created = castToDateTime(value); // DateTimeType - else if (name.equals("target")) - this.target = castToReference(value); // Reference - else if (name.equals("provider")) - this.provider = castToReference(value); // Reference - else if (name.equals("organization")) - this.organization = castToReference(value); // Reference - else if (name.equals("request")) - this.request = castToReference(value); // Reference - else if (name.equals("response")) - this.response = castToReference(value); // Reference + else if (name.equals("target[x]")) + this.target = (Type) value; // Type + else if (name.equals("provider[x]")) + this.provider = (Type) value; // Type + else if (name.equals("organization[x]")) + this.organization = (Type) value; // Type + else if (name.equals("request[x]")) + this.request = (Type) value; // Type + else if (name.equals("response[x]")) + this.response = (Type) value; // Type else if (name.equals("paymentStatus")) this.paymentStatus = castToCoding(value); // Coding else if (name.equals("statusDate")) @@ -646,23 +635,43 @@ public class PaymentNotice extends DomainResource { else if (name.equals("created")) { throw new FHIRException("Cannot call addChild on a primitive type PaymentNotice.created"); } - else if (name.equals("target")) { + else if (name.equals("targetIdentifier")) { + this.target = new Identifier(); + return this.target; + } + else if (name.equals("targetReference")) { this.target = new Reference(); return this.target; } - else if (name.equals("provider")) { + else if (name.equals("providerIdentifier")) { + this.provider = new Identifier(); + return this.provider; + } + else if (name.equals("providerReference")) { this.provider = new Reference(); return this.provider; } - else if (name.equals("organization")) { + else if (name.equals("organizationIdentifier")) { + this.organization = new Identifier(); + return this.organization; + } + else if (name.equals("organizationReference")) { this.organization = new Reference(); return this.organization; } - else if (name.equals("request")) { + else if (name.equals("requestIdentifier")) { + this.request = new Identifier(); + return this.request; + } + else if (name.equals("requestReference")) { this.request = new Reference(); return this.request; } - else if (name.equals("response")) { + else if (name.equals("responseIdentifier")) { + this.response = new Identifier(); + return this.response; + } + else if (name.equals("responseReference")) { this.response = new Reference(); return this.response; } @@ -732,11 +741,9 @@ public class PaymentNotice extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) - && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) - && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) - && (request == null || request.isEmpty()) && (response == null || response.isEmpty()) && (paymentStatus == null || paymentStatus.isEmpty()) - && (statusDate == null || statusDate.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, ruleset, originalRuleset + , created, target, provider, organization, request, response, paymentStatus, statusDate + ); } @Override @@ -765,56 +772,44 @@ public class PaymentNotice extends DomainResource { public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); /** - * Search parameter: request + * Search parameter: responseidentifier *

- * Description: The Claim
- * Type: reference
- * Path: PaymentNotice.request
+ * Description: The ClaimResponse
+ * Type: token
+ * Path: PaymentNotice.responseIdentifier
*

*/ - @SearchParamDefinition(name="request", path="PaymentNotice.request", description="The Claim", type="reference" ) - public static final String SP_REQUEST = "request"; + @SearchParamDefinition(name="responseidentifier", path="PaymentNotice.responseIdentifier", description="The ClaimResponse", type="token" ) + public static final String SP_RESPONSEIDENTIFIER = "responseidentifier"; /** - * Fluent Client search parameter constant for request + * Fluent Client search parameter constant for responseidentifier *

- * Description: The Claim
- * Type: reference
- * Path: PaymentNotice.request
+ * Description: The ClaimResponse
+ * Type: token
+ * Path: PaymentNotice.responseIdentifier
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUEST = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUEST); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "PaymentNotice:request". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST = new ca.uhn.fhir.model.api.Include("PaymentNotice:request").toLocked(); + public static final ca.uhn.fhir.rest.gclient.TokenClientParam RESPONSEIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RESPONSEIDENTIFIER); /** - * Search parameter: provider + * Search parameter: organizationidentifier *

- * Description: The reference to the provider
- * Type: reference
- * Path: PaymentNotice.provider
+ * Description: The organization who generated this resource
+ * Type: token
+ * Path: PaymentNotice.organizationIdentifier
*

*/ - @SearchParamDefinition(name="provider", path="PaymentNotice.provider", description="The reference to the provider", type="reference" ) - public static final String SP_PROVIDER = "provider"; + @SearchParamDefinition(name="organizationidentifier", path="PaymentNotice.organizationIdentifier", description="The organization who generated this resource", type="token" ) + public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier"; /** - * Fluent Client search parameter constant for provider + * Fluent Client search parameter constant for organizationidentifier *

- * Description: The reference to the provider
- * Type: reference
- * Path: PaymentNotice.provider
+ * Description: The organization who generated this resource
+ * Type: token
+ * Path: PaymentNotice.organizationIdentifier
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDER); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "PaymentNotice:provider". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDER = new ca.uhn.fhir.model.api.Include("PaymentNotice:provider").toLocked(); + public static final ca.uhn.fhir.rest.gclient.TokenClientParam ORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ORGANIZATIONIDENTIFIER); /** * Search parameter: created @@ -837,56 +832,24 @@ public class PaymentNotice extends DomainResource { public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED); /** - * Search parameter: response + * Search parameter: requestidentifier *

- * Description: The ClaimResponse
- * Type: reference
- * Path: PaymentNotice.response
+ * Description: The Claim
+ * Type: token
+ * Path: PaymentNotice.requestIdentifier
*

*/ - @SearchParamDefinition(name="response", path="PaymentNotice.response", description="The ClaimResponse", type="reference" ) - public static final String SP_RESPONSE = "response"; + @SearchParamDefinition(name="requestidentifier", path="PaymentNotice.requestIdentifier", description="The Claim", type="token" ) + public static final String SP_REQUESTIDENTIFIER = "requestidentifier"; /** - * Fluent Client search parameter constant for response + * Fluent Client search parameter constant for requestidentifier *

- * Description: The ClaimResponse
- * Type: reference
- * Path: PaymentNotice.response
+ * Description: The Claim
+ * Type: token
+ * Path: PaymentNotice.requestIdentifier
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RESPONSE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RESPONSE); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "PaymentNotice:response". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_RESPONSE = new ca.uhn.fhir.model.api.Include("PaymentNotice:response").toLocked(); - - /** - * Search parameter: organization - *

- * Description: The organization who generated this resource
- * Type: reference
- * Path: PaymentNotice.organization
- *

- */ - @SearchParamDefinition(name="organization", path="PaymentNotice.organization", description="The organization who generated this resource", type="reference" ) - public static final String SP_ORGANIZATION = "organization"; - /** - * Fluent Client search parameter constant for organization - *

- * Description: The organization who generated this resource
- * Type: reference
- * Path: PaymentNotice.organization
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "PaymentNotice:organization". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("PaymentNotice:organization").toLocked(); + public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTIDENTIFIER); /** * Search parameter: paymentstatus @@ -908,6 +871,130 @@ public class PaymentNotice extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam PAYMENTSTATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PAYMENTSTATUS); + /** + * Search parameter: organizationreference + *

+ * Description: The organization who generated this resource
+ * Type: reference
+ * Path: PaymentNotice.organizationReference
+ *

+ */ + @SearchParamDefinition(name="organizationreference", path="PaymentNotice.organizationReference", description="The organization who generated this resource", type="reference" ) + public static final String SP_ORGANIZATIONREFERENCE = "organizationreference"; + /** + * Fluent Client search parameter constant for organizationreference + *

+ * Description: The organization who generated this resource
+ * Type: reference
+ * Path: PaymentNotice.organizationReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATIONREFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "PaymentNotice:organizationreference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("PaymentNotice:organizationreference").toLocked(); + + /** + * Search parameter: providerreference + *

+ * Description: The reference to the provider
+ * Type: reference
+ * Path: PaymentNotice.providerReference
+ *

+ */ + @SearchParamDefinition(name="providerreference", path="PaymentNotice.providerReference", description="The reference to the provider", type="reference" ) + public static final String SP_PROVIDERREFERENCE = "providerreference"; + /** + * Fluent Client search parameter constant for providerreference + *

+ * Description: The reference to the provider
+ * Type: reference
+ * Path: PaymentNotice.providerReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDERREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDERREFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "PaymentNotice:providerreference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDERREFERENCE = new ca.uhn.fhir.model.api.Include("PaymentNotice:providerreference").toLocked(); + + /** + * Search parameter: responsereference + *

+ * Description: The ClaimResponse
+ * Type: reference
+ * Path: PaymentNotice.responseReference
+ *

+ */ + @SearchParamDefinition(name="responsereference", path="PaymentNotice.responseReference", description="The ClaimResponse", type="reference" ) + public static final String SP_RESPONSEREFERENCE = "responsereference"; + /** + * Fluent Client search parameter constant for responsereference + *

+ * Description: The ClaimResponse
+ * Type: reference
+ * Path: PaymentNotice.responseReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RESPONSEREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RESPONSEREFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "PaymentNotice:responsereference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_RESPONSEREFERENCE = new ca.uhn.fhir.model.api.Include("PaymentNotice:responsereference").toLocked(); + + /** + * Search parameter: provideridentifier + *

+ * Description: The reference to the provider
+ * Type: token
+ * Path: PaymentNotice.providerIdentifier
+ *

+ */ + @SearchParamDefinition(name="provideridentifier", path="PaymentNotice.providerIdentifier", description="The reference to the provider", type="token" ) + public static final String SP_PROVIDERIDENTIFIER = "provideridentifier"; + /** + * Fluent Client search parameter constant for provideridentifier + *

+ * Description: The reference to the provider
+ * Type: token
+ * Path: PaymentNotice.providerIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam PROVIDERIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PROVIDERIDENTIFIER); + + /** + * Search parameter: requestreference + *

+ * Description: The Claim
+ * Type: reference
+ * Path: PaymentNotice.requestReference
+ *

+ */ + @SearchParamDefinition(name="requestreference", path="PaymentNotice.requestReference", description="The Claim", type="reference" ) + public static final String SP_REQUESTREFERENCE = "requestreference"; + /** + * Fluent Client search parameter constant for requestreference + *

+ * Description: The Claim
+ * Type: reference
+ * Path: PaymentNotice.requestReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTREFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "PaymentNotice:requestreference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTREFERENCE = new ca.uhn.fhir.model.api.Include("PaymentNotice:requestreference").toLocked(); + /** * Search parameter: statusdate *

diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/PaymentReconciliation.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/PaymentReconciliation.java index 8aaf92e8f44..3c2e8ef1622 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/PaymentReconciliation.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/PaymentReconciliation.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * This resource provides payment details and claim references supporting a bulk payment. */ @@ -62,50 +60,30 @@ public class PaymentReconciliation extends DomainResource { /** * The claim or financial resource. */ - @Child(name = "request", type = {}, order=2, min=0, max=1, modifier=false, summary=true) + @Child(name = "request", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Claim", formalDefinition="The claim or financial resource." ) - protected Reference request; - - /** - * The actual object that is the target of the reference (The claim or financial resource.) - */ - protected Resource requestTarget; + protected Type request; /** * The claim response resource. */ - @Child(name = "responce", type = {}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "responce", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Claim Response", formalDefinition="The claim response resource." ) - protected Reference responce; - - /** - * The actual object that is the target of the reference (The claim response resource.) - */ - protected Resource responceTarget; + protected Type responce; /** * The Organization which submitted the invoice or financial transaction. */ - @Child(name = "submitter", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "submitter", type = {Identifier.class, Organization.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Submitter", formalDefinition="The Organization which submitted the invoice or financial transaction." ) - protected Reference submitter; - - /** - * The actual object that is the target of the reference (The Organization which submitted the invoice or financial transaction.) - */ - protected Organization submitterTarget; + protected Type submitter; /** * The organization which is receiving the payment. */ - @Child(name = "payee", type = {Organization.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "payee", type = {Identifier.class, Organization.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Payee", formalDefinition="The organization which is receiving the payment." ) - protected Reference payee; - - /** - * The actual object that is the target of the reference (The organization which is receiving the payment.) - */ - protected Organization payeeTarget; + protected Type payee; /** * The date of the invoice or financial resource. @@ -121,7 +99,7 @@ public class PaymentReconciliation extends DomainResource { @Description(shortDefinition="Detail amount", formalDefinition="Amount paid for this detail." ) protected Money amount; - private static final long serialVersionUID = -1644048062L; + private static final long serialVersionUID = 1706468339L; /** * Constructor @@ -165,15 +143,36 @@ public class PaymentReconciliation extends DomainResource { /** * @return {@link #request} (The claim or financial resource.) */ - public Reference getRequest() { - if (this.request == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailsComponent.request"); - else if (Configuration.doAutoCreate()) - this.request = new Reference(); // cc + public Type getRequest() { return this.request; } + /** + * @return {@link #request} (The claim or financial resource.) + */ + public Identifier getRequestIdentifier() throws FHIRException { + if (!(this.request instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.request.getClass().getName()+" was encountered"); + return (Identifier) this.request; + } + + public boolean hasRequestIdentifier() { + return this.request instanceof Identifier; + } + + /** + * @return {@link #request} (The claim or financial resource.) + */ + public Reference getRequestReference() throws FHIRException { + if (!(this.request instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.request.getClass().getName()+" was encountered"); + return (Reference) this.request; + } + + public boolean hasRequestReference() { + return this.request instanceof Reference; + } + public boolean hasRequest() { return this.request != null && !this.request.isEmpty(); } @@ -181,38 +180,44 @@ public class PaymentReconciliation extends DomainResource { /** * @param value {@link #request} (The claim or financial resource.) */ - public DetailsComponent setRequest(Reference value) { + public DetailsComponent setRequest(Type value) { this.request = value; return this; } - /** - * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The claim or financial resource.) - */ - public Resource getRequestTarget() { - return this.requestTarget; - } - - /** - * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The claim or financial resource.) - */ - public DetailsComponent setRequestTarget(Resource value) { - this.requestTarget = value; - return this; - } - /** * @return {@link #responce} (The claim response resource.) */ - public Reference getResponce() { - if (this.responce == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailsComponent.responce"); - else if (Configuration.doAutoCreate()) - this.responce = new Reference(); // cc + public Type getResponce() { return this.responce; } + /** + * @return {@link #responce} (The claim response resource.) + */ + public Identifier getResponceIdentifier() throws FHIRException { + if (!(this.responce instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.responce.getClass().getName()+" was encountered"); + return (Identifier) this.responce; + } + + public boolean hasResponceIdentifier() { + return this.responce instanceof Identifier; + } + + /** + * @return {@link #responce} (The claim response resource.) + */ + public Reference getResponceReference() throws FHIRException { + if (!(this.responce instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.responce.getClass().getName()+" was encountered"); + return (Reference) this.responce; + } + + public boolean hasResponceReference() { + return this.responce instanceof Reference; + } + public boolean hasResponce() { return this.responce != null && !this.responce.isEmpty(); } @@ -220,38 +225,44 @@ public class PaymentReconciliation extends DomainResource { /** * @param value {@link #responce} (The claim response resource.) */ - public DetailsComponent setResponce(Reference value) { + public DetailsComponent setResponce(Type value) { this.responce = value; return this; } - /** - * @return {@link #responce} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The claim response resource.) - */ - public Resource getResponceTarget() { - return this.responceTarget; - } - - /** - * @param value {@link #responce} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The claim response resource.) - */ - public DetailsComponent setResponceTarget(Resource value) { - this.responceTarget = value; - return this; - } - /** * @return {@link #submitter} (The Organization which submitted the invoice or financial transaction.) */ - public Reference getSubmitter() { - if (this.submitter == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailsComponent.submitter"); - else if (Configuration.doAutoCreate()) - this.submitter = new Reference(); // cc + public Type getSubmitter() { return this.submitter; } + /** + * @return {@link #submitter} (The Organization which submitted the invoice or financial transaction.) + */ + public Identifier getSubmitterIdentifier() throws FHIRException { + if (!(this.submitter instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.submitter.getClass().getName()+" was encountered"); + return (Identifier) this.submitter; + } + + public boolean hasSubmitterIdentifier() { + return this.submitter instanceof Identifier; + } + + /** + * @return {@link #submitter} (The Organization which submitted the invoice or financial transaction.) + */ + public Reference getSubmitterReference() throws FHIRException { + if (!(this.submitter instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.submitter.getClass().getName()+" was encountered"); + return (Reference) this.submitter; + } + + public boolean hasSubmitterReference() { + return this.submitter instanceof Reference; + } + public boolean hasSubmitter() { return this.submitter != null && !this.submitter.isEmpty(); } @@ -259,43 +270,44 @@ public class PaymentReconciliation extends DomainResource { /** * @param value {@link #submitter} (The Organization which submitted the invoice or financial transaction.) */ - public DetailsComponent setSubmitter(Reference value) { + public DetailsComponent setSubmitter(Type value) { this.submitter = value; return this; } - /** - * @return {@link #submitter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Organization which submitted the invoice or financial transaction.) - */ - public Organization getSubmitterTarget() { - if (this.submitterTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailsComponent.submitter"); - else if (Configuration.doAutoCreate()) - this.submitterTarget = new Organization(); // aa - return this.submitterTarget; - } - - /** - * @param value {@link #submitter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Organization which submitted the invoice or financial transaction.) - */ - public DetailsComponent setSubmitterTarget(Organization value) { - this.submitterTarget = value; - return this; - } - /** * @return {@link #payee} (The organization which is receiving the payment.) */ - public Reference getPayee() { - if (this.payee == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailsComponent.payee"); - else if (Configuration.doAutoCreate()) - this.payee = new Reference(); // cc + public Type getPayee() { return this.payee; } + /** + * @return {@link #payee} (The organization which is receiving the payment.) + */ + public Identifier getPayeeIdentifier() throws FHIRException { + if (!(this.payee instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.payee.getClass().getName()+" was encountered"); + return (Identifier) this.payee; + } + + public boolean hasPayeeIdentifier() { + return this.payee instanceof Identifier; + } + + /** + * @return {@link #payee} (The organization which is receiving the payment.) + */ + public Reference getPayeeReference() throws FHIRException { + if (!(this.payee instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.payee.getClass().getName()+" was encountered"); + return (Reference) this.payee; + } + + public boolean hasPayeeReference() { + return this.payee instanceof Reference; + } + public boolean hasPayee() { return this.payee != null && !this.payee.isEmpty(); } @@ -303,31 +315,11 @@ public class PaymentReconciliation extends DomainResource { /** * @param value {@link #payee} (The organization which is receiving the payment.) */ - public DetailsComponent setPayee(Reference value) { + public DetailsComponent setPayee(Type value) { this.payee = value; return this; } - /** - * @return {@link #payee} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is receiving the payment.) - */ - public Organization getPayeeTarget() { - if (this.payeeTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create DetailsComponent.payee"); - else if (Configuration.doAutoCreate()) - this.payeeTarget = new Organization(); // aa - return this.payeeTarget; - } - - /** - * @param value {@link #payee} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is receiving the payment.) - */ - public DetailsComponent setPayeeTarget(Organization value) { - this.payeeTarget = value; - return this; - } - /** * @return {@link #date} (The date of the invoice or financial resource.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value */ @@ -404,10 +396,10 @@ public class PaymentReconciliation extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("type", "Coding", "Code to indicate the nature of the payment, adjustment, funds advance, etc.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("request", "Reference(Any)", "The claim or financial resource.", 0, java.lang.Integer.MAX_VALUE, request)); - childrenList.add(new Property("responce", "Reference(Any)", "The claim response resource.", 0, java.lang.Integer.MAX_VALUE, responce)); - childrenList.add(new Property("submitter", "Reference(Organization)", "The Organization which submitted the invoice or financial transaction.", 0, java.lang.Integer.MAX_VALUE, submitter)); - childrenList.add(new Property("payee", "Reference(Organization)", "The organization which is receiving the payment.", 0, java.lang.Integer.MAX_VALUE, payee)); + childrenList.add(new Property("request[x]", "Identifier|Reference(Any)", "The claim or financial resource.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("responce[x]", "Identifier|Reference(Any)", "The claim response resource.", 0, java.lang.Integer.MAX_VALUE, responce)); + childrenList.add(new Property("submitter[x]", "Identifier|Reference(Organization)", "The Organization which submitted the invoice or financial transaction.", 0, java.lang.Integer.MAX_VALUE, submitter)); + childrenList.add(new Property("payee[x]", "Identifier|Reference(Organization)", "The organization which is receiving the payment.", 0, java.lang.Integer.MAX_VALUE, payee)); childrenList.add(new Property("date", "date", "The date of the invoice or financial resource.", 0, java.lang.Integer.MAX_VALUE, date)); childrenList.add(new Property("amount", "Money", "Amount paid for this detail.", 0, java.lang.Integer.MAX_VALUE, amount)); } @@ -416,14 +408,14 @@ public class PaymentReconciliation extends DomainResource { public void setProperty(String name, Base value) throws FHIRException { if (name.equals("type")) this.type = castToCoding(value); // Coding - else if (name.equals("request")) - this.request = castToReference(value); // Reference - else if (name.equals("responce")) - this.responce = castToReference(value); // Reference - else if (name.equals("submitter")) - this.submitter = castToReference(value); // Reference - else if (name.equals("payee")) - this.payee = castToReference(value); // Reference + else if (name.equals("request[x]")) + this.request = (Type) value; // Type + else if (name.equals("responce[x]")) + this.responce = (Type) value; // Type + else if (name.equals("submitter[x]")) + this.submitter = (Type) value; // Type + else if (name.equals("payee[x]")) + this.payee = (Type) value; // Type else if (name.equals("date")) this.date = castToDate(value); // DateType else if (name.equals("amount")) @@ -438,19 +430,35 @@ public class PaymentReconciliation extends DomainResource { this.type = new Coding(); return this.type; } - else if (name.equals("request")) { + else if (name.equals("requestIdentifier")) { + this.request = new Identifier(); + return this.request; + } + else if (name.equals("requestReference")) { this.request = new Reference(); return this.request; } - else if (name.equals("responce")) { + else if (name.equals("responceIdentifier")) { + this.responce = new Identifier(); + return this.responce; + } + else if (name.equals("responceReference")) { this.responce = new Reference(); return this.responce; } - else if (name.equals("submitter")) { + else if (name.equals("submitterIdentifier")) { + this.submitter = new Identifier(); + return this.submitter; + } + else if (name.equals("submitterReference")) { this.submitter = new Reference(); return this.submitter; } - else if (name.equals("payee")) { + else if (name.equals("payeeIdentifier")) { + this.payee = new Identifier(); + return this.payee; + } + else if (name.equals("payeeReference")) { this.payee = new Reference(); return this.payee; } @@ -501,10 +509,8 @@ public class PaymentReconciliation extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (request == null || request.isEmpty()) - && (responce == null || responce.isEmpty()) && (submitter == null || submitter.isEmpty()) - && (payee == null || payee.isEmpty()) && (date == null || date.isEmpty()) && (amount == null || amount.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, request, responce, submitter + , payee, date, amount); } public String fhirType() { @@ -670,8 +676,7 @@ public class PaymentReconciliation extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (text == null || text.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, text); } public String fhirType() { @@ -691,14 +696,9 @@ public class PaymentReconciliation extends DomainResource { /** * Original request resource reference. */ - @Child(name = "request", type = {ProcessRequest.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Child(name = "request", type = {Identifier.class, ProcessRequest.class}, order=1, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." ) - protected Reference request; - - /** - * The actual object that is the target of the reference (Original request resource reference.) - */ - protected ProcessRequest requestTarget; + protected Type request; /** * Transaction status: error, complete. @@ -745,38 +745,23 @@ public class PaymentReconciliation extends DomainResource { /** * The Insurer who produced this adjudicated response. */ - @Child(name = "organization", type = {Organization.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "organization", type = {Identifier.class, Organization.class}, order=8, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The Insurer who produced this adjudicated response.) - */ - protected Organization organizationTarget; + protected Type organization; /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name = "requestProvider", type = {Practitioner.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Child(name = "requestProvider", type = {Identifier.class, Practitioner.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference requestProvider; - - /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) - */ - protected Practitioner requestProviderTarget; + protected Type requestProvider; /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name = "requestOrganization", type = {Organization.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Child(name = "requestOrganization", type = {Identifier.class, Organization.class}, order=10, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) - protected Reference requestOrganization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) - */ - protected Organization requestOrganizationTarget; + protected Type requestOrganization; /** * List of individual settlement amounts and the corresponding transaction. @@ -806,7 +791,7 @@ public class PaymentReconciliation extends DomainResource { @Description(shortDefinition="Note text", formalDefinition="Suite of notes." ) protected List note; - private static final long serialVersionUID = 454328025L; + private static final long serialVersionUID = -293306995L; /** * Constructor @@ -866,15 +851,36 @@ public class PaymentReconciliation extends DomainResource { /** * @return {@link #request} (Original request resource reference.) */ - public Reference getRequest() { - if (this.request == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PaymentReconciliation.request"); - else if (Configuration.doAutoCreate()) - this.request = new Reference(); // cc + public Type getRequest() { return this.request; } + /** + * @return {@link #request} (Original request resource reference.) + */ + public Identifier getRequestIdentifier() throws FHIRException { + if (!(this.request instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.request.getClass().getName()+" was encountered"); + return (Identifier) this.request; + } + + public boolean hasRequestIdentifier() { + return this.request instanceof Identifier; + } + + /** + * @return {@link #request} (Original request resource reference.) + */ + public Reference getRequestReference() throws FHIRException { + if (!(this.request instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.request.getClass().getName()+" was encountered"); + return (Reference) this.request; + } + + public boolean hasRequestReference() { + return this.request instanceof Reference; + } + public boolean hasRequest() { return this.request != null && !this.request.isEmpty(); } @@ -882,31 +888,11 @@ public class PaymentReconciliation extends DomainResource { /** * @param value {@link #request} (Original request resource reference.) */ - public PaymentReconciliation setRequest(Reference value) { + public PaymentReconciliation setRequest(Type value) { this.request = value; return this; } - /** - * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original request resource reference.) - */ - public ProcessRequest getRequestTarget() { - if (this.requestTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PaymentReconciliation.request"); - else if (Configuration.doAutoCreate()) - this.requestTarget = new ProcessRequest(); // aa - return this.requestTarget; - } - - /** - * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original request resource reference.) - */ - public PaymentReconciliation setRequestTarget(ProcessRequest value) { - this.requestTarget = value; - return this; - } - /** * @return {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value */ @@ -1129,15 +1115,36 @@ public class PaymentReconciliation extends DomainResource { /** * @return {@link #organization} (The Insurer who produced this adjudicated response.) */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PaymentReconciliation.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc + public Type getOrganization() { return this.organization; } + /** + * @return {@link #organization} (The Insurer who produced this adjudicated response.) + */ + public Identifier getOrganizationIdentifier() throws FHIRException { + if (!(this.organization instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Identifier) this.organization; + } + + public boolean hasOrganizationIdentifier() { + return this.organization instanceof Identifier; + } + + /** + * @return {@link #organization} (The Insurer who produced this adjudicated response.) + */ + public Reference getOrganizationReference() throws FHIRException { + if (!(this.organization instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Reference) this.organization; + } + + public boolean hasOrganizationReference() { + return this.organization instanceof Reference; + } + public boolean hasOrganization() { return this.organization != null && !this.organization.isEmpty(); } @@ -1145,43 +1152,44 @@ public class PaymentReconciliation extends DomainResource { /** * @param value {@link #organization} (The Insurer who produced this adjudicated response.) */ - public PaymentReconciliation setOrganization(Reference value) { + public PaymentReconciliation setOrganization(Type value) { this.organization = value; return this; } - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PaymentReconciliation.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Insurer who produced this adjudicated response.) - */ - public PaymentReconciliation setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - /** * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) */ - public Reference getRequestProvider() { - if (this.requestProvider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PaymentReconciliation.requestProvider"); - else if (Configuration.doAutoCreate()) - this.requestProvider = new Reference(); // cc + public Type getRequestProvider() { return this.requestProvider; } + /** + * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Identifier getRequestProviderIdentifier() throws FHIRException { + if (!(this.requestProvider instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.requestProvider.getClass().getName()+" was encountered"); + return (Identifier) this.requestProvider; + } + + public boolean hasRequestProviderIdentifier() { + return this.requestProvider instanceof Identifier; + } + + /** + * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getRequestProviderReference() throws FHIRException { + if (!(this.requestProvider instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.requestProvider.getClass().getName()+" was encountered"); + return (Reference) this.requestProvider; + } + + public boolean hasRequestProviderReference() { + return this.requestProvider instanceof Reference; + } + public boolean hasRequestProvider() { return this.requestProvider != null && !this.requestProvider.isEmpty(); } @@ -1189,43 +1197,44 @@ public class PaymentReconciliation extends DomainResource { /** * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) */ - public PaymentReconciliation setRequestProvider(Reference value) { + public PaymentReconciliation setRequestProvider(Type value) { this.requestProvider = value; return this; } - /** - * @return {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Practitioner getRequestProviderTarget() { - if (this.requestProviderTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PaymentReconciliation.requestProvider"); - else if (Configuration.doAutoCreate()) - this.requestProviderTarget = new Practitioner(); // aa - return this.requestProviderTarget; - } - - /** - * @param value {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public PaymentReconciliation setRequestProviderTarget(Practitioner value) { - this.requestProviderTarget = value; - return this; - } - /** * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) */ - public Reference getRequestOrganization() { - if (this.requestOrganization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PaymentReconciliation.requestOrganization"); - else if (Configuration.doAutoCreate()) - this.requestOrganization = new Reference(); // cc + public Type getRequestOrganization() { return this.requestOrganization; } + /** + * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public Identifier getRequestOrganizationIdentifier() throws FHIRException { + if (!(this.requestOrganization instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.requestOrganization.getClass().getName()+" was encountered"); + return (Identifier) this.requestOrganization; + } + + public boolean hasRequestOrganizationIdentifier() { + return this.requestOrganization instanceof Identifier; + } + + /** + * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public Reference getRequestOrganizationReference() throws FHIRException { + if (!(this.requestOrganization instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.requestOrganization.getClass().getName()+" was encountered"); + return (Reference) this.requestOrganization; + } + + public boolean hasRequestOrganizationReference() { + return this.requestOrganization instanceof Reference; + } + public boolean hasRequestOrganization() { return this.requestOrganization != null && !this.requestOrganization.isEmpty(); } @@ -1233,31 +1242,11 @@ public class PaymentReconciliation extends DomainResource { /** * @param value {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) */ - public PaymentReconciliation setRequestOrganization(Reference value) { + public PaymentReconciliation setRequestOrganization(Type value) { this.requestOrganization = value; return this; } - /** - * @return {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public Organization getRequestOrganizationTarget() { - if (this.requestOrganizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PaymentReconciliation.requestOrganization"); - else if (Configuration.doAutoCreate()) - this.requestOrganizationTarget = new Organization(); // aa - return this.requestOrganizationTarget; - } - - /** - * @param value {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public PaymentReconciliation setRequestOrganizationTarget(Organization value) { - this.requestOrganizationTarget = value; - return this; - } - /** * @return {@link #detail} (List of individual settlement amounts and the corresponding transaction.) */ @@ -1389,16 +1378,16 @@ public class PaymentReconciliation extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("request", "Reference(ProcessRequest)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("request[x]", "Identifier|Reference(ProcessRequest)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); childrenList.add(new Property("outcome", "code", "Transaction status: error, complete.", 0, java.lang.Integer.MAX_VALUE, outcome)); childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, java.lang.Integer.MAX_VALUE, disposition)); childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); childrenList.add(new Property("period", "Period", "The period of time for which payments have been gathered into this bulk payment for settlement.", 0, java.lang.Integer.MAX_VALUE, period)); - childrenList.add(new Property("organization", "Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider)); - childrenList.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); + childrenList.add(new Property("organization[x]", "Identifier|Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("requestProvider[x]", "Identifier|Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider)); + childrenList.add(new Property("requestOrganization[x]", "Identifier|Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); childrenList.add(new Property("detail", "", "List of individual settlement amounts and the corresponding transaction.", 0, java.lang.Integer.MAX_VALUE, detail)); childrenList.add(new Property("form", "Coding", "The form to be used for printing the content.", 0, java.lang.Integer.MAX_VALUE, form)); childrenList.add(new Property("total", "Money", "Total payment amount.", 0, java.lang.Integer.MAX_VALUE, total)); @@ -1409,8 +1398,8 @@ public class PaymentReconciliation extends DomainResource { public void setProperty(String name, Base value) throws FHIRException { if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); - else if (name.equals("request")) - this.request = castToReference(value); // Reference + else if (name.equals("request[x]")) + this.request = (Type) value; // Type else if (name.equals("outcome")) this.outcome = new RemittanceOutcomeEnumFactory().fromType(value); // Enumeration else if (name.equals("disposition")) @@ -1423,12 +1412,12 @@ public class PaymentReconciliation extends DomainResource { this.created = castToDateTime(value); // DateTimeType else if (name.equals("period")) this.period = castToPeriod(value); // Period - else if (name.equals("organization")) - this.organization = castToReference(value); // Reference - else if (name.equals("requestProvider")) - this.requestProvider = castToReference(value); // Reference - else if (name.equals("requestOrganization")) - this.requestOrganization = castToReference(value); // Reference + else if (name.equals("organization[x]")) + this.organization = (Type) value; // Type + else if (name.equals("requestProvider[x]")) + this.requestProvider = (Type) value; // Type + else if (name.equals("requestOrganization[x]")) + this.requestOrganization = (Type) value; // Type else if (name.equals("detail")) this.getDetail().add((DetailsComponent) value); else if (name.equals("form")) @@ -1446,7 +1435,11 @@ public class PaymentReconciliation extends DomainResource { if (name.equals("identifier")) { return addIdentifier(); } - else if (name.equals("request")) { + else if (name.equals("requestIdentifier")) { + this.request = new Identifier(); + return this.request; + } + else if (name.equals("requestReference")) { this.request = new Reference(); return this.request; } @@ -1471,15 +1464,27 @@ public class PaymentReconciliation extends DomainResource { this.period = new Period(); return this.period; } - else if (name.equals("organization")) { + else if (name.equals("organizationIdentifier")) { + this.organization = new Identifier(); + return this.organization; + } + else if (name.equals("organizationReference")) { this.organization = new Reference(); return this.organization; } - else if (name.equals("requestProvider")) { + else if (name.equals("requestProviderIdentifier")) { + this.requestProvider = new Identifier(); + return this.requestProvider; + } + else if (name.equals("requestProviderReference")) { this.requestProvider = new Reference(); return this.requestProvider; } - else if (name.equals("requestOrganization")) { + else if (name.equals("requestOrganizationIdentifier")) { + this.requestOrganization = new Identifier(); + return this.requestOrganization; + } + else if (name.equals("requestOrganizationReference")) { this.requestOrganization = new Reference(); return this.requestOrganization; } @@ -1570,13 +1575,9 @@ public class PaymentReconciliation extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty()) - && (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty()) - && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) - && (created == null || created.isEmpty()) && (period == null || period.isEmpty()) && (organization == null || organization.isEmpty()) - && (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty()) - && (detail == null || detail.isEmpty()) && (form == null || form.isEmpty()) && (total == null || total.isEmpty()) - && (note == null || note.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, request, outcome + , disposition, ruleset, originalRuleset, created, period, organization, requestProvider + , requestOrganization, detail, form, total, note); } @Override @@ -1584,6 +1585,46 @@ public class PaymentReconciliation extends DomainResource { return ResourceType.PaymentReconciliation; } + /** + * Search parameter: requestprovideridentifier + *

+ * Description: The reference to the provider who sumbitted the claim
+ * Type: token
+ * Path: PaymentReconciliation.requestProviderIdentifier
+ *

+ */ + @SearchParamDefinition(name="requestprovideridentifier", path="PaymentReconciliation.requestProviderIdentifier", description="The reference to the provider who sumbitted the claim", type="token" ) + public static final String SP_REQUESTPROVIDERIDENTIFIER = "requestprovideridentifier"; + /** + * Fluent Client search parameter constant for requestprovideridentifier + *

+ * Description: The reference to the provider who sumbitted the claim
+ * Type: token
+ * Path: PaymentReconciliation.requestProviderIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTPROVIDERIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTPROVIDERIDENTIFIER); + + /** + * Search parameter: requestorganizationidentifier + *

+ * Description: The organization who generated this resource
+ * Type: token
+ * Path: PaymentReconciliation.requestOrganizationIdentifier
+ *

+ */ + @SearchParamDefinition(name="requestorganizationidentifier", path="PaymentReconciliation.requestOrganizationIdentifier", description="The organization who generated this resource", type="token" ) + public static final String SP_REQUESTORGANIZATIONIDENTIFIER = "requestorganizationidentifier"; + /** + * Fluent Client search parameter constant for requestorganizationidentifier + *

+ * Description: The organization who generated this resource
+ * Type: token
+ * Path: PaymentReconciliation.requestOrganizationIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTORGANIZATIONIDENTIFIER); + /** * Search parameter: identifier *

@@ -1604,32 +1645,6 @@ public class PaymentReconciliation extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); - /** - * Search parameter: request - *

- * Description: The reference to the claim
- * Type: reference
- * Path: PaymentReconciliation.request
- *

- */ - @SearchParamDefinition(name="request", path="PaymentReconciliation.request", description="The reference to the claim", type="reference" ) - public static final String SP_REQUEST = "request"; - /** - * Fluent Client search parameter constant for request - *

- * Description: The reference to the claim
- * Type: reference
- * Path: PaymentReconciliation.request
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUEST = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUEST); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "PaymentReconciliation:request". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:request").toLocked(); - /** * Search parameter: disposition *

@@ -1650,6 +1665,26 @@ public class PaymentReconciliation extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.StringClientParam DISPOSITION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DISPOSITION); + /** + * Search parameter: organizationidentifier + *

+ * Description: The organization who generated this resource
+ * Type: token
+ * Path: PaymentReconciliation.organizationIdentifier
+ *

+ */ + @SearchParamDefinition(name="organizationidentifier", path="PaymentReconciliation.organizationIdentifier", description="The organization who generated this resource", type="token" ) + public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier"; + /** + * Fluent Client search parameter constant for organizationidentifier + *

+ * Description: The organization who generated this resource
+ * Type: token
+ * Path: PaymentReconciliation.organizationIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam ORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ORGANIZATIONIDENTIFIER); + /** * Search parameter: created *

@@ -1671,82 +1706,128 @@ public class PaymentReconciliation extends DomainResource { public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED); /** - * Search parameter: organization + * Search parameter: requestidentifier *

- * Description: The organization who generated this resource
- * Type: reference
- * Path: PaymentReconciliation.organization
+ * Description: The reference to the claim
+ * Type: token
+ * Path: PaymentReconciliation.requestIdentifier
*

*/ - @SearchParamDefinition(name="organization", path="PaymentReconciliation.organization", description="The organization who generated this resource", type="reference" ) - public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="requestidentifier", path="PaymentReconciliation.requestIdentifier", description="The reference to the claim", type="token" ) + public static final String SP_REQUESTIDENTIFIER = "requestidentifier"; /** - * Fluent Client search parameter constant for organization + * Fluent Client search parameter constant for requestidentifier + *

+ * Description: The reference to the claim
+ * Type: token
+ * Path: PaymentReconciliation.requestIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTIDENTIFIER); + + /** + * Search parameter: organizationreference *

* Description: The organization who generated this resource
* Type: reference
- * Path: PaymentReconciliation.organization
+ * Path: PaymentReconciliation.organizationReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); + @SearchParamDefinition(name="organizationreference", path="PaymentReconciliation.organizationReference", description="The organization who generated this resource", type="reference" ) + public static final String SP_ORGANIZATIONREFERENCE = "organizationreference"; + /** + * Fluent Client search parameter constant for organizationreference + *

+ * Description: The organization who generated this resource
+ * Type: reference
+ * Path: PaymentReconciliation.organizationReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATIONREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "PaymentReconciliation:organization". + * the path value of "PaymentReconciliation:organizationreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:organization").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:organizationreference").toLocked(); /** - * Search parameter: requestprovider + * Search parameter: requestproviderreference *

* Description: The reference to the provider who sumbitted the claim
* Type: reference
- * Path: PaymentReconciliation.requestProvider
+ * Path: PaymentReconciliation.requestProviderReference
*

*/ - @SearchParamDefinition(name="requestprovider", path="PaymentReconciliation.requestProvider", description="The reference to the provider who sumbitted the claim", type="reference" ) - public static final String SP_REQUESTPROVIDER = "requestprovider"; + @SearchParamDefinition(name="requestproviderreference", path="PaymentReconciliation.requestProviderReference", description="The reference to the provider who sumbitted the claim", type="reference" ) + public static final String SP_REQUESTPROVIDERREFERENCE = "requestproviderreference"; /** - * Fluent Client search parameter constant for requestprovider + * Fluent Client search parameter constant for requestproviderreference *

* Description: The reference to the provider who sumbitted the claim
* Type: reference
- * Path: PaymentReconciliation.requestProvider
+ * Path: PaymentReconciliation.requestProviderReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTPROVIDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTPROVIDER); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTPROVIDERREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTPROVIDERREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "PaymentReconciliation:requestprovider". + * the path value of "PaymentReconciliation:requestproviderreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTPROVIDER = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:requestprovider").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTPROVIDERREFERENCE = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:requestproviderreference").toLocked(); /** - * Search parameter: requestorganization + * Search parameter: requestorganizationreference *

* Description: The organization who generated this resource
* Type: reference
- * Path: PaymentReconciliation.requestOrganization
+ * Path: PaymentReconciliation.requestOrganizationReference
*

*/ - @SearchParamDefinition(name="requestorganization", path="PaymentReconciliation.requestOrganization", description="The organization who generated this resource", type="reference" ) - public static final String SP_REQUESTORGANIZATION = "requestorganization"; + @SearchParamDefinition(name="requestorganizationreference", path="PaymentReconciliation.requestOrganizationReference", description="The organization who generated this resource", type="reference" ) + public static final String SP_REQUESTORGANIZATIONREFERENCE = "requestorganizationreference"; /** - * Fluent Client search parameter constant for requestorganization + * Fluent Client search parameter constant for requestorganizationreference *

* Description: The organization who generated this resource
* Type: reference
- * Path: PaymentReconciliation.requestOrganization
+ * Path: PaymentReconciliation.requestOrganizationReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTORGANIZATION); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTORGANIZATIONREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "PaymentReconciliation:requestorganization". + * the path value of "PaymentReconciliation:requestorganizationreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTORGANIZATION = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:requestorganization").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:requestorganizationreference").toLocked(); + + /** + * Search parameter: requestreference + *

+ * Description: The reference to the claim
+ * Type: reference
+ * Path: PaymentReconciliation.requestReference
+ *

+ */ + @SearchParamDefinition(name="requestreference", path="PaymentReconciliation.requestReference", description="The reference to the claim", type="reference" ) + public static final String SP_REQUESTREFERENCE = "requestreference"; + /** + * Fluent Client search parameter constant for requestreference + *

+ * Description: The reference to the claim
+ * Type: reference
+ * Path: PaymentReconciliation.requestReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTREFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "PaymentReconciliation:requestreference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTREFERENCE = new ca.uhn.fhir.model.api.Include("PaymentReconciliation:requestreference").toLocked(); /** * Search parameter: outcome diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Period.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Period.java index efc060b1bb6..84bee7e249a 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Period.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Period.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -37,9 +37,8 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A time period defined by a start and end date and optionally time. */ @@ -259,8 +258,7 @@ public class Period extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (start == null || start.isEmpty()) && (end == null || end.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( start, end); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Person.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Person.java index 5bc302a6a73..f2e3cd3c938 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Person.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Person.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Demographics and administrative information about a person independent of a specific health-related context. */ @@ -353,8 +351,7 @@ public class Person extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (target == null || target.isEmpty()) && (assurance == null || assurance.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( target, assurance); } public String fhirType() { @@ -1007,10 +1004,8 @@ public class Person extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (name == null || name.isEmpty()) - && (telecom == null || telecom.isEmpty()) && (gender == null || gender.isEmpty()) && (birthDate == null || birthDate.isEmpty()) - && (address == null || address.isEmpty()) && (photo == null || photo.isEmpty()) && (managingOrganization == null || managingOrganization.isEmpty()) - && (active == null || active.isEmpty()) && (link == null || link.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, name, telecom, gender + , birthDate, address, photo, managingOrganization, active, link); } @Override @@ -1126,7 +1121,7 @@ public class Person extends DomainResource { * Path: Person.link.target
*

*/ - @SearchParamDefinition(name="practitioner", path="Person.link.target", description="The Person links to this Practitioner", type="reference" ) + @SearchParamDefinition(name="practitioner", path="Person.link.target", description="The Person links to this Practitioner", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_PRACTITIONER = "practitioner"; /** * Fluent Client search parameter constant for practitioner @@ -1152,7 +1147,7 @@ public class Person extends DomainResource { * Path: Person.link.target
*

*/ - @SearchParamDefinition(name="link", path="Person.link.target", description="Any link has this Patient, Person, RelatedPerson or Practitioner reference", type="reference" ) + @SearchParamDefinition(name="link", path="Person.link.target", description="Any link has this Patient, Person, RelatedPerson or Practitioner reference", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_LINK = "link"; /** * Fluent Client search parameter constant for link @@ -1284,7 +1279,7 @@ public class Person extends DomainResource { * Path: Person.link.target
*

*/ - @SearchParamDefinition(name="patient", path="Person.link.target", description="The Person links to this Patient", type="reference" ) + @SearchParamDefinition(name="patient", path="Person.link.target", description="The Person links to this Patient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Practitioner.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Practitioner.java index 01ec6c9a502..c0e1f133ada 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Practitioner.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Practitioner.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A person who is directly or indirectly involved in the provisioning of healthcare. */ @@ -55,14 +53,14 @@ public class Practitioner extends DomainResource { /** * The organization where the Practitioner performs the roles associated. */ - @Child(name = "managingOrganization", type = {Organization.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Child(name = "organization", type = {Organization.class}, order=1, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Organization where the roles are performed", formalDefinition="The organization where the Practitioner performs the roles associated." ) - protected Reference managingOrganization; + protected Reference organization; /** * The actual object that is the target of the reference (The organization where the Practitioner performs the roles associated.) */ - protected Organization managingOrganizationTarget; + protected Organization organizationTarget; /** * Roles which this practitioner is authorized to perform for the organization. @@ -78,17 +76,31 @@ public class Practitioner extends DomainResource { @Description(shortDefinition="Specific specialty of the practitioner", formalDefinition="Specific specialty of the practitioner." ) protected List specialty; + /** + * Business Identifiers that are specific to a role/location. + */ + @Child(name = "identifier", type = {Identifier.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Business Identifiers that are specific to a role/location", formalDefinition="Business Identifiers that are specific to a role/location." ) + protected List identifier; + + /** + * Contact details that are specific to the role/location/service. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details that are specific to the role/location/service", formalDefinition="Contact details that are specific to the role/location/service." ) + protected List telecom; + /** * The period during which the person is authorized to act as a practitioner in these role(s) for the organization. */ - @Child(name = "period", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "period", type = {Period.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="The period during which the practitioner is authorized to perform in these role(s)", formalDefinition="The period during which the person is authorized to act as a practitioner in these role(s) for the organization." ) protected Period period; /** * The location(s) at which this practitioner provides care. */ - @Child(name = "location", type = {Location.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "location", type = {Location.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="The location(s) at which this practitioner provides care", formalDefinition="The location(s) at which this practitioner provides care." ) protected List location; /** @@ -100,7 +112,7 @@ public class Practitioner extends DomainResource { /** * The list of healthcare services that this worker provides for this role's Organization/Location(s). */ - @Child(name = "healthcareService", type = {HealthcareService.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "healthcareService", type = {HealthcareService.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="The list of healthcare services that this worker provides for this role's Organization/Location(s)", formalDefinition="The list of healthcare services that this worker provides for this role's Organization/Location(s)." ) protected List healthcareService; /** @@ -109,7 +121,7 @@ public class Practitioner extends DomainResource { protected List healthcareServiceTarget; - private static final long serialVersionUID = -2146177018L; + private static final long serialVersionUID = -2082448551L; /** * Constructor @@ -119,46 +131,46 @@ public class Practitioner extends DomainResource { } /** - * @return {@link #managingOrganization} (The organization where the Practitioner performs the roles associated.) + * @return {@link #organization} (The organization where the Practitioner performs the roles associated.) */ - public Reference getManagingOrganization() { - if (this.managingOrganization == null) + public Reference getOrganization() { + if (this.organization == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.managingOrganization"); + throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.organization"); else if (Configuration.doAutoCreate()) - this.managingOrganization = new Reference(); // cc - return this.managingOrganization; + this.organization = new Reference(); // cc + return this.organization; } - public boolean hasManagingOrganization() { - return this.managingOrganization != null && !this.managingOrganization.isEmpty(); + public boolean hasOrganization() { + return this.organization != null && !this.organization.isEmpty(); } /** - * @param value {@link #managingOrganization} (The organization where the Practitioner performs the roles associated.) + * @param value {@link #organization} (The organization where the Practitioner performs the roles associated.) */ - public PractitionerPractitionerRoleComponent setManagingOrganization(Reference value) { - this.managingOrganization = value; + public PractitionerPractitionerRoleComponent setOrganization(Reference value) { + this.organization = value; return this; } /** - * @return {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization where the Practitioner performs the roles associated.) + * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization where the Practitioner performs the roles associated.) */ - public Organization getManagingOrganizationTarget() { - if (this.managingOrganizationTarget == null) + public Organization getOrganizationTarget() { + if (this.organizationTarget == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.managingOrganization"); + throw new Error("Attempt to auto-create PractitionerPractitionerRoleComponent.organization"); else if (Configuration.doAutoCreate()) - this.managingOrganizationTarget = new Organization(); // aa - return this.managingOrganizationTarget; + this.organizationTarget = new Organization(); // aa + return this.organizationTarget; } /** - * @param value {@link #managingOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization where the Practitioner performs the roles associated.) + * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization where the Practitioner performs the roles associated.) */ - public PractitionerPractitionerRoleComponent setManagingOrganizationTarget(Organization value) { - this.managingOrganizationTarget = value; + public PractitionerPractitionerRoleComponent setOrganizationTarget(Organization value) { + this.organizationTarget = value; return this; } @@ -226,6 +238,86 @@ public class Practitioner extends DomainResource { return this; } + /** + * @return {@link #identifier} (Business Identifiers that are specific to a role/location.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Business Identifiers that are specific to a role/location.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public PractitionerPractitionerRoleComponent addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #telecom} (Contact details that are specific to the role/location/service.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details that are specific to the role/location/service.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public PractitionerPractitionerRoleComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + /** * @return {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.) */ @@ -374,9 +466,11 @@ public class Practitioner extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("managingOrganization", "Reference(Organization)", "The organization where the Practitioner performs the roles associated.", 0, java.lang.Integer.MAX_VALUE, managingOrganization)); + childrenList.add(new Property("organization", "Reference(Organization)", "The organization where the Practitioner performs the roles associated.", 0, java.lang.Integer.MAX_VALUE, organization)); childrenList.add(new Property("role", "CodeableConcept", "Roles which this practitioner is authorized to perform for the organization.", 0, java.lang.Integer.MAX_VALUE, role)); childrenList.add(new Property("specialty", "CodeableConcept", "Specific specialty of the practitioner.", 0, java.lang.Integer.MAX_VALUE, specialty)); + childrenList.add(new Property("identifier", "Identifier", "Business Identifiers that are specific to a role/location.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details that are specific to the role/location/service.", 0, java.lang.Integer.MAX_VALUE, telecom)); childrenList.add(new Property("period", "Period", "The period during which the person is authorized to act as a practitioner in these role(s) for the organization.", 0, java.lang.Integer.MAX_VALUE, period)); childrenList.add(new Property("location", "Reference(Location)", "The location(s) at which this practitioner provides care.", 0, java.lang.Integer.MAX_VALUE, location)); childrenList.add(new Property("healthcareService", "Reference(HealthcareService)", "The list of healthcare services that this worker provides for this role's Organization/Location(s).", 0, java.lang.Integer.MAX_VALUE, healthcareService)); @@ -384,12 +478,16 @@ public class Practitioner extends DomainResource { @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("managingOrganization")) - this.managingOrganization = castToReference(value); // Reference + if (name.equals("organization")) + this.organization = castToReference(value); // Reference else if (name.equals("role")) this.role = castToCodeableConcept(value); // CodeableConcept else if (name.equals("specialty")) this.getSpecialty().add(castToCodeableConcept(value)); + else if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); else if (name.equals("period")) this.period = castToPeriod(value); // Period else if (name.equals("location")) @@ -402,9 +500,9 @@ public class Practitioner extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("managingOrganization")) { - this.managingOrganization = new Reference(); - return this.managingOrganization; + if (name.equals("organization")) { + this.organization = new Reference(); + return this.organization; } else if (name.equals("role")) { this.role = new CodeableConcept(); @@ -413,6 +511,12 @@ public class Practitioner extends DomainResource { else if (name.equals("specialty")) { return addSpecialty(); } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("telecom")) { + return addTelecom(); + } else if (name.equals("period")) { this.period = new Period(); return this.period; @@ -430,13 +534,23 @@ public class Practitioner extends DomainResource { public PractitionerPractitionerRoleComponent copy() { PractitionerPractitionerRoleComponent dst = new PractitionerPractitionerRoleComponent(); copyValues(dst); - dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy(); + dst.organization = organization == null ? null : organization.copy(); dst.role = role == null ? null : role.copy(); if (specialty != null) { dst.specialty = new ArrayList(); for (CodeableConcept i : specialty) dst.specialty.add(i.copy()); }; + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; dst.period = period == null ? null : period.copy(); if (location != null) { dst.location = new ArrayList(); @@ -458,9 +572,10 @@ public class Practitioner extends DomainResource { if (!(other instanceof PractitionerPractitionerRoleComponent)) return false; PractitionerPractitionerRoleComponent o = (PractitionerPractitionerRoleComponent) other; - return compareDeep(managingOrganization, o.managingOrganization, true) && compareDeep(role, o.role, true) - && compareDeep(specialty, o.specialty, true) && compareDeep(period, o.period, true) && compareDeep(location, o.location, true) - && compareDeep(healthcareService, o.healthcareService, true); + return compareDeep(organization, o.organization, true) && compareDeep(role, o.role, true) && compareDeep(specialty, o.specialty, true) + && compareDeep(identifier, o.identifier, true) && compareDeep(telecom, o.telecom, true) && compareDeep(period, o.period, true) + && compareDeep(location, o.location, true) && compareDeep(healthcareService, o.healthcareService, true) + ; } @Override @@ -474,9 +589,8 @@ public class Practitioner extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (managingOrganization == null || managingOrganization.isEmpty()) && (role == null || role.isEmpty()) - && (specialty == null || specialty.isEmpty()) && (period == null || period.isEmpty()) && (location == null || location.isEmpty()) - && (healthcareService == null || healthcareService.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( organization, role, specialty + , identifier, telecom, period, location, healthcareService); } public String fhirType() { @@ -749,8 +863,8 @@ public class Practitioner extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (code == null || code.isEmpty()) - && (period == null || period.isEmpty()) && (issuer == null || issuer.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, code, period, issuer + ); } public String fhirType() { @@ -775,24 +889,25 @@ public class Practitioner extends DomainResource { protected BooleanType active; /** - * A name associated with the person. + * The name(s) associated with the practitioner. */ - @Child(name = "name", type = {HumanName.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="A name associated with the person", formalDefinition="A name associated with the person." ) - protected HumanName name; + @Child(name = "name", type = {HumanName.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The name(s) associated with the practitioner", formalDefinition="The name(s) associated with the practitioner." ) + protected List name; /** * A contact detail for the practitioner, e.g. a telephone number or an email address. */ @Child(name = "telecom", type = {ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="A contact detail for the practitioner", formalDefinition="A contact detail for the practitioner, e.g. a telephone number or an email address." ) + @Description(shortDefinition="A contact detail for the practitioner (that apply to all roles)", formalDefinition="A contact detail for the practitioner, e.g. a telephone number or an email address." ) protected List telecom; /** - * The postal address where the practitioner can be found or visited or to which mail can be delivered. + * Address(es) of the practitioner that are not role specific (typically home address). +Work addresses are not typically entered in this property as they are usually role dependent. */ @Child(name = "address", type = {Address.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Where practitioner can be found/visited", formalDefinition="The postal address where the practitioner can be found or visited or to which mail can be delivered." ) + @Description(shortDefinition="Address(es) of the practitioner that are not role specific (typically home address)", formalDefinition="Address(es) of the practitioner that are not role specific (typically home address). \nWork addresses are not typically entered in this property as they are usually role dependent." ) protected List
address; /** @@ -837,7 +952,7 @@ public class Practitioner extends DomainResource { @Description(shortDefinition="A language the practitioner is able to use in patient communication", formalDefinition="A language the practitioner is able to use in patient communication." ) protected List communication; - private static final long serialVersionUID = 1066276346L; + private static final long serialVersionUID = 2137859974L; /** * Constructor @@ -932,26 +1047,42 @@ public class Practitioner extends DomainResource { } /** - * @return {@link #name} (A name associated with the person.) + * @return {@link #name} (The name(s) associated with the practitioner.) */ - public HumanName getName() { + public List getName() { if (this.name == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Practitioner.name"); - else if (Configuration.doAutoCreate()) - this.name = new HumanName(); // cc + this.name = new ArrayList(); return this.name; } public boolean hasName() { - return this.name != null && !this.name.isEmpty(); + if (this.name == null) + return false; + for (HumanName item : this.name) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #name} (A name associated with the person.) + * @return {@link #name} (The name(s) associated with the practitioner.) */ - public Practitioner setName(HumanName value) { - this.name = value; + // syntactic sugar + public HumanName addName() { //3 + HumanName t = new HumanName(); + if (this.name == null) + this.name = new ArrayList(); + this.name.add(t); + return t; + } + + // syntactic sugar + public Practitioner addName(HumanName t) { //3 + if (t == null) + return this; + if (this.name == null) + this.name = new ArrayList(); + this.name.add(t); return this; } @@ -996,7 +1127,8 @@ public class Practitioner extends DomainResource { } /** - * @return {@link #address} (The postal address where the practitioner can be found or visited or to which mail can be delivered.) + * @return {@link #address} (Address(es) of the practitioner that are not role specific (typically home address). +Work addresses are not typically entered in this property as they are usually role dependent.) */ public List
getAddress() { if (this.address == null) @@ -1014,7 +1146,8 @@ public class Practitioner extends DomainResource { } /** - * @return {@link #address} (The postal address where the practitioner can be found or visited or to which mail can be delivered.) + * @return {@link #address} (Address(es) of the practitioner that are not role specific (typically home address). +Work addresses are not typically entered in this property as they are usually role dependent.) */ // syntactic sugar public Address addAddress() { //3 @@ -1297,9 +1430,9 @@ public class Practitioner extends DomainResource { super.listChildren(childrenList); childrenList.add(new Property("identifier", "Identifier", "An identifier that applies to this person in this role.", 0, java.lang.Integer.MAX_VALUE, identifier)); childrenList.add(new Property("active", "boolean", "Whether this practitioner's record is in active use.", 0, java.lang.Integer.MAX_VALUE, active)); - childrenList.add(new Property("name", "HumanName", "A name associated with the person.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("name", "HumanName", "The name(s) associated with the practitioner.", 0, java.lang.Integer.MAX_VALUE, name)); childrenList.add(new Property("telecom", "ContactPoint", "A contact detail for the practitioner, e.g. a telephone number or an email address.", 0, java.lang.Integer.MAX_VALUE, telecom)); - childrenList.add(new Property("address", "Address", "The postal address where the practitioner can be found or visited or to which mail can be delivered.", 0, java.lang.Integer.MAX_VALUE, address)); + childrenList.add(new Property("address", "Address", "Address(es) of the practitioner that are not role specific (typically home address). \nWork addresses are not typically entered in this property as they are usually role dependent.", 0, java.lang.Integer.MAX_VALUE, address)); childrenList.add(new Property("gender", "code", "Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes.", 0, java.lang.Integer.MAX_VALUE, gender)); childrenList.add(new Property("birthDate", "date", "The date of birth for the practitioner.", 0, java.lang.Integer.MAX_VALUE, birthDate)); childrenList.add(new Property("photo", "Attachment", "Image of the person.", 0, java.lang.Integer.MAX_VALUE, photo)); @@ -1315,7 +1448,7 @@ public class Practitioner extends DomainResource { else if (name.equals("active")) this.active = castToBoolean(value); // BooleanType else if (name.equals("name")) - this.name = castToHumanName(value); // HumanName + this.getName().add(castToHumanName(value)); else if (name.equals("telecom")) this.getTelecom().add(castToContactPoint(value)); else if (name.equals("address")) @@ -1345,8 +1478,7 @@ public class Practitioner extends DomainResource { throw new FHIRException("Cannot call addChild on a primitive type Practitioner.active"); } else if (name.equals("name")) { - this.name = new HumanName(); - return this.name; + return addName(); } else if (name.equals("telecom")) { return addTelecom(); @@ -1390,7 +1522,11 @@ public class Practitioner extends DomainResource { dst.identifier.add(i.copy()); }; dst.active = active == null ? null : active.copy(); - dst.name = name == null ? null : name.copy(); + if (name != null) { + dst.name = new ArrayList(); + for (HumanName i : name) + dst.name.add(i.copy()); + }; if (telecom != null) { dst.telecom = new ArrayList(); for (ContactPoint i : telecom) @@ -1456,11 +1592,8 @@ public class Practitioner extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (active == null || active.isEmpty()) - && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) && (address == null || address.isEmpty()) - && (gender == null || gender.isEmpty()) && (birthDate == null || birthDate.isEmpty()) && (photo == null || photo.isEmpty()) - && (practitionerRole == null || practitionerRole.isEmpty()) && (qualification == null || qualification.isEmpty()) - && (communication == null || communication.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, active, name, telecom + , address, gender, birthDate, photo, practitionerRole, qualification, communication); } @Override @@ -1473,17 +1606,17 @@ public class Practitioner extends DomainResource { *

* Description: A practitioner's Identifier
* Type: token
- * Path: Practitioner.identifier
+ * Path: Practitioner.identifier, Practitioner.practitionerRole.identifier
*

*/ - @SearchParamDefinition(name="identifier", path="Practitioner.identifier", description="A practitioner's Identifier", type="token" ) + @SearchParamDefinition(name="identifier", path="Practitioner.identifier | Practitioner.practitionerRole.identifier", description="A practitioner's Identifier", type="token" ) public static final String SP_IDENTIFIER = "identifier"; /** * Fluent Client search parameter constant for identifier *

* Description: A practitioner's Identifier
* Type: token
- * Path: Practitioner.identifier
+ * Path: Practitioner.identifier, Practitioner.practitionerRole.identifier
*

*/ public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); @@ -1673,17 +1806,17 @@ public class Practitioner extends DomainResource { *

* Description: A value in a phone contact
* Type: token
- * Path: Practitioner.telecom(system=phone)
+ * Path: Practitioner.telecom(system=phone), Practitioner.practitionerRole.telecom(system=phone)
*

*/ - @SearchParamDefinition(name="phone", path="Practitioner.telecom.where(system='phone')", description="A value in a phone contact", type="token" ) + @SearchParamDefinition(name="phone", path="Practitioner.telecom.where(system='phone') or Practitioner.practitionerRole.telecom.where(system='phone')", description="A value in a phone contact", type="token" ) public static final String SP_PHONE = "phone"; /** * Fluent Client search parameter constant for phone *

* Description: A value in a phone contact
* Type: token
- * Path: Practitioner.telecom(system=phone)
+ * Path: Practitioner.telecom(system=phone), Practitioner.practitionerRole.telecom(system=phone)
*

*/ public static final ca.uhn.fhir.rest.gclient.TokenClientParam PHONE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PHONE); @@ -1693,17 +1826,17 @@ public class Practitioner extends DomainResource { *

* Description: The identity of the organization the practitioner represents / acts on behalf of
* Type: reference
- * Path: Practitioner.practitionerRole.managingOrganization
+ * Path: Practitioner.practitionerRole.organization
*

*/ - @SearchParamDefinition(name="organization", path="Practitioner.practitionerRole.managingOrganization", description="The identity of the organization the practitioner represents / acts on behalf of", type="reference" ) + @SearchParamDefinition(name="organization", path="Practitioner.practitionerRole.organization", description="The identity of the organization the practitioner represents / acts on behalf of", type="reference" ) public static final String SP_ORGANIZATION = "organization"; /** * Fluent Client search parameter constant for organization *

* Description: The identity of the organization the practitioner represents / acts on behalf of
* Type: reference
- * Path: Practitioner.practitionerRole.managingOrganization
+ * Path: Practitioner.practitionerRole.organization
*

*/ public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); @@ -1759,17 +1892,17 @@ public class Practitioner extends DomainResource { *

* Description: The value in any kind of contact
* Type: token
- * Path: Practitioner.telecom
+ * Path: Practitioner.telecom, Practitioner.practitionerRole.telecom
*

*/ - @SearchParamDefinition(name="telecom", path="Practitioner.telecom", description="The value in any kind of contact", type="token" ) + @SearchParamDefinition(name="telecom", path="Practitioner.telecom | Practitioner.practitionerRole.telecom", description="The value in any kind of contact", type="token" ) public static final String SP_TELECOM = "telecom"; /** * Fluent Client search parameter constant for telecom *

* Description: The value in any kind of contact
* Type: token
- * Path: Practitioner.telecom
+ * Path: Practitioner.telecom, Practitioner.practitionerRole.telecom
*

*/ public static final ca.uhn.fhir.rest.gclient.TokenClientParam TELECOM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TELECOM); @@ -1865,17 +1998,17 @@ public class Practitioner extends DomainResource { *

* Description: A value in an email contact
* Type: token
- * Path: Practitioner.telecom(system=email)
+ * Path: Practitioner.telecom(system=email), Practitioner.practitionerRole.telecom(system=email)
*

*/ - @SearchParamDefinition(name="email", path="Practitioner.telecom.where(system='email')", description="A value in an email contact", type="token" ) + @SearchParamDefinition(name="email", path="Practitioner.telecom.where(system='email') or Practitioner.practitionerRole.telecom.where(system='email')", description="A value in an email contact", type="token" ) public static final String SP_EMAIL = "email"; /** * Fluent Client search parameter constant for email *

* Description: A value in an email contact
* Type: token
- * Path: Practitioner.telecom(system=email)
+ * Path: Practitioner.telecom(system=email), Practitioner.practitionerRole.telecom(system=email)
*

*/ public static final ca.uhn.fhir.rest.gclient.TokenClientParam EMAIL = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EMAIL); diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/PractitionerRole.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/PractitionerRole.java new file mode 100644 index 00000000000..a1041dc7c67 --- /dev/null +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/PractitionerRole.java @@ -0,0 +1,1626 @@ +package org.hl7.fhir.dstu3.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; +/** + * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time. + */ +@ResourceDef(name="PractitionerRole", profile="http://hl7.org/fhir/Profile/PractitionerRole") +public class PractitionerRole extends DomainResource { + + @Block() + public static class PractitionerRoleAvailableTimeComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Indicates which days of the week are available between the start and end Times. + */ + @Child(name = "daysOfWeek", type = {CodeType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="mon | tue | wed | thu | fri | sat | sun", formalDefinition="Indicates which days of the week are available between the start and end Times." ) + protected List daysOfWeek; + + /** + * Is this always available? (hence times are irrelevant) e.g. 24 hour service. + */ + @Child(name = "allDay", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Always available? e.g. 24 hour service", formalDefinition="Is this always available? (hence times are irrelevant) e.g. 24 hour service." ) + protected BooleanType allDay; + + /** + * The opening time of day. Note: If the AllDay flag is set, then this time is ignored. + */ + @Child(name = "availableStartTime", type = {TimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Opening time of day (ignored if allDay = true)", formalDefinition="The opening time of day. Note: If the AllDay flag is set, then this time is ignored." ) + protected TimeType availableStartTime; + + /** + * The closing time of day. Note: If the AllDay flag is set, then this time is ignored. + */ + @Child(name = "availableEndTime", type = {TimeType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Closing time of day (ignored if allDay = true)", formalDefinition="The closing time of day. Note: If the AllDay flag is set, then this time is ignored." ) + protected TimeType availableEndTime; + + private static final long serialVersionUID = 2079379177L; + + /** + * Constructor + */ + public PractitionerRoleAvailableTimeComponent() { + super(); + } + + /** + * @return {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.) + */ + public List getDaysOfWeek() { + if (this.daysOfWeek == null) + this.daysOfWeek = new ArrayList(); + return this.daysOfWeek; + } + + public boolean hasDaysOfWeek() { + if (this.daysOfWeek == null) + return false; + for (CodeType item : this.daysOfWeek) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.) + */ + // syntactic sugar + public CodeType addDaysOfWeekElement() {//2 + CodeType t = new CodeType(); + if (this.daysOfWeek == null) + this.daysOfWeek = new ArrayList(); + this.daysOfWeek.add(t); + return t; + } + + /** + * @param value {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.) + */ + public PractitionerRoleAvailableTimeComponent addDaysOfWeek(String value) { //1 + CodeType t = new CodeType(); + t.setValue(value); + if (this.daysOfWeek == null) + this.daysOfWeek = new ArrayList(); + this.daysOfWeek.add(t); + return this; + } + + /** + * @param value {@link #daysOfWeek} (Indicates which days of the week are available between the start and end Times.) + */ + public boolean hasDaysOfWeek(String value) { + if (this.daysOfWeek == null) + return false; + for (CodeType v : this.daysOfWeek) + if (v.equals(value)) // code + return true; + return false; + } + + /** + * @return {@link #allDay} (Is this always available? (hence times are irrelevant) e.g. 24 hour service.). This is the underlying object with id, value and extensions. The accessor "getAllDay" gives direct access to the value + */ + public BooleanType getAllDayElement() { + if (this.allDay == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerRoleAvailableTimeComponent.allDay"); + else if (Configuration.doAutoCreate()) + this.allDay = new BooleanType(); // bb + return this.allDay; + } + + public boolean hasAllDayElement() { + return this.allDay != null && !this.allDay.isEmpty(); + } + + public boolean hasAllDay() { + return this.allDay != null && !this.allDay.isEmpty(); + } + + /** + * @param value {@link #allDay} (Is this always available? (hence times are irrelevant) e.g. 24 hour service.). This is the underlying object with id, value and extensions. The accessor "getAllDay" gives direct access to the value + */ + public PractitionerRoleAvailableTimeComponent setAllDayElement(BooleanType value) { + this.allDay = value; + return this; + } + + /** + * @return Is this always available? (hence times are irrelevant) e.g. 24 hour service. + */ + public boolean getAllDay() { + return this.allDay == null || this.allDay.isEmpty() ? false : this.allDay.getValue(); + } + + /** + * @param value Is this always available? (hence times are irrelevant) e.g. 24 hour service. + */ + public PractitionerRoleAvailableTimeComponent setAllDay(boolean value) { + if (this.allDay == null) + this.allDay = new BooleanType(); + this.allDay.setValue(value); + return this; + } + + /** + * @return {@link #availableStartTime} (The opening time of day. Note: If the AllDay flag is set, then this time is ignored.). This is the underlying object with id, value and extensions. The accessor "getAvailableStartTime" gives direct access to the value + */ + public TimeType getAvailableStartTimeElement() { + if (this.availableStartTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerRoleAvailableTimeComponent.availableStartTime"); + else if (Configuration.doAutoCreate()) + this.availableStartTime = new TimeType(); // bb + return this.availableStartTime; + } + + public boolean hasAvailableStartTimeElement() { + return this.availableStartTime != null && !this.availableStartTime.isEmpty(); + } + + public boolean hasAvailableStartTime() { + return this.availableStartTime != null && !this.availableStartTime.isEmpty(); + } + + /** + * @param value {@link #availableStartTime} (The opening time of day. Note: If the AllDay flag is set, then this time is ignored.). This is the underlying object with id, value and extensions. The accessor "getAvailableStartTime" gives direct access to the value + */ + public PractitionerRoleAvailableTimeComponent setAvailableStartTimeElement(TimeType value) { + this.availableStartTime = value; + return this; + } + + /** + * @return The opening time of day. Note: If the AllDay flag is set, then this time is ignored. + */ + public String getAvailableStartTime() { + return this.availableStartTime == null ? null : this.availableStartTime.getValue(); + } + + /** + * @param value The opening time of day. Note: If the AllDay flag is set, then this time is ignored. + */ + public PractitionerRoleAvailableTimeComponent setAvailableStartTime(String value) { + if (value == null) + this.availableStartTime = null; + else { + if (this.availableStartTime == null) + this.availableStartTime = new TimeType(); + this.availableStartTime.setValue(value); + } + return this; + } + + /** + * @return {@link #availableEndTime} (The closing time of day. Note: If the AllDay flag is set, then this time is ignored.). This is the underlying object with id, value and extensions. The accessor "getAvailableEndTime" gives direct access to the value + */ + public TimeType getAvailableEndTimeElement() { + if (this.availableEndTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerRoleAvailableTimeComponent.availableEndTime"); + else if (Configuration.doAutoCreate()) + this.availableEndTime = new TimeType(); // bb + return this.availableEndTime; + } + + public boolean hasAvailableEndTimeElement() { + return this.availableEndTime != null && !this.availableEndTime.isEmpty(); + } + + public boolean hasAvailableEndTime() { + return this.availableEndTime != null && !this.availableEndTime.isEmpty(); + } + + /** + * @param value {@link #availableEndTime} (The closing time of day. Note: If the AllDay flag is set, then this time is ignored.). This is the underlying object with id, value and extensions. The accessor "getAvailableEndTime" gives direct access to the value + */ + public PractitionerRoleAvailableTimeComponent setAvailableEndTimeElement(TimeType value) { + this.availableEndTime = value; + return this; + } + + /** + * @return The closing time of day. Note: If the AllDay flag is set, then this time is ignored. + */ + public String getAvailableEndTime() { + return this.availableEndTime == null ? null : this.availableEndTime.getValue(); + } + + /** + * @param value The closing time of day. Note: If the AllDay flag is set, then this time is ignored. + */ + public PractitionerRoleAvailableTimeComponent setAvailableEndTime(String value) { + if (value == null) + this.availableEndTime = null; + else { + if (this.availableEndTime == null) + this.availableEndTime = new TimeType(); + this.availableEndTime.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("daysOfWeek", "code", "Indicates which days of the week are available between the start and end Times.", 0, java.lang.Integer.MAX_VALUE, daysOfWeek)); + childrenList.add(new Property("allDay", "boolean", "Is this always available? (hence times are irrelevant) e.g. 24 hour service.", 0, java.lang.Integer.MAX_VALUE, allDay)); + childrenList.add(new Property("availableStartTime", "time", "The opening time of day. Note: If the AllDay flag is set, then this time is ignored.", 0, java.lang.Integer.MAX_VALUE, availableStartTime)); + childrenList.add(new Property("availableEndTime", "time", "The closing time of day. Note: If the AllDay flag is set, then this time is ignored.", 0, java.lang.Integer.MAX_VALUE, availableEndTime)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("daysOfWeek")) + this.getDaysOfWeek().add(castToCode(value)); + else if (name.equals("allDay")) + this.allDay = castToBoolean(value); // BooleanType + else if (name.equals("availableStartTime")) + this.availableStartTime = castToTime(value); // TimeType + else if (name.equals("availableEndTime")) + this.availableEndTime = castToTime(value); // TimeType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("daysOfWeek")) { + throw new FHIRException("Cannot call addChild on a primitive type PractitionerRole.daysOfWeek"); + } + else if (name.equals("allDay")) { + throw new FHIRException("Cannot call addChild on a primitive type PractitionerRole.allDay"); + } + else if (name.equals("availableStartTime")) { + throw new FHIRException("Cannot call addChild on a primitive type PractitionerRole.availableStartTime"); + } + else if (name.equals("availableEndTime")) { + throw new FHIRException("Cannot call addChild on a primitive type PractitionerRole.availableEndTime"); + } + else + return super.addChild(name); + } + + public PractitionerRoleAvailableTimeComponent copy() { + PractitionerRoleAvailableTimeComponent dst = new PractitionerRoleAvailableTimeComponent(); + copyValues(dst); + if (daysOfWeek != null) { + dst.daysOfWeek = new ArrayList(); + for (CodeType i : daysOfWeek) + dst.daysOfWeek.add(i.copy()); + }; + dst.allDay = allDay == null ? null : allDay.copy(); + dst.availableStartTime = availableStartTime == null ? null : availableStartTime.copy(); + dst.availableEndTime = availableEndTime == null ? null : availableEndTime.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof PractitionerRoleAvailableTimeComponent)) + return false; + PractitionerRoleAvailableTimeComponent o = (PractitionerRoleAvailableTimeComponent) other; + return compareDeep(daysOfWeek, o.daysOfWeek, true) && compareDeep(allDay, o.allDay, true) && compareDeep(availableStartTime, o.availableStartTime, true) + && compareDeep(availableEndTime, o.availableEndTime, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof PractitionerRoleAvailableTimeComponent)) + return false; + PractitionerRoleAvailableTimeComponent o = (PractitionerRoleAvailableTimeComponent) other; + return compareValues(daysOfWeek, o.daysOfWeek, true) && compareValues(allDay, o.allDay, true) && compareValues(availableStartTime, o.availableStartTime, true) + && compareValues(availableEndTime, o.availableEndTime, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( daysOfWeek, allDay, availableStartTime + , availableEndTime); + } + + public String fhirType() { + return "PractitionerRole.availableTime"; + + } + + } + + @Block() + public static class PractitionerRoleNotAvailableComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The reason that can be presented to the user as to why this time is not available. + */ + @Child(name = "description", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Reason presented to the user explaining why time not available", formalDefinition="The reason that can be presented to the user as to why this time is not available." ) + protected StringType description; + + /** + * Service is not available (seasonally or for a public holiday) from this date. + */ + @Child(name = "during", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Service not availablefrom this date", formalDefinition="Service is not available (seasonally or for a public holiday) from this date." ) + protected Period during; + + private static final long serialVersionUID = 310849929L; + + /** + * Constructor + */ + public PractitionerRoleNotAvailableComponent() { + super(); + } + + /** + * Constructor + */ + public PractitionerRoleNotAvailableComponent(StringType description) { + super(); + this.description = description; + } + + /** + * @return {@link #description} (The reason that can be presented to the user as to why this time is not available.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerRoleNotAvailableComponent.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (The reason that can be presented to the user as to why this time is not available.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public PractitionerRoleNotAvailableComponent setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return The reason that can be presented to the user as to why this time is not available. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value The reason that can be presented to the user as to why this time is not available. + */ + public PractitionerRoleNotAvailableComponent setDescription(String value) { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + return this; + } + + /** + * @return {@link #during} (Service is not available (seasonally or for a public holiday) from this date.) + */ + public Period getDuring() { + if (this.during == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerRoleNotAvailableComponent.during"); + else if (Configuration.doAutoCreate()) + this.during = new Period(); // cc + return this.during; + } + + public boolean hasDuring() { + return this.during != null && !this.during.isEmpty(); + } + + /** + * @param value {@link #during} (Service is not available (seasonally or for a public holiday) from this date.) + */ + public PractitionerRoleNotAvailableComponent setDuring(Period value) { + this.during = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("description", "string", "The reason that can be presented to the user as to why this time is not available.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("during", "Period", "Service is not available (seasonally or for a public holiday) from this date.", 0, java.lang.Integer.MAX_VALUE, during)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("during")) + this.during = castToPeriod(value); // Period + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type PractitionerRole.description"); + } + else if (name.equals("during")) { + this.during = new Period(); + return this.during; + } + else + return super.addChild(name); + } + + public PractitionerRoleNotAvailableComponent copy() { + PractitionerRoleNotAvailableComponent dst = new PractitionerRoleNotAvailableComponent(); + copyValues(dst); + dst.description = description == null ? null : description.copy(); + dst.during = during == null ? null : during.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof PractitionerRoleNotAvailableComponent)) + return false; + PractitionerRoleNotAvailableComponent o = (PractitionerRoleNotAvailableComponent) other; + return compareDeep(description, o.description, true) && compareDeep(during, o.during, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof PractitionerRoleNotAvailableComponent)) + return false; + PractitionerRoleNotAvailableComponent o = (PractitionerRoleNotAvailableComponent) other; + return compareValues(description, o.description, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( description, during); + } + + public String fhirType() { + return "PractitionerRole.notAvailable"; + + } + + } + + /** + * Business Identifiers that are specific to a role/location. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Business Identifiers that are specific to a role/location", formalDefinition="Business Identifiers that are specific to a role/location." ) + protected List identifier; + + /** + * Whether this practitioner's record is in active use. + */ + @Child(name = "active", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Whether this practitioner's record is in active use", formalDefinition="Whether this practitioner's record is in active use." ) + protected BooleanType active; + + /** + * Practitioner that is able to provide the defined services for the organation. + */ + @Child(name = "practitioner", type = {Practitioner.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Practitioner that is able to provide the defined services for the organation", formalDefinition="Practitioner that is able to provide the defined services for the organation." ) + protected Reference practitioner; + + /** + * The actual object that is the target of the reference (Practitioner that is able to provide the defined services for the organation.) + */ + protected Practitioner practitionerTarget; + + /** + * The organization where the Practitioner performs the roles associated. + */ + @Child(name = "organization", type = {Organization.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Organization where the roles are available", formalDefinition="The organization where the Practitioner performs the roles associated." ) + protected Reference organization; + + /** + * The actual object that is the target of the reference (The organization where the Practitioner performs the roles associated.) + */ + protected Organization organizationTarget; + + /** + * Roles which this practitioner is authorized to perform for the organization. + */ + @Child(name = "role", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Roles which this practitioner may perform", formalDefinition="Roles which this practitioner is authorized to perform for the organization." ) + protected List role; + + /** + * Specific specialty of the practitioner. + */ + @Child(name = "specialty", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Specific specialty of the practitioner", formalDefinition="Specific specialty of the practitioner." ) + protected List specialty; + + /** + * The location(s) at which this practitioner provides care. + */ + @Child(name = "location", type = {Location.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The location(s) at which this practitioner provides care", formalDefinition="The location(s) at which this practitioner provides care." ) + protected List location; + /** + * The actual objects that are the target of the reference (The location(s) at which this practitioner provides care.) + */ + protected List locationTarget; + + + /** + * The list of healthcare services that this worker provides for this role's Organization/Location(s). + */ + @Child(name = "healthcareService", type = {HealthcareService.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="The list of healthcare services that this worker provides for this role's Organization/Location(s)", formalDefinition="The list of healthcare services that this worker provides for this role's Organization/Location(s)." ) + protected List healthcareService; + /** + * The actual objects that are the target of the reference (The list of healthcare services that this worker provides for this role's Organization/Location(s).) + */ + protected List healthcareServiceTarget; + + + /** + * Contact details that are specific to the role/location/service. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details that are specific to the role/location/service", formalDefinition="Contact details that are specific to the role/location/service." ) + protected List telecom; + + /** + * The period during which the person is authorized to act as a practitioner in these role(s) for the organization. + */ + @Child(name = "period", type = {Period.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The period during which the practitioner is authorized to perform in these role(s)", formalDefinition="The period during which the person is authorized to act as a practitioner in these role(s) for the organization." ) + protected Period period; + + /** + * A collection of times that the Service Site is available. + */ + @Child(name = "availableTime", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Times the Service Site is available", formalDefinition="A collection of times that the Service Site is available." ) + protected List availableTime; + + /** + * The HealthcareService is not available during this period of time due to the provided reason. + */ + @Child(name = "notAvailable", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Not available during this time due to provided reason", formalDefinition="The HealthcareService is not available during this period of time due to the provided reason." ) + protected List notAvailable; + + /** + * A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times. + */ + @Child(name = "availabilityExceptions", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Description of availability exceptions", formalDefinition="A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times." ) + protected StringType availabilityExceptions; + + private static final long serialVersionUID = -408504135L; + + /** + * Constructor + */ + public PractitionerRole() { + super(); + } + + /** + * @return {@link #identifier} (Business Identifiers that are specific to a role/location.) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Business Identifiers that are specific to a role/location.) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public PractitionerRole addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #active} (Whether this practitioner's record is in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value + */ + public BooleanType getActiveElement() { + if (this.active == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerRole.active"); + else if (Configuration.doAutoCreate()) + this.active = new BooleanType(); // bb + return this.active; + } + + public boolean hasActiveElement() { + return this.active != null && !this.active.isEmpty(); + } + + public boolean hasActive() { + return this.active != null && !this.active.isEmpty(); + } + + /** + * @param value {@link #active} (Whether this practitioner's record is in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value + */ + public PractitionerRole setActiveElement(BooleanType value) { + this.active = value; + return this; + } + + /** + * @return Whether this practitioner's record is in active use. + */ + public boolean getActive() { + return this.active == null || this.active.isEmpty() ? false : this.active.getValue(); + } + + /** + * @param value Whether this practitioner's record is in active use. + */ + public PractitionerRole setActive(boolean value) { + if (this.active == null) + this.active = new BooleanType(); + this.active.setValue(value); + return this; + } + + /** + * @return {@link #practitioner} (Practitioner that is able to provide the defined services for the organation.) + */ + public Reference getPractitioner() { + if (this.practitioner == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerRole.practitioner"); + else if (Configuration.doAutoCreate()) + this.practitioner = new Reference(); // cc + return this.practitioner; + } + + public boolean hasPractitioner() { + return this.practitioner != null && !this.practitioner.isEmpty(); + } + + /** + * @param value {@link #practitioner} (Practitioner that is able to provide the defined services for the organation.) + */ + public PractitionerRole setPractitioner(Reference value) { + this.practitioner = value; + return this; + } + + /** + * @return {@link #practitioner} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Practitioner that is able to provide the defined services for the organation.) + */ + public Practitioner getPractitionerTarget() { + if (this.practitionerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerRole.practitioner"); + else if (Configuration.doAutoCreate()) + this.practitionerTarget = new Practitioner(); // aa + return this.practitionerTarget; + } + + /** + * @param value {@link #practitioner} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Practitioner that is able to provide the defined services for the organation.) + */ + public PractitionerRole setPractitionerTarget(Practitioner value) { + this.practitionerTarget = value; + return this; + } + + /** + * @return {@link #organization} (The organization where the Practitioner performs the roles associated.) + */ + public Reference getOrganization() { + if (this.organization == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerRole.organization"); + else if (Configuration.doAutoCreate()) + this.organization = new Reference(); // cc + return this.organization; + } + + public boolean hasOrganization() { + return this.organization != null && !this.organization.isEmpty(); + } + + /** + * @param value {@link #organization} (The organization where the Practitioner performs the roles associated.) + */ + public PractitionerRole setOrganization(Reference value) { + this.organization = value; + return this; + } + + /** + * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization where the Practitioner performs the roles associated.) + */ + public Organization getOrganizationTarget() { + if (this.organizationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerRole.organization"); + else if (Configuration.doAutoCreate()) + this.organizationTarget = new Organization(); // aa + return this.organizationTarget; + } + + /** + * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization where the Practitioner performs the roles associated.) + */ + public PractitionerRole setOrganizationTarget(Organization value) { + this.organizationTarget = value; + return this; + } + + /** + * @return {@link #role} (Roles which this practitioner is authorized to perform for the organization.) + */ + public List getRole() { + if (this.role == null) + this.role = new ArrayList(); + return this.role; + } + + public boolean hasRole() { + if (this.role == null) + return false; + for (CodeableConcept item : this.role) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #role} (Roles which this practitioner is authorized to perform for the organization.) + */ + // syntactic sugar + public CodeableConcept addRole() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.role == null) + this.role = new ArrayList(); + this.role.add(t); + return t; + } + + // syntactic sugar + public PractitionerRole addRole(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.role == null) + this.role = new ArrayList(); + this.role.add(t); + return this; + } + + /** + * @return {@link #specialty} (Specific specialty of the practitioner.) + */ + public List getSpecialty() { + if (this.specialty == null) + this.specialty = new ArrayList(); + return this.specialty; + } + + public boolean hasSpecialty() { + if (this.specialty == null) + return false; + for (CodeableConcept item : this.specialty) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #specialty} (Specific specialty of the practitioner.) + */ + // syntactic sugar + public CodeableConcept addSpecialty() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.specialty == null) + this.specialty = new ArrayList(); + this.specialty.add(t); + return t; + } + + // syntactic sugar + public PractitionerRole addSpecialty(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.specialty == null) + this.specialty = new ArrayList(); + this.specialty.add(t); + return this; + } + + /** + * @return {@link #location} (The location(s) at which this practitioner provides care.) + */ + public List getLocation() { + if (this.location == null) + this.location = new ArrayList(); + return this.location; + } + + public boolean hasLocation() { + if (this.location == null) + return false; + for (Reference item : this.location) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #location} (The location(s) at which this practitioner provides care.) + */ + // syntactic sugar + public Reference addLocation() { //3 + Reference t = new Reference(); + if (this.location == null) + this.location = new ArrayList(); + this.location.add(t); + return t; + } + + // syntactic sugar + public PractitionerRole addLocation(Reference t) { //3 + if (t == null) + return this; + if (this.location == null) + this.location = new ArrayList(); + this.location.add(t); + return this; + } + + /** + * @return {@link #location} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The location(s) at which this practitioner provides care.) + */ + public List getLocationTarget() { + if (this.locationTarget == null) + this.locationTarget = new ArrayList(); + return this.locationTarget; + } + + // syntactic sugar + /** + * @return {@link #location} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The location(s) at which this practitioner provides care.) + */ + public Location addLocationTarget() { + Location r = new Location(); + if (this.locationTarget == null) + this.locationTarget = new ArrayList(); + this.locationTarget.add(r); + return r; + } + + /** + * @return {@link #healthcareService} (The list of healthcare services that this worker provides for this role's Organization/Location(s).) + */ + public List getHealthcareService() { + if (this.healthcareService == null) + this.healthcareService = new ArrayList(); + return this.healthcareService; + } + + public boolean hasHealthcareService() { + if (this.healthcareService == null) + return false; + for (Reference item : this.healthcareService) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #healthcareService} (The list of healthcare services that this worker provides for this role's Organization/Location(s).) + */ + // syntactic sugar + public Reference addHealthcareService() { //3 + Reference t = new Reference(); + if (this.healthcareService == null) + this.healthcareService = new ArrayList(); + this.healthcareService.add(t); + return t; + } + + // syntactic sugar + public PractitionerRole addHealthcareService(Reference t) { //3 + if (t == null) + return this; + if (this.healthcareService == null) + this.healthcareService = new ArrayList(); + this.healthcareService.add(t); + return this; + } + + /** + * @return {@link #healthcareService} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The list of healthcare services that this worker provides for this role's Organization/Location(s).) + */ + public List getHealthcareServiceTarget() { + if (this.healthcareServiceTarget == null) + this.healthcareServiceTarget = new ArrayList(); + return this.healthcareServiceTarget; + } + + // syntactic sugar + /** + * @return {@link #healthcareService} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. The list of healthcare services that this worker provides for this role's Organization/Location(s).) + */ + public HealthcareService addHealthcareServiceTarget() { + HealthcareService r = new HealthcareService(); + if (this.healthcareServiceTarget == null) + this.healthcareServiceTarget = new ArrayList(); + this.healthcareServiceTarget.add(r); + return r; + } + + /** + * @return {@link #telecom} (Contact details that are specific to the role/location/service.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details that are specific to the role/location/service.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public PractitionerRole addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + /** + * @return {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.) + */ + public Period getPeriod() { + if (this.period == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerRole.period"); + else if (Configuration.doAutoCreate()) + this.period = new Period(); // cc + return this.period; + } + + public boolean hasPeriod() { + return this.period != null && !this.period.isEmpty(); + } + + /** + * @param value {@link #period} (The period during which the person is authorized to act as a practitioner in these role(s) for the organization.) + */ + public PractitionerRole setPeriod(Period value) { + this.period = value; + return this; + } + + /** + * @return {@link #availableTime} (A collection of times that the Service Site is available.) + */ + public List getAvailableTime() { + if (this.availableTime == null) + this.availableTime = new ArrayList(); + return this.availableTime; + } + + public boolean hasAvailableTime() { + if (this.availableTime == null) + return false; + for (PractitionerRoleAvailableTimeComponent item : this.availableTime) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #availableTime} (A collection of times that the Service Site is available.) + */ + // syntactic sugar + public PractitionerRoleAvailableTimeComponent addAvailableTime() { //3 + PractitionerRoleAvailableTimeComponent t = new PractitionerRoleAvailableTimeComponent(); + if (this.availableTime == null) + this.availableTime = new ArrayList(); + this.availableTime.add(t); + return t; + } + + // syntactic sugar + public PractitionerRole addAvailableTime(PractitionerRoleAvailableTimeComponent t) { //3 + if (t == null) + return this; + if (this.availableTime == null) + this.availableTime = new ArrayList(); + this.availableTime.add(t); + return this; + } + + /** + * @return {@link #notAvailable} (The HealthcareService is not available during this period of time due to the provided reason.) + */ + public List getNotAvailable() { + if (this.notAvailable == null) + this.notAvailable = new ArrayList(); + return this.notAvailable; + } + + public boolean hasNotAvailable() { + if (this.notAvailable == null) + return false; + for (PractitionerRoleNotAvailableComponent item : this.notAvailable) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #notAvailable} (The HealthcareService is not available during this period of time due to the provided reason.) + */ + // syntactic sugar + public PractitionerRoleNotAvailableComponent addNotAvailable() { //3 + PractitionerRoleNotAvailableComponent t = new PractitionerRoleNotAvailableComponent(); + if (this.notAvailable == null) + this.notAvailable = new ArrayList(); + this.notAvailable.add(t); + return t; + } + + // syntactic sugar + public PractitionerRole addNotAvailable(PractitionerRoleNotAvailableComponent t) { //3 + if (t == null) + return this; + if (this.notAvailable == null) + this.notAvailable = new ArrayList(); + this.notAvailable.add(t); + return this; + } + + /** + * @return {@link #availabilityExceptions} (A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.). This is the underlying object with id, value and extensions. The accessor "getAvailabilityExceptions" gives direct access to the value + */ + public StringType getAvailabilityExceptionsElement() { + if (this.availabilityExceptions == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create PractitionerRole.availabilityExceptions"); + else if (Configuration.doAutoCreate()) + this.availabilityExceptions = new StringType(); // bb + return this.availabilityExceptions; + } + + public boolean hasAvailabilityExceptionsElement() { + return this.availabilityExceptions != null && !this.availabilityExceptions.isEmpty(); + } + + public boolean hasAvailabilityExceptions() { + return this.availabilityExceptions != null && !this.availabilityExceptions.isEmpty(); + } + + /** + * @param value {@link #availabilityExceptions} (A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.). This is the underlying object with id, value and extensions. The accessor "getAvailabilityExceptions" gives direct access to the value + */ + public PractitionerRole setAvailabilityExceptionsElement(StringType value) { + this.availabilityExceptions = value; + return this; + } + + /** + * @return A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times. + */ + public String getAvailabilityExceptions() { + return this.availabilityExceptions == null ? null : this.availabilityExceptions.getValue(); + } + + /** + * @param value A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times. + */ + public PractitionerRole setAvailabilityExceptions(String value) { + if (Utilities.noString(value)) + this.availabilityExceptions = null; + else { + if (this.availabilityExceptions == null) + this.availabilityExceptions = new StringType(); + this.availabilityExceptions.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "Business Identifiers that are specific to a role/location.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("active", "boolean", "Whether this practitioner's record is in active use.", 0, java.lang.Integer.MAX_VALUE, active)); + childrenList.add(new Property("practitioner", "Reference(Practitioner)", "Practitioner that is able to provide the defined services for the organation.", 0, java.lang.Integer.MAX_VALUE, practitioner)); + childrenList.add(new Property("organization", "Reference(Organization)", "The organization where the Practitioner performs the roles associated.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("role", "CodeableConcept", "Roles which this practitioner is authorized to perform for the organization.", 0, java.lang.Integer.MAX_VALUE, role)); + childrenList.add(new Property("specialty", "CodeableConcept", "Specific specialty of the practitioner.", 0, java.lang.Integer.MAX_VALUE, specialty)); + childrenList.add(new Property("location", "Reference(Location)", "The location(s) at which this practitioner provides care.", 0, java.lang.Integer.MAX_VALUE, location)); + childrenList.add(new Property("healthcareService", "Reference(HealthcareService)", "The list of healthcare services that this worker provides for this role's Organization/Location(s).", 0, java.lang.Integer.MAX_VALUE, healthcareService)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details that are specific to the role/location/service.", 0, java.lang.Integer.MAX_VALUE, telecom)); + childrenList.add(new Property("period", "Period", "The period during which the person is authorized to act as a practitioner in these role(s) for the organization.", 0, java.lang.Integer.MAX_VALUE, period)); + childrenList.add(new Property("availableTime", "", "A collection of times that the Service Site is available.", 0, java.lang.Integer.MAX_VALUE, availableTime)); + childrenList.add(new Property("notAvailable", "", "The HealthcareService is not available during this period of time due to the provided reason.", 0, java.lang.Integer.MAX_VALUE, notAvailable)); + childrenList.add(new Property("availabilityExceptions", "string", "A description of site availability exceptions, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as details in the available Times and not available Times.", 0, java.lang.Integer.MAX_VALUE, availabilityExceptions)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("active")) + this.active = castToBoolean(value); // BooleanType + else if (name.equals("practitioner")) + this.practitioner = castToReference(value); // Reference + else if (name.equals("organization")) + this.organization = castToReference(value); // Reference + else if (name.equals("role")) + this.getRole().add(castToCodeableConcept(value)); + else if (name.equals("specialty")) + this.getSpecialty().add(castToCodeableConcept(value)); + else if (name.equals("location")) + this.getLocation().add(castToReference(value)); + else if (name.equals("healthcareService")) + this.getHealthcareService().add(castToReference(value)); + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else if (name.equals("period")) + this.period = castToPeriod(value); // Period + else if (name.equals("availableTime")) + this.getAvailableTime().add((PractitionerRoleAvailableTimeComponent) value); + else if (name.equals("notAvailable")) + this.getNotAvailable().add((PractitionerRoleNotAvailableComponent) value); + else if (name.equals("availabilityExceptions")) + this.availabilityExceptions = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("active")) { + throw new FHIRException("Cannot call addChild on a primitive type PractitionerRole.active"); + } + else if (name.equals("practitioner")) { + this.practitioner = new Reference(); + return this.practitioner; + } + else if (name.equals("organization")) { + this.organization = new Reference(); + return this.organization; + } + else if (name.equals("role")) { + return addRole(); + } + else if (name.equals("specialty")) { + return addSpecialty(); + } + else if (name.equals("location")) { + return addLocation(); + } + else if (name.equals("healthcareService")) { + return addHealthcareService(); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else if (name.equals("period")) { + this.period = new Period(); + return this.period; + } + else if (name.equals("availableTime")) { + return addAvailableTime(); + } + else if (name.equals("notAvailable")) { + return addNotAvailable(); + } + else if (name.equals("availabilityExceptions")) { + throw new FHIRException("Cannot call addChild on a primitive type PractitionerRole.availabilityExceptions"); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "PractitionerRole"; + + } + + public PractitionerRole copy() { + PractitionerRole dst = new PractitionerRole(); + copyValues(dst); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.active = active == null ? null : active.copy(); + dst.practitioner = practitioner == null ? null : practitioner.copy(); + dst.organization = organization == null ? null : organization.copy(); + if (role != null) { + dst.role = new ArrayList(); + for (CodeableConcept i : role) + dst.role.add(i.copy()); + }; + if (specialty != null) { + dst.specialty = new ArrayList(); + for (CodeableConcept i : specialty) + dst.specialty.add(i.copy()); + }; + if (location != null) { + dst.location = new ArrayList(); + for (Reference i : location) + dst.location.add(i.copy()); + }; + if (healthcareService != null) { + dst.healthcareService = new ArrayList(); + for (Reference i : healthcareService) + dst.healthcareService.add(i.copy()); + }; + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + dst.period = period == null ? null : period.copy(); + if (availableTime != null) { + dst.availableTime = new ArrayList(); + for (PractitionerRoleAvailableTimeComponent i : availableTime) + dst.availableTime.add(i.copy()); + }; + if (notAvailable != null) { + dst.notAvailable = new ArrayList(); + for (PractitionerRoleNotAvailableComponent i : notAvailable) + dst.notAvailable.add(i.copy()); + }; + dst.availabilityExceptions = availabilityExceptions == null ? null : availabilityExceptions.copy(); + return dst; + } + + protected PractitionerRole typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof PractitionerRole)) + return false; + PractitionerRole o = (PractitionerRole) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(active, o.active, true) && compareDeep(practitioner, o.practitioner, true) + && compareDeep(organization, o.organization, true) && compareDeep(role, o.role, true) && compareDeep(specialty, o.specialty, true) + && compareDeep(location, o.location, true) && compareDeep(healthcareService, o.healthcareService, true) + && compareDeep(telecom, o.telecom, true) && compareDeep(period, o.period, true) && compareDeep(availableTime, o.availableTime, true) + && compareDeep(notAvailable, o.notAvailable, true) && compareDeep(availabilityExceptions, o.availabilityExceptions, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof PractitionerRole)) + return false; + PractitionerRole o = (PractitionerRole) other; + return compareValues(active, o.active, true) && compareValues(availabilityExceptions, o.availabilityExceptions, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, active, practitioner + , organization, role, specialty, location, healthcareService, telecom, period, availableTime + , notAvailable, availabilityExceptions); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.PractitionerRole; + } + + /** + * Search parameter: identifier + *

+ * Description: A practitioner's Identifier
+ * Type: token
+ * Path: PractitionerRole.identifier
+ *

+ */ + @SearchParamDefinition(name="identifier", path="PractitionerRole.identifier", description="A practitioner's Identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + /** + * Fluent Client search parameter constant for identifier + *

+ * Description: A practitioner's Identifier
+ * Type: token
+ * Path: PractitionerRole.identifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); + + /** + * Search parameter: specialty + *

+ * Description: The practitioner has this specialty at an organization
+ * Type: token
+ * Path: PractitionerRole.specialty
+ *

+ */ + @SearchParamDefinition(name="specialty", path="PractitionerRole.specialty", description="The practitioner has this specialty at an organization", type="token" ) + public static final String SP_SPECIALTY = "specialty"; + /** + * Fluent Client search parameter constant for specialty + *

+ * Description: The practitioner has this specialty at an organization
+ * Type: token
+ * Path: PractitionerRole.specialty
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam SPECIALTY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SPECIALTY); + + /** + * Search parameter: role + *

+ * Description: The practitioner can perform this role at for the organization
+ * Type: token
+ * Path: PractitionerRole.role
+ *

+ */ + @SearchParamDefinition(name="role", path="PractitionerRole.role", description="The practitioner can perform this role at for the organization", type="token" ) + public static final String SP_ROLE = "role"; + /** + * Fluent Client search parameter constant for role + *

+ * Description: The practitioner can perform this role at for the organization
+ * Type: token
+ * Path: PractitionerRole.role
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam ROLE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ROLE); + + /** + * Search parameter: practitioner + *

+ * Description: Practitioner that is able to provide the defined services for the organation
+ * Type: reference
+ * Path: PractitionerRole.practitioner
+ *

+ */ + @SearchParamDefinition(name="practitioner", path="PractitionerRole.practitioner", description="Practitioner that is able to provide the defined services for the organation", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) + public static final String SP_PRACTITIONER = "practitioner"; + /** + * Fluent Client search parameter constant for practitioner + *

+ * Description: Practitioner that is able to provide the defined services for the organation
+ * Type: reference
+ * Path: PractitionerRole.practitioner
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PRACTITIONER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PRACTITIONER); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "PractitionerRole:practitioner". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PRACTITIONER = new ca.uhn.fhir.model.api.Include("PractitionerRole:practitioner").toLocked(); + + /** + * Search parameter: phone + *

+ * Description: A value in a phone contact
+ * Type: token
+ * Path: PractitionerRole.telecom(system=phone)
+ *

+ */ + @SearchParamDefinition(name="phone", path="PractitionerRole.telecom.where(system='phone')", description="A value in a phone contact", type="token" ) + public static final String SP_PHONE = "phone"; + /** + * Fluent Client search parameter constant for phone + *

+ * Description: A value in a phone contact
+ * Type: token
+ * Path: PractitionerRole.telecom(system=phone)
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam PHONE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PHONE); + + /** + * Search parameter: organization + *

+ * Description: The identity of the organization the practitioner represents / acts on behalf of
+ * Type: reference
+ * Path: PractitionerRole.organization
+ *

+ */ + @SearchParamDefinition(name="organization", path="PractitionerRole.organization", description="The identity of the organization the practitioner represents / acts on behalf of", type="reference" ) + public static final String SP_ORGANIZATION = "organization"; + /** + * Fluent Client search parameter constant for organization + *

+ * Description: The identity of the organization the practitioner represents / acts on behalf of
+ * Type: reference
+ * Path: PractitionerRole.organization
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "PractitionerRole:organization". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("PractitionerRole:organization").toLocked(); + + /** + * Search parameter: telecom + *

+ * Description: The value in any kind of contact
+ * Type: token
+ * Path: PractitionerRole.telecom
+ *

+ */ + @SearchParamDefinition(name="telecom", path="PractitionerRole.telecom", description="The value in any kind of contact", type="token" ) + public static final String SP_TELECOM = "telecom"; + /** + * Fluent Client search parameter constant for telecom + *

+ * Description: The value in any kind of contact
+ * Type: token
+ * Path: PractitionerRole.telecom
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam TELECOM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TELECOM); + + /** + * Search parameter: location + *

+ * Description: One of the locations at which this practitioner provides care
+ * Type: reference
+ * Path: PractitionerRole.location
+ *

+ */ + @SearchParamDefinition(name="location", path="PractitionerRole.location", description="One of the locations at which this practitioner provides care", type="reference" ) + public static final String SP_LOCATION = "location"; + /** + * Fluent Client search parameter constant for location + *

+ * Description: One of the locations at which this practitioner provides care
+ * Type: reference
+ * Path: PractitionerRole.location
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam LOCATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_LOCATION); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "PractitionerRole:location". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_LOCATION = new ca.uhn.fhir.model.api.Include("PractitionerRole:location").toLocked(); + + /** + * Search parameter: email + *

+ * Description: A value in an email contact
+ * Type: token
+ * Path: PractitionerRole.telecom(system=email)
+ *

+ */ + @SearchParamDefinition(name="email", path="PractitionerRole.telecom.where(system='email')", description="A value in an email contact", type="token" ) + public static final String SP_EMAIL = "email"; + /** + * Fluent Client search parameter constant for email + *

+ * Description: A value in an email contact
+ * Type: token
+ * Path: PractitionerRole.telecom(system=email)
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam EMAIL = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EMAIL); + + +} + diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Procedure.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Procedure.java index bb0b1ecb326..89d117bcad2 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Procedure.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Procedure.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy. */ @@ -319,8 +318,7 @@ public class Procedure extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (actor == null || actor.isEmpty()) && (role == null || role.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( actor, role); } public String fhirType() { @@ -495,8 +493,7 @@ public class Procedure extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (action == null || action.isEmpty()) && (manipulated == null || manipulated.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( action, manipulated); } public String fhirType() { @@ -1813,15 +1810,10 @@ public class Procedure extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (subject == null || subject.isEmpty()) - && (status == null || status.isEmpty()) && (category == null || category.isEmpty()) && (code == null || code.isEmpty()) - && (notPerformed == null || notPerformed.isEmpty()) && (reasonNotPerformed == null || reasonNotPerformed.isEmpty()) - && (bodySite == null || bodySite.isEmpty()) && (reason == null || reason.isEmpty()) && (performer == null || performer.isEmpty()) - && (performed == null || performed.isEmpty()) && (encounter == null || encounter.isEmpty()) - && (location == null || location.isEmpty()) && (outcome == null || outcome.isEmpty()) && (report == null || report.isEmpty()) - && (complication == null || complication.isEmpty()) && (followUp == null || followUp.isEmpty()) - && (request == null || request.isEmpty()) && (notes == null || notes.isEmpty()) && (focalDevice == null || focalDevice.isEmpty()) - && (used == null || used.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, subject, status, category + , code, notPerformed, reasonNotPerformed, bodySite, reason, performer, performed, encounter + , location, outcome, report, complication, followUp, request, notes, focalDevice, used + ); } @Override @@ -1897,7 +1889,7 @@ public class Procedure extends DomainResource { * Path: Procedure.performer.actor
*

*/ - @SearchParamDefinition(name="performer", path="Procedure.performer.actor", description="The reference to the practitioner", type="reference" ) + @SearchParamDefinition(name="performer", path="Procedure.performer.actor", description="The reference to the practitioner", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_PERFORMER = "performer"; /** * Fluent Client search parameter constant for performer @@ -1949,7 +1941,7 @@ public class Procedure extends DomainResource { * Path: Procedure.subject
*

*/ - @SearchParamDefinition(name="patient", path="Procedure.subject", description="Search by subject - a patient", type="reference" ) + @SearchParamDefinition(name="patient", path="Procedure.subject", description="Search by subject - a patient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient @@ -2001,7 +1993,7 @@ public class Procedure extends DomainResource { * Path: Procedure.encounter
*

*/ - @SearchParamDefinition(name="encounter", path="Procedure.encounter", description="The encounter associated with the procedure", type="reference" ) + @SearchParamDefinition(name="encounter", path="Procedure.encounter", description="The encounter associated with the procedure", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) public static final String SP_ENCOUNTER = "encounter"; /** * Fluent Client search parameter constant for encounter diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ProcedureRequest.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ProcedureRequest.java index d12fff4af51..480b9417ada 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ProcedureRequest.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ProcedureRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A request for a procedure to be performed. May be a proposal or an order. */ @@ -1309,12 +1308,9 @@ public class ProcedureRequest extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (subject == null || subject.isEmpty()) - && (code == null || code.isEmpty()) && (bodySite == null || bodySite.isEmpty()) && (reason == null || reason.isEmpty()) - && (scheduled == null || scheduled.isEmpty()) && (encounter == null || encounter.isEmpty()) - && (performer == null || performer.isEmpty()) && (status == null || status.isEmpty()) && (notes == null || notes.isEmpty()) - && (asNeeded == null || asNeeded.isEmpty()) && (orderedOn == null || orderedOn.isEmpty()) - && (orderer == null || orderer.isEmpty()) && (priority == null || priority.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, subject, code, bodySite + , reason, scheduled, encounter, performer, status, notes, asNeeded, orderedOn, orderer + , priority); } @Override @@ -1350,7 +1346,7 @@ public class ProcedureRequest extends DomainResource { * Path: ProcedureRequest.performer
*

*/ - @SearchParamDefinition(name="performer", path="ProcedureRequest.performer", description="Who should perform the procedure", type="reference" ) + @SearchParamDefinition(name="performer", path="ProcedureRequest.performer", description="Who should perform the procedure", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_PERFORMER = "performer"; /** * Fluent Client search parameter constant for performer @@ -1376,7 +1372,7 @@ public class ProcedureRequest extends DomainResource { * Path: ProcedureRequest.subject
*

*/ - @SearchParamDefinition(name="subject", path="ProcedureRequest.subject", description="Search by subject", type="reference" ) + @SearchParamDefinition(name="subject", path="ProcedureRequest.subject", description="Search by subject", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject @@ -1428,7 +1424,7 @@ public class ProcedureRequest extends DomainResource { * Path: ProcedureRequest.orderer
*

*/ - @SearchParamDefinition(name="orderer", path="ProcedureRequest.orderer", description="Who made request", type="reference" ) + @SearchParamDefinition(name="orderer", path="ProcedureRequest.orderer", description="Who made request", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_ORDERER = "orderer"; /** * Fluent Client search parameter constant for orderer @@ -1454,7 +1450,7 @@ public class ProcedureRequest extends DomainResource { * Path: ProcedureRequest.encounter
*

*/ - @SearchParamDefinition(name="encounter", path="ProcedureRequest.encounter", description="Encounter request created during", type="reference" ) + @SearchParamDefinition(name="encounter", path="ProcedureRequest.encounter", description="Encounter request created during", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) public static final String SP_ENCOUNTER = "encounter"; /** * Fluent Client search parameter constant for encounter diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ProcessRequest.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ProcessRequest.java index fc3982b1762..32fbae196b9 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ProcessRequest.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ProcessRequest.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources. */ @@ -290,7 +288,7 @@ public class ProcessRequest extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequenceLinkId == null || sequenceLinkId.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequenceLinkId); } public String fhirType() { @@ -338,62 +336,37 @@ public class ProcessRequest extends DomainResource { /** * The organization which is the target of the request. */ - @Child(name = "target", type = {Organization.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "target", type = {Identifier.class, Organization.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Target of the request", formalDefinition="The organization which is the target of the request." ) - protected Reference target; - - /** - * The actual object that is the target of the reference (The organization which is the target of the request.) - */ - protected Organization targetTarget; + protected Type target; /** * The practitioner who is responsible for the action specified in thise request. */ - @Child(name = "provider", type = {Practitioner.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "provider", type = {Identifier.class, Practitioner.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the action specified in thise request." ) - protected Reference provider; - - /** - * The actual object that is the target of the reference (The practitioner who is responsible for the action specified in thise request.) - */ - protected Practitioner providerTarget; + protected Type provider; /** * The organization which is responsible for the action speccified in thise request. */ - @Child(name = "organization", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "organization", type = {Identifier.class, Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the action speccified in thise request." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the action speccified in thise request.) - */ - protected Organization organizationTarget; + protected Type organization; /** * Reference of resource which is the target or subject of this action. */ - @Child(name = "request", type = {}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "request", type = {Identifier.class}, order=8, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Request reference", formalDefinition="Reference of resource which is the target or subject of this action." ) - protected Reference request; - - /** - * The actual object that is the target of the reference (Reference of resource which is the target or subject of this action.) - */ - protected Resource requestTarget; + protected Type request; /** * Reference of a prior response to resource which is the target or subject of this action. */ - @Child(name = "response", type = {}, order=9, min=0, max=1, modifier=false, summary=true) + @Child(name = "response", type = {Identifier.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Response reference", formalDefinition="Reference of a prior response to resource which is the target or subject of this action." ) - protected Reference response; - - /** - * The actual object that is the target of the reference (Reference of a prior response to resource which is the target or subject of this action.) - */ - protected Resource responseTarget; + protected Type response; /** * If true remove all history excluding audit. @@ -437,7 +410,7 @@ public class ProcessRequest extends DomainResource { @Description(shortDefinition="Period", formalDefinition="A period of time during which the fulfilling resources would have been created." ) protected Period period; - private static final long serialVersionUID = -1332331220L; + private static final long serialVersionUID = -1557088159L; /** * Constructor @@ -639,15 +612,36 @@ public class ProcessRequest extends DomainResource { /** * @return {@link #target} (The organization which is the target of the request.) */ - public Reference getTarget() { - if (this.target == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProcessRequest.target"); - else if (Configuration.doAutoCreate()) - this.target = new Reference(); // cc + public Type getTarget() { return this.target; } + /** + * @return {@link #target} (The organization which is the target of the request.) + */ + public Identifier getTargetIdentifier() throws FHIRException { + if (!(this.target instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.target.getClass().getName()+" was encountered"); + return (Identifier) this.target; + } + + public boolean hasTargetIdentifier() { + return this.target instanceof Identifier; + } + + /** + * @return {@link #target} (The organization which is the target of the request.) + */ + public Reference getTargetReference() throws FHIRException { + if (!(this.target instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.target.getClass().getName()+" was encountered"); + return (Reference) this.target; + } + + public boolean hasTargetReference() { + return this.target instanceof Reference; + } + public boolean hasTarget() { return this.target != null && !this.target.isEmpty(); } @@ -655,43 +649,44 @@ public class ProcessRequest extends DomainResource { /** * @param value {@link #target} (The organization which is the target of the request.) */ - public ProcessRequest setTarget(Reference value) { + public ProcessRequest setTarget(Type value) { this.target = value; return this; } - /** - * @return {@link #target} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is the target of the request.) - */ - public Organization getTargetTarget() { - if (this.targetTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProcessRequest.target"); - else if (Configuration.doAutoCreate()) - this.targetTarget = new Organization(); // aa - return this.targetTarget; - } - - /** - * @param value {@link #target} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is the target of the request.) - */ - public ProcessRequest setTargetTarget(Organization value) { - this.targetTarget = value; - return this; - } - /** * @return {@link #provider} (The practitioner who is responsible for the action specified in thise request.) */ - public Reference getProvider() { - if (this.provider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProcessRequest.provider"); - else if (Configuration.doAutoCreate()) - this.provider = new Reference(); // cc + public Type getProvider() { return this.provider; } + /** + * @return {@link #provider} (The practitioner who is responsible for the action specified in thise request.) + */ + public Identifier getProviderIdentifier() throws FHIRException { + if (!(this.provider instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.provider.getClass().getName()+" was encountered"); + return (Identifier) this.provider; + } + + public boolean hasProviderIdentifier() { + return this.provider instanceof Identifier; + } + + /** + * @return {@link #provider} (The practitioner who is responsible for the action specified in thise request.) + */ + public Reference getProviderReference() throws FHIRException { + if (!(this.provider instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.provider.getClass().getName()+" was encountered"); + return (Reference) this.provider; + } + + public boolean hasProviderReference() { + return this.provider instanceof Reference; + } + public boolean hasProvider() { return this.provider != null && !this.provider.isEmpty(); } @@ -699,43 +694,44 @@ public class ProcessRequest extends DomainResource { /** * @param value {@link #provider} (The practitioner who is responsible for the action specified in thise request.) */ - public ProcessRequest setProvider(Reference value) { + public ProcessRequest setProvider(Type value) { this.provider = value; return this; } - /** - * @return {@link #provider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the action specified in thise request.) - */ - public Practitioner getProviderTarget() { - if (this.providerTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProcessRequest.provider"); - else if (Configuration.doAutoCreate()) - this.providerTarget = new Practitioner(); // aa - return this.providerTarget; - } - - /** - * @param value {@link #provider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the action specified in thise request.) - */ - public ProcessRequest setProviderTarget(Practitioner value) { - this.providerTarget = value; - return this; - } - /** * @return {@link #organization} (The organization which is responsible for the action speccified in thise request.) */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProcessRequest.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc + public Type getOrganization() { return this.organization; } + /** + * @return {@link #organization} (The organization which is responsible for the action speccified in thise request.) + */ + public Identifier getOrganizationIdentifier() throws FHIRException { + if (!(this.organization instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Identifier) this.organization; + } + + public boolean hasOrganizationIdentifier() { + return this.organization instanceof Identifier; + } + + /** + * @return {@link #organization} (The organization which is responsible for the action speccified in thise request.) + */ + public Reference getOrganizationReference() throws FHIRException { + if (!(this.organization instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Reference) this.organization; + } + + public boolean hasOrganizationReference() { + return this.organization instanceof Reference; + } + public boolean hasOrganization() { return this.organization != null && !this.organization.isEmpty(); } @@ -743,43 +739,44 @@ public class ProcessRequest extends DomainResource { /** * @param value {@link #organization} (The organization which is responsible for the action speccified in thise request.) */ - public ProcessRequest setOrganization(Reference value) { + public ProcessRequest setOrganization(Type value) { this.organization = value; return this; } - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the action speccified in thise request.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProcessRequest.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the action speccified in thise request.) - */ - public ProcessRequest setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - /** * @return {@link #request} (Reference of resource which is the target or subject of this action.) */ - public Reference getRequest() { - if (this.request == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProcessRequest.request"); - else if (Configuration.doAutoCreate()) - this.request = new Reference(); // cc + public Type getRequest() { return this.request; } + /** + * @return {@link #request} (Reference of resource which is the target or subject of this action.) + */ + public Identifier getRequestIdentifier() throws FHIRException { + if (!(this.request instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.request.getClass().getName()+" was encountered"); + return (Identifier) this.request; + } + + public boolean hasRequestIdentifier() { + return this.request instanceof Identifier; + } + + /** + * @return {@link #request} (Reference of resource which is the target or subject of this action.) + */ + public Reference getRequestReference() throws FHIRException { + if (!(this.request instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.request.getClass().getName()+" was encountered"); + return (Reference) this.request; + } + + public boolean hasRequestReference() { + return this.request instanceof Reference; + } + public boolean hasRequest() { return this.request != null && !this.request.isEmpty(); } @@ -787,38 +784,44 @@ public class ProcessRequest extends DomainResource { /** * @param value {@link #request} (Reference of resource which is the target or subject of this action.) */ - public ProcessRequest setRequest(Reference value) { + public ProcessRequest setRequest(Type value) { this.request = value; return this; } - /** - * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of resource which is the target or subject of this action.) - */ - public Resource getRequestTarget() { - return this.requestTarget; - } - - /** - * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of resource which is the target or subject of this action.) - */ - public ProcessRequest setRequestTarget(Resource value) { - this.requestTarget = value; - return this; - } - /** * @return {@link #response} (Reference of a prior response to resource which is the target or subject of this action.) */ - public Reference getResponse() { - if (this.response == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProcessRequest.response"); - else if (Configuration.doAutoCreate()) - this.response = new Reference(); // cc + public Type getResponse() { return this.response; } + /** + * @return {@link #response} (Reference of a prior response to resource which is the target or subject of this action.) + */ + public Identifier getResponseIdentifier() throws FHIRException { + if (!(this.response instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.response.getClass().getName()+" was encountered"); + return (Identifier) this.response; + } + + public boolean hasResponseIdentifier() { + return this.response instanceof Identifier; + } + + /** + * @return {@link #response} (Reference of a prior response to resource which is the target or subject of this action.) + */ + public Reference getResponseReference() throws FHIRException { + if (!(this.response instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.response.getClass().getName()+" was encountered"); + return (Reference) this.response; + } + + public boolean hasResponseReference() { + return this.response instanceof Reference; + } + public boolean hasResponse() { return this.response != null && !this.response.isEmpty(); } @@ -826,26 +829,11 @@ public class ProcessRequest extends DomainResource { /** * @param value {@link #response} (Reference of a prior response to resource which is the target or subject of this action.) */ - public ProcessRequest setResponse(Reference value) { + public ProcessRequest setResponse(Type value) { this.response = value; return this; } - /** - * @return {@link #response} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference of a prior response to resource which is the target or subject of this action.) - */ - public Resource getResponseTarget() { - return this.responseTarget; - } - - /** - * @param value {@link #response} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference of a prior response to resource which is the target or subject of this action.) - */ - public ProcessRequest setResponseTarget(Resource value) { - this.responseTarget = value; - return this; - } - /** * @return {@link #nullify} (If true remove all history excluding audit.). This is the underlying object with id, value and extensions. The accessor "getNullify" gives direct access to the value */ @@ -1119,11 +1107,11 @@ public class ProcessRequest extends DomainResource { childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created)); - childrenList.add(new Property("target", "Reference(Organization)", "The organization which is the target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); - childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the action specified in thise request.", 0, java.lang.Integer.MAX_VALUE, provider)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the action speccified in thise request.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("request", "Reference(Any)", "Reference of resource which is the target or subject of this action.", 0, java.lang.Integer.MAX_VALUE, request)); - childrenList.add(new Property("response", "Reference(Any)", "Reference of a prior response to resource which is the target or subject of this action.", 0, java.lang.Integer.MAX_VALUE, response)); + childrenList.add(new Property("target[x]", "Identifier|Reference(Organization)", "The organization which is the target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("provider[x]", "Identifier|Reference(Practitioner)", "The practitioner who is responsible for the action specified in thise request.", 0, java.lang.Integer.MAX_VALUE, provider)); + childrenList.add(new Property("organization[x]", "Identifier|Reference(Organization)", "The organization which is responsible for the action speccified in thise request.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("request[x]", "Identifier|Reference(Any)", "Reference of resource which is the target or subject of this action.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("response[x]", "Identifier|Reference(Any)", "Reference of a prior response to resource which is the target or subject of this action.", 0, java.lang.Integer.MAX_VALUE, response)); childrenList.add(new Property("nullify", "boolean", "If true remove all history excluding audit.", 0, java.lang.Integer.MAX_VALUE, nullify)); childrenList.add(new Property("reference", "string", "A reference to supply which authenticates the process.", 0, java.lang.Integer.MAX_VALUE, reference)); childrenList.add(new Property("item", "", "List of top level items to be re-adjudicated, if none specified then the entire submission is re-adjudicated.", 0, java.lang.Integer.MAX_VALUE, item)); @@ -1144,16 +1132,16 @@ public class ProcessRequest extends DomainResource { this.originalRuleset = castToCoding(value); // Coding else if (name.equals("created")) this.created = castToDateTime(value); // DateTimeType - else if (name.equals("target")) - this.target = castToReference(value); // Reference - else if (name.equals("provider")) - this.provider = castToReference(value); // Reference - else if (name.equals("organization")) - this.organization = castToReference(value); // Reference - else if (name.equals("request")) - this.request = castToReference(value); // Reference - else if (name.equals("response")) - this.response = castToReference(value); // Reference + else if (name.equals("target[x]")) + this.target = (Type) value; // Type + else if (name.equals("provider[x]")) + this.provider = (Type) value; // Type + else if (name.equals("organization[x]")) + this.organization = (Type) value; // Type + else if (name.equals("request[x]")) + this.request = (Type) value; // Type + else if (name.equals("response[x]")) + this.response = (Type) value; // Type else if (name.equals("nullify")) this.nullify = castToBoolean(value); // BooleanType else if (name.equals("reference")) @@ -1189,23 +1177,43 @@ public class ProcessRequest extends DomainResource { else if (name.equals("created")) { throw new FHIRException("Cannot call addChild on a primitive type ProcessRequest.created"); } - else if (name.equals("target")) { + else if (name.equals("targetIdentifier")) { + this.target = new Identifier(); + return this.target; + } + else if (name.equals("targetReference")) { this.target = new Reference(); return this.target; } - else if (name.equals("provider")) { + else if (name.equals("providerIdentifier")) { + this.provider = new Identifier(); + return this.provider; + } + else if (name.equals("providerReference")) { this.provider = new Reference(); return this.provider; } - else if (name.equals("organization")) { + else if (name.equals("organizationIdentifier")) { + this.organization = new Identifier(); + return this.organization; + } + else if (name.equals("organizationReference")) { this.organization = new Reference(); return this.organization; } - else if (name.equals("request")) { + else if (name.equals("requestIdentifier")) { + this.request = new Identifier(); + return this.request; + } + else if (name.equals("requestReference")) { this.request = new Reference(); return this.request; } - else if (name.equals("response")) { + else if (name.equals("responseIdentifier")) { + this.response = new Identifier(); + return this.response; + } + else if (name.equals("responseReference")) { this.response = new Reference(); return this.response; } @@ -1307,13 +1315,9 @@ public class ProcessRequest extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (action == null || action.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) - && (created == null || created.isEmpty()) && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) - && (organization == null || organization.isEmpty()) && (request == null || request.isEmpty()) - && (response == null || response.isEmpty()) && (nullify == null || nullify.isEmpty()) && (reference == null || reference.isEmpty()) - && (item == null || item.isEmpty()) && (include == null || include.isEmpty()) && (exclude == null || exclude.isEmpty()) - && (period == null || period.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( action, identifier, ruleset, originalRuleset + , created, target, provider, organization, request, response, nullify, reference, item + , include, exclude, period); } @Override @@ -1342,56 +1346,24 @@ public class ProcessRequest extends DomainResource { public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); /** - * Search parameter: provider - *

- * Description: The provider who regenerated this request
- * Type: reference
- * Path: ProcessRequest.provider
- *

- */ - @SearchParamDefinition(name="provider", path="ProcessRequest.provider", description="The provider who regenerated this request", type="reference" ) - public static final String SP_PROVIDER = "provider"; - /** - * Fluent Client search parameter constant for provider - *

- * Description: The provider who regenerated this request
- * Type: reference
- * Path: ProcessRequest.provider
- *

- */ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDER); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ProcessRequest:provider". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDER = new ca.uhn.fhir.model.api.Include("ProcessRequest:provider").toLocked(); - - /** - * Search parameter: organization + * Search parameter: organizationidentifier *

* Description: The organization who generated this request
- * Type: reference
- * Path: ProcessRequest.organization
+ * Type: token
+ * Path: ProcessRequest.organizationIdentifier
*

*/ - @SearchParamDefinition(name="organization", path="ProcessRequest.organization", description="The organization who generated this request", type="reference" ) - public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="organizationidentifier", path="ProcessRequest.organizationIdentifier", description="The organization who generated this request", type="token" ) + public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier"; /** - * Fluent Client search parameter constant for organization + * Fluent Client search parameter constant for organizationidentifier *

* Description: The organization who generated this request
- * Type: reference
- * Path: ProcessRequest.organization
+ * Type: token
+ * Path: ProcessRequest.organizationIdentifier
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ProcessRequest:organization". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("ProcessRequest:organization").toLocked(); + public static final ca.uhn.fhir.rest.gclient.TokenClientParam ORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ORGANIZATIONIDENTIFIER); /** * Search parameter: action @@ -1413,6 +1385,78 @@ public class ProcessRequest extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACTION); + /** + * Search parameter: organizationreference + *

+ * Description: The organization who generated this request
+ * Type: reference
+ * Path: ProcessRequest.organizationReference
+ *

+ */ + @SearchParamDefinition(name="organizationreference", path="ProcessRequest.organizationReference", description="The organization who generated this request", type="reference" ) + public static final String SP_ORGANIZATIONREFERENCE = "organizationreference"; + /** + * Fluent Client search parameter constant for organizationreference + *

+ * Description: The organization who generated this request
+ * Type: reference
+ * Path: ProcessRequest.organizationReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATIONREFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "ProcessRequest:organizationreference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("ProcessRequest:organizationreference").toLocked(); + + /** + * Search parameter: providerreference + *

+ * Description: The provider who regenerated this request
+ * Type: reference
+ * Path: ProcessRequest.providerReference
+ *

+ */ + @SearchParamDefinition(name="providerreference", path="ProcessRequest.providerReference", description="The provider who regenerated this request", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) + public static final String SP_PROVIDERREFERENCE = "providerreference"; + /** + * Fluent Client search parameter constant for providerreference + *

+ * Description: The provider who regenerated this request
+ * Type: reference
+ * Path: ProcessRequest.providerReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDERREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDERREFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "ProcessRequest:providerreference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDERREFERENCE = new ca.uhn.fhir.model.api.Include("ProcessRequest:providerreference").toLocked(); + + /** + * Search parameter: provideridentifier + *

+ * Description: The provider who regenerated this request
+ * Type: token
+ * Path: ProcessRequest.providerIdentifier
+ *

+ */ + @SearchParamDefinition(name="provideridentifier", path="ProcessRequest.providerIdentifier", description="The provider who regenerated this request", type="token" ) + public static final String SP_PROVIDERIDENTIFIER = "provideridentifier"; + /** + * Fluent Client search parameter constant for provideridentifier + *

+ * Description: The provider who regenerated this request
+ * Type: token
+ * Path: ProcessRequest.providerIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam PROVIDERIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PROVIDERIDENTIFIER); + } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ProcessResponse.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ProcessResponse.java index 750c0e2959d..9859a14f41b 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ProcessResponse.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ProcessResponse.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * This resource provides processing status, errors and notes from the processing of a resource. */ @@ -206,8 +204,7 @@ public class ProcessResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (text == null || text.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, text); } public String fhirType() { @@ -227,14 +224,9 @@ public class ProcessResponse extends DomainResource { /** * Original request resource reference. */ - @Child(name = "request", type = {}, order=1, min=0, max=1, modifier=false, summary=true) + @Child(name = "request", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Request reference", formalDefinition="Original request resource reference." ) - protected Reference request; - - /** - * The actual object that is the target of the reference (Original request resource reference.) - */ - protected Resource requestTarget; + protected Type request; /** * Transaction status: error, complete, held. @@ -274,38 +266,23 @@ public class ProcessResponse extends DomainResource { /** * The organization who produced this adjudicated response. */ - @Child(name = "organization", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "organization", type = {Identifier.class, Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Authoring Organization", formalDefinition="The organization who produced this adjudicated response." ) - protected Reference organization; - - /** - * The actual object that is the target of the reference (The organization who produced this adjudicated response.) - */ - protected Organization organizationTarget; + protected Type organization; /** * The practitioner who is responsible for the services rendered to the patient. */ - @Child(name = "requestProvider", type = {Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "requestProvider", type = {Identifier.class, Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible Practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) - protected Reference requestProvider; - - /** - * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) - */ - protected Practitioner requestProviderTarget; + protected Type requestProvider; /** * The organization which is responsible for the services rendered to the patient. */ - @Child(name = "requestOrganization", type = {Organization.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Child(name = "requestOrganization", type = {Identifier.class, Organization.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) - protected Reference requestOrganization; - - /** - * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) - */ - protected Organization requestOrganizationTarget; + protected Type requestOrganization; /** * The form to be used for printing the content. @@ -328,7 +305,7 @@ public class ProcessResponse extends DomainResource { @Description(shortDefinition="Error code", formalDefinition="Processing errors." ) protected List error; - private static final long serialVersionUID = -1668062545L; + private static final long serialVersionUID = -501204073L; /** * Constructor @@ -380,15 +357,36 @@ public class ProcessResponse extends DomainResource { /** * @return {@link #request} (Original request resource reference.) */ - public Reference getRequest() { - if (this.request == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProcessResponse.request"); - else if (Configuration.doAutoCreate()) - this.request = new Reference(); // cc + public Type getRequest() { return this.request; } + /** + * @return {@link #request} (Original request resource reference.) + */ + public Identifier getRequestIdentifier() throws FHIRException { + if (!(this.request instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.request.getClass().getName()+" was encountered"); + return (Identifier) this.request; + } + + public boolean hasRequestIdentifier() { + return this.request instanceof Identifier; + } + + /** + * @return {@link #request} (Original request resource reference.) + */ + public Reference getRequestReference() throws FHIRException { + if (!(this.request instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.request.getClass().getName()+" was encountered"); + return (Reference) this.request; + } + + public boolean hasRequestReference() { + return this.request instanceof Reference; + } + public boolean hasRequest() { return this.request != null && !this.request.isEmpty(); } @@ -396,26 +394,11 @@ public class ProcessResponse extends DomainResource { /** * @param value {@link #request} (Original request resource reference.) */ - public ProcessResponse setRequest(Reference value) { + public ProcessResponse setRequest(Type value) { this.request = value; return this; } - /** - * @return {@link #request} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Original request resource reference.) - */ - public Resource getRequestTarget() { - return this.requestTarget; - } - - /** - * @param value {@link #request} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Original request resource reference.) - */ - public ProcessResponse setRequestTarget(Resource value) { - this.requestTarget = value; - return this; - } - /** * @return {@link #outcome} (Transaction status: error, complete, held.) */ @@ -589,15 +572,36 @@ public class ProcessResponse extends DomainResource { /** * @return {@link #organization} (The organization who produced this adjudicated response.) */ - public Reference getOrganization() { - if (this.organization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProcessResponse.organization"); - else if (Configuration.doAutoCreate()) - this.organization = new Reference(); // cc + public Type getOrganization() { return this.organization; } + /** + * @return {@link #organization} (The organization who produced this adjudicated response.) + */ + public Identifier getOrganizationIdentifier() throws FHIRException { + if (!(this.organization instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Identifier) this.organization; + } + + public boolean hasOrganizationIdentifier() { + return this.organization instanceof Identifier; + } + + /** + * @return {@link #organization} (The organization who produced this adjudicated response.) + */ + public Reference getOrganizationReference() throws FHIRException { + if (!(this.organization instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.organization.getClass().getName()+" was encountered"); + return (Reference) this.organization; + } + + public boolean hasOrganizationReference() { + return this.organization instanceof Reference; + } + public boolean hasOrganization() { return this.organization != null && !this.organization.isEmpty(); } @@ -605,43 +609,44 @@ public class ProcessResponse extends DomainResource { /** * @param value {@link #organization} (The organization who produced this adjudicated response.) */ - public ProcessResponse setOrganization(Reference value) { + public ProcessResponse setOrganization(Type value) { this.organization = value; return this; } - /** - * @return {@link #organization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization who produced this adjudicated response.) - */ - public Organization getOrganizationTarget() { - if (this.organizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProcessResponse.organization"); - else if (Configuration.doAutoCreate()) - this.organizationTarget = new Organization(); // aa - return this.organizationTarget; - } - - /** - * @param value {@link #organization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization who produced this adjudicated response.) - */ - public ProcessResponse setOrganizationTarget(Organization value) { - this.organizationTarget = value; - return this; - } - /** * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) */ - public Reference getRequestProvider() { - if (this.requestProvider == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProcessResponse.requestProvider"); - else if (Configuration.doAutoCreate()) - this.requestProvider = new Reference(); // cc + public Type getRequestProvider() { return this.requestProvider; } + /** + * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Identifier getRequestProviderIdentifier() throws FHIRException { + if (!(this.requestProvider instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.requestProvider.getClass().getName()+" was encountered"); + return (Identifier) this.requestProvider; + } + + public boolean hasRequestProviderIdentifier() { + return this.requestProvider instanceof Identifier; + } + + /** + * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) + */ + public Reference getRequestProviderReference() throws FHIRException { + if (!(this.requestProvider instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.requestProvider.getClass().getName()+" was encountered"); + return (Reference) this.requestProvider; + } + + public boolean hasRequestProviderReference() { + return this.requestProvider instanceof Reference; + } + public boolean hasRequestProvider() { return this.requestProvider != null && !this.requestProvider.isEmpty(); } @@ -649,43 +654,44 @@ public class ProcessResponse extends DomainResource { /** * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.) */ - public ProcessResponse setRequestProvider(Reference value) { + public ProcessResponse setRequestProvider(Type value) { this.requestProvider = value; return this; } - /** - * @return {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public Practitioner getRequestProviderTarget() { - if (this.requestProviderTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProcessResponse.requestProvider"); - else if (Configuration.doAutoCreate()) - this.requestProviderTarget = new Practitioner(); // aa - return this.requestProviderTarget; - } - - /** - * @param value {@link #requestProvider} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner who is responsible for the services rendered to the patient.) - */ - public ProcessResponse setRequestProviderTarget(Practitioner value) { - this.requestProviderTarget = value; - return this; - } - /** * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) */ - public Reference getRequestOrganization() { - if (this.requestOrganization == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProcessResponse.requestOrganization"); - else if (Configuration.doAutoCreate()) - this.requestOrganization = new Reference(); // cc + public Type getRequestOrganization() { return this.requestOrganization; } + /** + * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public Identifier getRequestOrganizationIdentifier() throws FHIRException { + if (!(this.requestOrganization instanceof Identifier)) + throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.requestOrganization.getClass().getName()+" was encountered"); + return (Identifier) this.requestOrganization; + } + + public boolean hasRequestOrganizationIdentifier() { + return this.requestOrganization instanceof Identifier; + } + + /** + * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) + */ + public Reference getRequestOrganizationReference() throws FHIRException { + if (!(this.requestOrganization instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.requestOrganization.getClass().getName()+" was encountered"); + return (Reference) this.requestOrganization; + } + + public boolean hasRequestOrganizationReference() { + return this.requestOrganization instanceof Reference; + } + public boolean hasRequestOrganization() { return this.requestOrganization != null && !this.requestOrganization.isEmpty(); } @@ -693,31 +699,11 @@ public class ProcessResponse extends DomainResource { /** * @param value {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.) */ - public ProcessResponse setRequestOrganization(Reference value) { + public ProcessResponse setRequestOrganization(Type value) { this.requestOrganization = value; return this; } - /** - * @return {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public Organization getRequestOrganizationTarget() { - if (this.requestOrganizationTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ProcessResponse.requestOrganization"); - else if (Configuration.doAutoCreate()) - this.requestOrganizationTarget = new Organization(); // aa - return this.requestOrganizationTarget; - } - - /** - * @param value {@link #requestOrganization} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The organization which is responsible for the services rendered to the patient.) - */ - public ProcessResponse setRequestOrganizationTarget(Organization value) { - this.requestOrganizationTarget = value; - return this; - } - /** * @return {@link #form} (The form to be used for printing the content.) */ @@ -825,15 +811,15 @@ public class ProcessResponse extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("request", "Reference(Any)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); + childrenList.add(new Property("request[x]", "Identifier|Reference(Any)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request)); childrenList.add(new Property("outcome", "Coding", "Transaction status: error, complete, held.", 0, java.lang.Integer.MAX_VALUE, outcome)); childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication or processing.", 0, java.lang.Integer.MAX_VALUE, disposition)); childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); - childrenList.add(new Property("organization", "Reference(Organization)", "The organization who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization)); - childrenList.add(new Property("requestProvider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider)); - childrenList.add(new Property("requestOrganization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); + childrenList.add(new Property("organization[x]", "Identifier|Reference(Organization)", "The organization who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization)); + childrenList.add(new Property("requestProvider[x]", "Identifier|Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider)); + childrenList.add(new Property("requestOrganization[x]", "Identifier|Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization)); childrenList.add(new Property("form", "Coding", "The form to be used for printing the content.", 0, java.lang.Integer.MAX_VALUE, form)); childrenList.add(new Property("notes", "", "Suite of processing note or additional requirements is the processing has been held.", 0, java.lang.Integer.MAX_VALUE, notes)); childrenList.add(new Property("error", "Coding", "Processing errors.", 0, java.lang.Integer.MAX_VALUE, error)); @@ -843,8 +829,8 @@ public class ProcessResponse extends DomainResource { public void setProperty(String name, Base value) throws FHIRException { if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); - else if (name.equals("request")) - this.request = castToReference(value); // Reference + else if (name.equals("request[x]")) + this.request = (Type) value; // Type else if (name.equals("outcome")) this.outcome = castToCoding(value); // Coding else if (name.equals("disposition")) @@ -855,12 +841,12 @@ public class ProcessResponse extends DomainResource { this.originalRuleset = castToCoding(value); // Coding else if (name.equals("created")) this.created = castToDateTime(value); // DateTimeType - else if (name.equals("organization")) - this.organization = castToReference(value); // Reference - else if (name.equals("requestProvider")) - this.requestProvider = castToReference(value); // Reference - else if (name.equals("requestOrganization")) - this.requestOrganization = castToReference(value); // Reference + else if (name.equals("organization[x]")) + this.organization = (Type) value; // Type + else if (name.equals("requestProvider[x]")) + this.requestProvider = (Type) value; // Type + else if (name.equals("requestOrganization[x]")) + this.requestOrganization = (Type) value; // Type else if (name.equals("form")) this.form = castToCoding(value); // Coding else if (name.equals("notes")) @@ -876,7 +862,11 @@ public class ProcessResponse extends DomainResource { if (name.equals("identifier")) { return addIdentifier(); } - else if (name.equals("request")) { + else if (name.equals("requestIdentifier")) { + this.request = new Identifier(); + return this.request; + } + else if (name.equals("requestReference")) { this.request = new Reference(); return this.request; } @@ -898,15 +888,27 @@ public class ProcessResponse extends DomainResource { else if (name.equals("created")) { throw new FHIRException("Cannot call addChild on a primitive type ProcessResponse.created"); } - else if (name.equals("organization")) { + else if (name.equals("organizationIdentifier")) { + this.organization = new Identifier(); + return this.organization; + } + else if (name.equals("organizationReference")) { this.organization = new Reference(); return this.organization; } - else if (name.equals("requestProvider")) { + else if (name.equals("requestProviderIdentifier")) { + this.requestProvider = new Identifier(); + return this.requestProvider; + } + else if (name.equals("requestProviderReference")) { this.requestProvider = new Reference(); return this.requestProvider; } - else if (name.equals("requestOrganization")) { + else if (name.equals("requestOrganizationIdentifier")) { + this.requestOrganization = new Identifier(); + return this.requestOrganization; + } + else if (name.equals("requestOrganizationReference")) { this.requestOrganization = new Reference(); return this.requestOrganization; } @@ -989,13 +991,9 @@ public class ProcessResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty()) - && (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty()) - && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty()) - && (created == null || created.isEmpty()) && (organization == null || organization.isEmpty()) - && (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty()) - && (form == null || form.isEmpty()) && (notes == null || notes.isEmpty()) && (error == null || error.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, request, outcome + , disposition, ruleset, originalRuleset, created, organization, requestProvider, requestOrganization + , form, notes, error); } @Override @@ -1003,6 +1001,46 @@ public class ProcessResponse extends DomainResource { return ResourceType.ProcessResponse; } + /** + * Search parameter: requestprovideridentifier + *

+ * Description: The Provider who is responsible the request transaction
+ * Type: token
+ * Path: ProcessResponse.requestProviderIdentifier
+ *

+ */ + @SearchParamDefinition(name="requestprovideridentifier", path="ProcessResponse.requestProviderIdentifier", description="The Provider who is responsible the request transaction", type="token" ) + public static final String SP_REQUESTPROVIDERIDENTIFIER = "requestprovideridentifier"; + /** + * Fluent Client search parameter constant for requestprovideridentifier + *

+ * Description: The Provider who is responsible the request transaction
+ * Type: token
+ * Path: ProcessResponse.requestProviderIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTPROVIDERIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTPROVIDERIDENTIFIER); + + /** + * Search parameter: requestorganizationidentifier + *

+ * Description: The Organization who is responsible the request transaction
+ * Type: token
+ * Path: ProcessResponse.requestOrganizationIdentifier
+ *

+ */ + @SearchParamDefinition(name="requestorganizationidentifier", path="ProcessResponse.requestOrganizationIdentifier", description="The Organization who is responsible the request transaction", type="token" ) + public static final String SP_REQUESTORGANIZATIONIDENTIFIER = "requestorganizationidentifier"; + /** + * Fluent Client search parameter constant for requestorganizationidentifier + *

+ * Description: The Organization who is responsible the request transaction
+ * Type: token
+ * Path: ProcessResponse.requestOrganizationIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTORGANIZATIONIDENTIFIER); + /** * Search parameter: identifier *

@@ -1024,108 +1062,148 @@ public class ProcessResponse extends DomainResource { public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); /** - * Search parameter: request + * Search parameter: organizationidentifier *

- * Description: The reference to the claim
- * Type: reference
- * Path: ProcessResponse.request
+ * Description: The organization who generated this resource
+ * Type: token
+ * Path: ProcessResponse.organizationIdentifier
*

*/ - @SearchParamDefinition(name="request", path="ProcessResponse.request", description="The reference to the claim", type="reference" ) - public static final String SP_REQUEST = "request"; + @SearchParamDefinition(name="organizationidentifier", path="ProcessResponse.organizationIdentifier", description="The organization who generated this resource", type="token" ) + public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier"; /** - * Fluent Client search parameter constant for request + * Fluent Client search parameter constant for organizationidentifier *

- * Description: The reference to the claim
- * Type: reference
- * Path: ProcessResponse.request
+ * Description: The organization who generated this resource
+ * Type: token
+ * Path: ProcessResponse.organizationIdentifier
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUEST = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUEST); - -/** - * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ProcessResponse:request". - */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST = new ca.uhn.fhir.model.api.Include("ProcessResponse:request").toLocked(); + public static final ca.uhn.fhir.rest.gclient.TokenClientParam ORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ORGANIZATIONIDENTIFIER); /** - * Search parameter: organization + * Search parameter: requestidentifier + *

+ * Description: The reference to the claim
+ * Type: token
+ * Path: ProcessResponse.requestIdentifier
+ *

+ */ + @SearchParamDefinition(name="requestidentifier", path="ProcessResponse.requestIdentifier", description="The reference to the claim", type="token" ) + public static final String SP_REQUESTIDENTIFIER = "requestidentifier"; + /** + * Fluent Client search parameter constant for requestidentifier + *

+ * Description: The reference to the claim
+ * Type: token
+ * Path: ProcessResponse.requestIdentifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTIDENTIFIER); + + /** + * Search parameter: organizationreference *

* Description: The organization who generated this resource
* Type: reference
- * Path: ProcessResponse.organization
+ * Path: ProcessResponse.organizationReference
*

*/ - @SearchParamDefinition(name="organization", path="ProcessResponse.organization", description="The organization who generated this resource", type="reference" ) - public static final String SP_ORGANIZATION = "organization"; + @SearchParamDefinition(name="organizationreference", path="ProcessResponse.organizationReference", description="The organization who generated this resource", type="reference" ) + public static final String SP_ORGANIZATIONREFERENCE = "organizationreference"; /** - * Fluent Client search parameter constant for organization + * Fluent Client search parameter constant for organizationreference *

* Description: The organization who generated this resource
* Type: reference
- * Path: ProcessResponse.organization
+ * Path: ProcessResponse.organizationReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATIONREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ProcessResponse:organization". + * the path value of "ProcessResponse:organizationreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("ProcessResponse:organization").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("ProcessResponse:organizationreference").toLocked(); /** - * Search parameter: requestprovider + * Search parameter: requestproviderreference *

* Description: The Provider who is responsible the request transaction
* Type: reference
- * Path: ProcessResponse.requestProvider
+ * Path: ProcessResponse.requestProviderReference
*

*/ - @SearchParamDefinition(name="requestprovider", path="ProcessResponse.requestProvider", description="The Provider who is responsible the request transaction", type="reference" ) - public static final String SP_REQUESTPROVIDER = "requestprovider"; + @SearchParamDefinition(name="requestproviderreference", path="ProcessResponse.requestProviderReference", description="The Provider who is responsible the request transaction", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) + public static final String SP_REQUESTPROVIDERREFERENCE = "requestproviderreference"; /** - * Fluent Client search parameter constant for requestprovider + * Fluent Client search parameter constant for requestproviderreference *

* Description: The Provider who is responsible the request transaction
* Type: reference
- * Path: ProcessResponse.requestProvider
+ * Path: ProcessResponse.requestProviderReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTPROVIDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTPROVIDER); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTPROVIDERREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTPROVIDERREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ProcessResponse:requestprovider". + * the path value of "ProcessResponse:requestproviderreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTPROVIDER = new ca.uhn.fhir.model.api.Include("ProcessResponse:requestprovider").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTPROVIDERREFERENCE = new ca.uhn.fhir.model.api.Include("ProcessResponse:requestproviderreference").toLocked(); /** - * Search parameter: requestorganization + * Search parameter: requestorganizationreference *

* Description: The Organization who is responsible the request transaction
* Type: reference
- * Path: ProcessResponse.requestOrganization
+ * Path: ProcessResponse.requestOrganizationReference
*

*/ - @SearchParamDefinition(name="requestorganization", path="ProcessResponse.requestOrganization", description="The Organization who is responsible the request transaction", type="reference" ) - public static final String SP_REQUESTORGANIZATION = "requestorganization"; + @SearchParamDefinition(name="requestorganizationreference", path="ProcessResponse.requestOrganizationReference", description="The Organization who is responsible the request transaction", type="reference" ) + public static final String SP_REQUESTORGANIZATIONREFERENCE = "requestorganizationreference"; /** - * Fluent Client search parameter constant for requestorganization + * Fluent Client search parameter constant for requestorganizationreference *

* Description: The Organization who is responsible the request transaction
* Type: reference
- * Path: ProcessResponse.requestOrganization
+ * Path: ProcessResponse.requestOrganizationReference
*

*/ - public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTORGANIZATION); + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTORGANIZATIONREFERENCE); /** * Constant for fluent queries to be used to add include statements. Specifies - * the path value of "ProcessResponse:requestorganization". + * the path value of "ProcessResponse:requestorganizationreference". */ - public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTORGANIZATION = new ca.uhn.fhir.model.api.Include("ProcessResponse:requestorganization").toLocked(); + public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("ProcessResponse:requestorganizationreference").toLocked(); + + /** + * Search parameter: requestreference + *

+ * Description: The reference to the claim
+ * Type: reference
+ * Path: ProcessResponse.requestReference
+ *

+ */ + @SearchParamDefinition(name="requestreference", path="ProcessResponse.requestReference", description="The reference to the claim", type="reference" ) + public static final String SP_REQUESTREFERENCE = "requestreference"; + /** + * Fluent Client search parameter constant for requestreference + *

+ * Description: The reference to the claim
+ * Type: reference
+ * Path: ProcessResponse.requestReference
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTREFERENCE); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "ProcessResponse:requestreference". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTREFERENCE = new ca.uhn.fhir.model.api.Include("ProcessResponse:requestreference").toLocked(); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Protocol.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Protocol.java index 75a36410245..794fdce2202 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Protocol.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Protocol.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A definition of behaviors to be taken in particular circumstances, often including conditions, options and other decision points. */ @@ -964,10 +963,8 @@ public class Protocol extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (description == null || description.isEmpty()) - && (duration == null || duration.isEmpty()) && (precondition == null || precondition.isEmpty()) - && (exit == null || exit.isEmpty()) && (firstActivity == null || firstActivity.isEmpty()) - && (activity == null || activity.isEmpty()) && (next == null || next.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, description, duration, precondition + , exit, firstActivity, activity, next); } public String fhirType() { @@ -1309,9 +1306,8 @@ public class Protocol extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (description == null || description.isEmpty()) && (condition == null || condition.isEmpty()) - && (intersection == null || intersection.isEmpty()) && (union == null || union.isEmpty()) - && (exclude == null || exclude.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( description, condition, intersection + , union, exclude); } public String fhirType() { @@ -1521,8 +1517,7 @@ public class Protocol extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (value == null || value.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, value); } public String fhirType() { @@ -1877,9 +1872,8 @@ public class Protocol extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (alternative == null || alternative.isEmpty()) && (component == null || component.isEmpty()) - && (following == null || following.isEmpty()) && (wait == null || wait.isEmpty()) && (detail == null || detail.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( alternative, component, following + , wait, detail); } public String fhirType() { @@ -2069,8 +2063,7 @@ public class Protocol extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (activity == null || activity.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( sequence, activity); } public String fhirType() { @@ -2600,10 +2593,8 @@ public class Protocol extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (category == null || category.isEmpty()) && (code == null || code.isEmpty()) - && (timing == null || timing.isEmpty()) && (location == null || location.isEmpty()) && (performer == null || performer.isEmpty()) - && (product == null || product.isEmpty()) && (quantity == null || quantity.isEmpty()) && (description == null || description.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( category, code, timing, location + , performer, product, quantity, description); } public String fhirType() { @@ -2834,8 +2825,8 @@ public class Protocol extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (description == null || description.isEmpty()) && (reference == null || reference.isEmpty()) - && (condition == null || condition.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( description, reference, condition + ); } public String fhirType() { @@ -3463,10 +3454,8 @@ public class Protocol extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (title == null || title.isEmpty()) - && (status == null || status.isEmpty()) && (type == null || type.isEmpty()) && (subject == null || subject.isEmpty()) - && (group == null || group.isEmpty()) && (purpose == null || purpose.isEmpty()) && (author == null || author.isEmpty()) - && (step == null || step.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, title, status, type + , subject, group, purpose, author, step); } @Override @@ -3502,7 +3491,7 @@ public class Protocol extends DomainResource { * Path: Protocol.subject
*

*/ - @SearchParamDefinition(name="subject", path="Protocol.subject", description="Protocols with specified subject", type="reference" ) + @SearchParamDefinition(name="subject", path="Protocol.subject", description="Protocols with specified subject", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Provenance.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Provenance.java index 99bda1eadbe..8c300a01f3e 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Provenance.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Provenance.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies. */ @@ -65,6 +64,10 @@ public class Provenance extends DomainResource { * A primary source for a topic refers to something produced by some agent with direct experience and knowledge about the topic, at the time of the topic's study, without benefit from hindsight. */ SOURCE, + /** + * A derivation for which the entity is removed from accessibility usually through the use of the Delete operation. + */ + REMOVAL, /** * added to help the parsers */ @@ -80,6 +83,8 @@ public class Provenance extends DomainResource { return QUOTATION; if ("source".equals(codeString)) return SOURCE; + if ("removal".equals(codeString)) + return REMOVAL; throw new FHIRException("Unknown ProvenanceEntityRole code '"+codeString+"'"); } public String toCode() { @@ -88,6 +93,7 @@ public class Provenance extends DomainResource { case REVISION: return "revision"; case QUOTATION: return "quotation"; case SOURCE: return "source"; + case REMOVAL: return "removal"; default: return "?"; } } @@ -97,6 +103,7 @@ public class Provenance extends DomainResource { case REVISION: return "http://hl7.org/fhir/provenance-entity-role"; case QUOTATION: return "http://hl7.org/fhir/provenance-entity-role"; case SOURCE: return "http://hl7.org/fhir/provenance-entity-role"; + case REMOVAL: return "http://hl7.org/fhir/provenance-entity-role"; default: return "?"; } } @@ -106,6 +113,7 @@ public class Provenance extends DomainResource { case REVISION: return "A derivation for which the resulting entity is a revised version of some original."; case QUOTATION: return "The repeat of (some or all of) an entity, such as text or image, by someone who may or may not be its original author."; case SOURCE: return "A primary source for a topic refers to something produced by some agent with direct experience and knowledge about the topic, at the time of the topic's study, without benefit from hindsight."; + case REMOVAL: return "A derivation for which the entity is removed from accessibility usually through the use of the Delete operation."; default: return "?"; } } @@ -115,6 +123,7 @@ public class Provenance extends DomainResource { case REVISION: return "Revision"; case QUOTATION: return "Quotation"; case SOURCE: return "Source"; + case REMOVAL: return "Removal"; default: return "?"; } } @@ -133,6 +142,8 @@ public class Provenance extends DomainResource { return ProvenanceEntityRole.QUOTATION; if ("source".equals(codeString)) return ProvenanceEntityRole.SOURCE; + if ("removal".equals(codeString)) + return ProvenanceEntityRole.REMOVAL; throw new IllegalArgumentException("Unknown ProvenanceEntityRole code '"+codeString+"'"); } public Enumeration fromType(Base code) throws FHIRException { @@ -149,6 +160,8 @@ public class Provenance extends DomainResource { return new Enumeration(this, ProvenanceEntityRole.QUOTATION); if ("source".equals(codeString)) return new Enumeration(this, ProvenanceEntityRole.SOURCE); + if ("removal".equals(codeString)) + return new Enumeration(this, ProvenanceEntityRole.REMOVAL); throw new FHIRException("Unknown ProvenanceEntityRole code '"+codeString+"'"); } public String toCode(ProvenanceEntityRole code) { @@ -160,6 +173,8 @@ public class Provenance extends DomainResource { return "quotation"; if (code == ProvenanceEntityRole.SOURCE) return "source"; + if (code == ProvenanceEntityRole.REMOVAL) + return "removal"; return "?"; } public String toSystem(ProvenanceEntityRole code) { @@ -425,9 +440,8 @@ public class Provenance extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (role == null || role.isEmpty()) && (actor == null || actor.isEmpty()) - && (userId == null || userId.isEmpty()) && (relatedAgent == null || relatedAgent.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( role, actor, userId, relatedAgent + ); } public String fhirType() { @@ -598,8 +612,7 @@ public class Provenance extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (target == null || target.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, target); } public String fhirType() { @@ -615,7 +628,7 @@ public class Provenance extends DomainResource { * How the entity was used during the activity. */ @Child(name = "role", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="derivation | revision | quotation | source", formalDefinition="How the entity was used during the activity." ) + @Description(shortDefinition="derivation | revision | quotation | source | removal", formalDefinition="How the entity was used during the activity." ) protected Enumeration role; /** @@ -934,9 +947,8 @@ public class Provenance extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (role == null || role.isEmpty()) && (type == null || type.isEmpty()) - && (reference == null || reference.isEmpty()) && (display == null || display.isEmpty()) && (agent == null || agent.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( role, type, reference, display + , agent); } public String fhirType() { @@ -1006,10 +1018,10 @@ public class Provenance extends DomainResource { protected List policy; /** - * An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility. + * An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place. */ @Child(name = "agent", type = {}, order=7, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Agents involved in creating resource", formalDefinition="An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility." ) + @Description(shortDefinition="Actor involved", formalDefinition="An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place." ) protected List agent; /** @@ -1324,7 +1336,7 @@ public class Provenance extends DomainResource { } /** - * @return {@link #agent} (An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility.) + * @return {@link #agent} (An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.) */ public List getAgent() { if (this.agent == null) @@ -1342,7 +1354,7 @@ public class Provenance extends DomainResource { } /** - * @return {@link #agent} (An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility.) + * @return {@link #agent} (An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.) */ // syntactic sugar public ProvenanceAgentComponent addAgent() { //3 @@ -1452,7 +1464,7 @@ public class Provenance extends DomainResource { childrenList.add(new Property("activity", "Coding", "An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.", 0, java.lang.Integer.MAX_VALUE, activity)); childrenList.add(new Property("location", "Reference(Location)", "Where the activity occurred, if relevant.", 0, java.lang.Integer.MAX_VALUE, location)); childrenList.add(new Property("policy", "uri", "Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.", 0, java.lang.Integer.MAX_VALUE, policy)); - childrenList.add(new Property("agent", "", "An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, an organization, software, or other entities that may be ascribed responsibility.", 0, java.lang.Integer.MAX_VALUE, agent)); + childrenList.add(new Property("agent", "", "An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.", 0, java.lang.Integer.MAX_VALUE, agent)); childrenList.add(new Property("entity", "", "An entity used in this activity.", 0, java.lang.Integer.MAX_VALUE, entity)); childrenList.add(new Property("signature", "Signature", "A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.", 0, java.lang.Integer.MAX_VALUE, signature)); } @@ -1595,10 +1607,8 @@ public class Provenance extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (target == null || target.isEmpty()) && (period == null || period.isEmpty()) - && (recorded == null || recorded.isEmpty()) && (reason == null || reason.isEmpty()) && (activity == null || activity.isEmpty()) - && (location == null || location.isEmpty()) && (policy == null || policy.isEmpty()) && (agent == null || agent.isEmpty()) - && (entity == null || entity.isEmpty()) && (signature == null || signature.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( target, period, recorded, reason + , activity, location, policy, agent, entity, signature); } @Override @@ -1607,24 +1617,44 @@ public class Provenance extends DomainResource { } /** - * Search parameter: sigtype + * Search parameter: sig *

* Description: Indication of the reason the entity signed the object(s)
* Type: token
* Path: Provenance.signature.type
*

*/ - @SearchParamDefinition(name="sigtype", path="Provenance.signature.type", description="Indication of the reason the entity signed the object(s)", type="token" ) - public static final String SP_SIGTYPE = "sigtype"; + @SearchParamDefinition(name="sig", path="Provenance.signature.type", description="Indication of the reason the entity signed the object(s)", type="token" ) + public static final String SP_SIG = "sig"; /** - * Fluent Client search parameter constant for sigtype + * Fluent Client search parameter constant for sig *

* Description: Indication of the reason the entity signed the object(s)
* Type: token
* Path: Provenance.signature.type
*

*/ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam SIGTYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SIGTYPE); + public static final ca.uhn.fhir.rest.gclient.TokenClientParam SIG = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SIG); + + /** + * Search parameter: entity-type + *

+ * Description: The type of resource in this entity
+ * Type: token
+ * Path: Provenance.entity.type
+ *

+ */ + @SearchParamDefinition(name="entity-type", path="Provenance.entity.type", description="The type of resource in this entity", type="token" ) + public static final String SP_ENTITY_TYPE = "entity-type"; + /** + * Fluent Client search parameter constant for entity-type + *

+ * Description: The type of resource in this entity
+ * Type: token
+ * Path: Provenance.entity.type
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam ENTITY_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ENTITY_TYPE); /** * Search parameter: agent @@ -1634,7 +1664,7 @@ public class Provenance extends DomainResource { * Path: Provenance.agent.actor
*

*/ - @SearchParamDefinition(name="agent", path="Provenance.agent.actor", description="Individual, device or organization playing role", type="reference" ) + @SearchParamDefinition(name="agent", path="Provenance.agent.actor", description="Individual, device or organization playing role", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_AGENT = "agent"; /** * Fluent Client search parameter constant for agent @@ -1652,26 +1682,6 @@ public class Provenance extends DomainResource { */ public static final ca.uhn.fhir.model.api.Include INCLUDE_AGENT = new ca.uhn.fhir.model.api.Include("Provenance:agent").toLocked(); - /** - * Search parameter: entitytype - *

- * Description: The type of resource in this entity
- * Type: token
- * Path: Provenance.entity.type
- *

- */ - @SearchParamDefinition(name="entitytype", path="Provenance.entity.type", description="The type of resource in this entity", type="token" ) - public static final String SP_ENTITYTYPE = "entitytype"; - /** - * Fluent Client search parameter constant for entitytype - *

- * Description: The type of resource in this entity
- * Type: token
- * Path: Provenance.entity.type
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam ENTITYTYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ENTITYTYPE); - /** * Search parameter: patient *

@@ -1680,7 +1690,7 @@ public class Provenance extends DomainResource { * Path: Provenance.target
*

*/ - @SearchParamDefinition(name="patient", path="Provenance.target", description="Target Reference(s) (usually version specific)", type="reference" ) + @SearchParamDefinition(name="patient", path="Provenance.target", description="Target Reference(s) (usually version specific)", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Quantity.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Quantity.java index b30a08f4ca6..066b63aafba 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Quantity.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Quantity.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. */ @@ -614,9 +613,8 @@ public class Quantity extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty()) - && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value, comparator, unit, system + , code); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Questionnaire.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Questionnaire.java index 7757629b63d..d4152bd3423 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Questionnaire.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Questionnaire.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions. */ @@ -512,38 +510,66 @@ public class Questionnaire extends DomainResource { @Description(shortDefinition="Concept that represents this item within in a questionnaire", formalDefinition="Identifies a how this group of questions is known in a particular terminology such as LOINC." ) protected List concept; + /** + * A short label for a particular group, question or set of display text within the questionnaire. + */ + @Child(name = "prefix", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="E.g. \"1(a)\", \"2.5.3\"", formalDefinition="A short label for a particular group, question or set of display text within the questionnaire." ) + protected StringType prefix; + /** * The name of a section, the text of a question or text content for a text item. */ - @Child(name = "text", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "text", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Primary text for the item", formalDefinition="The name of a section, the text of a question or text content for a text item." ) protected StringType text; /** * Identifies the type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.). */ - @Child(name = "type", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=false) + @Child(name = "type", type = {CodeType.class}, order=5, min=1, max=1, modifier=false, summary=false) @Description(shortDefinition="group | display | boolean | decimal | integer | date | dateTime +", formalDefinition="Identifies the type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.)." ) protected Enumeration type; + /** + * If present, indicates that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true. + */ + @Child(name = "enableWhen", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=true, summary=false) + @Description(shortDefinition="Only allow data when:", formalDefinition="If present, indicates that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true." ) + protected List enableWhen; + /** * If true, indicates that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire. */ - @Child(name = "required", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Whether the group must be included in data results", formalDefinition="If true, indicates that the item must be present in a \"completed\" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire." ) + @Child(name = "required", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Whether the item must be included in data results", formalDefinition="If true, indicates that the item must be present in a \"completed\" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire." ) protected BooleanType required; /** * Whether the item may occur multiple times in the instance, containing multiple sets of answers. */ - @Child(name = "repeats", type = {BooleanType.class}, order=6, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Whether the group may repeat", formalDefinition="Whether the item may occur multiple times in the instance, containing multiple sets of answers." ) + @Child(name = "repeats", type = {BooleanType.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Whether the item may repeat", formalDefinition="Whether the item may occur multiple times in the instance, containing multiple sets of answers." ) protected BooleanType repeats; + /** + * If true, the value cannot be changed by a human respondent to the Questionnaire. + */ + @Child(name = "readOnly", type = {BooleanType.class}, order=9, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Don't allow human editing", formalDefinition="If true, the value cannot be changed by a human respondent to the Questionnaire." ) + protected BooleanType readOnly; + + /** + * The maximum number of characters that are permitted in the answer to be considered a "valid" QuestionnaireResponse. + */ + @Child(name = "maxLength", type = {IntegerType.class}, order=10, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="No more than this many characters", formalDefinition="The maximum number of characters that are permitted in the answer to be considered a \"valid\" QuestionnaireResponse." ) + protected IntegerType maxLength; + /** * Reference to a value set containing a list of codes representing permitted answers for the question. */ - @Child(name = "options", type = {ValueSet.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Child(name = "options", type = {ValueSet.class}, order=11, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Valueset containing permitted answers", formalDefinition="Reference to a value set containing a list of codes representing permitted answers for the question." ) protected Reference options; @@ -555,18 +581,25 @@ public class Questionnaire extends DomainResource { /** * For a "choice" question, identifies one of the permitted answers for the question. */ - @Child(name = "option", type = {Coding.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "option", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Permitted answer", formalDefinition="For a \"choice\" question, identifies one of the permitted answers for the question." ) - protected List option; + protected List option; + + /** + * The value that should be pre-populated when rendering the questionnaire for user input. + */ + @Child(name = "initial", type = {BooleanType.class, DecimalType.class, IntegerType.class, DateType.class, DateTimeType.class, InstantType.class, TimeType.class, StringType.class, UriType.class, Attachment.class, Coding.class, Quantity.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Initial presumed answer for question", formalDefinition="The value that should be pre-populated when rendering the questionnaire for user input." ) + protected Type initial; /** * Allows text, questions and other groups to be nested beneath a question or group. */ - @Child(name = "item", type = {QuestionnaireItemComponent.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "item", type = {QuestionnaireItemComponent.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Nested questionnaire items", formalDefinition="Allows text, questions and other groups to be nested beneath a question or group." ) protected List item; - private static final long serialVersionUID = 10326314L; + private static final long serialVersionUID = -1787693458L; /** * Constructor @@ -672,6 +705,55 @@ public class Questionnaire extends DomainResource { return this; } + /** + * @return {@link #prefix} (A short label for a particular group, question or set of display text within the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPrefix" gives direct access to the value + */ + public StringType getPrefixElement() { + if (this.prefix == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireItemComponent.prefix"); + else if (Configuration.doAutoCreate()) + this.prefix = new StringType(); // bb + return this.prefix; + } + + public boolean hasPrefixElement() { + return this.prefix != null && !this.prefix.isEmpty(); + } + + public boolean hasPrefix() { + return this.prefix != null && !this.prefix.isEmpty(); + } + + /** + * @param value {@link #prefix} (A short label for a particular group, question or set of display text within the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPrefix" gives direct access to the value + */ + public QuestionnaireItemComponent setPrefixElement(StringType value) { + this.prefix = value; + return this; + } + + /** + * @return A short label for a particular group, question or set of display text within the questionnaire. + */ + public String getPrefix() { + return this.prefix == null ? null : this.prefix.getValue(); + } + + /** + * @param value A short label for a particular group, question or set of display text within the questionnaire. + */ + public QuestionnaireItemComponent setPrefix(String value) { + if (Utilities.noString(value)) + this.prefix = null; + else { + if (this.prefix == null) + this.prefix = new StringType(); + this.prefix.setValue(value); + } + return this; + } + /** * @return {@link #text} (The name of a section, the text of a question or text content for a text item.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value */ @@ -766,6 +848,46 @@ public class Questionnaire extends DomainResource { return this; } + /** + * @return {@link #enableWhen} (If present, indicates that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.) + */ + public List getEnableWhen() { + if (this.enableWhen == null) + this.enableWhen = new ArrayList(); + return this.enableWhen; + } + + public boolean hasEnableWhen() { + if (this.enableWhen == null) + return false; + for (QuestionnaireItemEnableWhenComponent item : this.enableWhen) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #enableWhen} (If present, indicates that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.) + */ + // syntactic sugar + public QuestionnaireItemEnableWhenComponent addEnableWhen() { //3 + QuestionnaireItemEnableWhenComponent t = new QuestionnaireItemEnableWhenComponent(); + if (this.enableWhen == null) + this.enableWhen = new ArrayList(); + this.enableWhen.add(t); + return t; + } + + // syntactic sugar + public QuestionnaireItemComponent addEnableWhen(QuestionnaireItemEnableWhenComponent t) { //3 + if (t == null) + return this; + if (this.enableWhen == null) + this.enableWhen = new ArrayList(); + this.enableWhen.add(t); + return this; + } + /** * @return {@link #required} (If true, indicates that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value */ @@ -856,6 +978,96 @@ public class Questionnaire extends DomainResource { return this; } + /** + * @return {@link #readOnly} (If true, the value cannot be changed by a human respondent to the Questionnaire.). This is the underlying object with id, value and extensions. The accessor "getReadOnly" gives direct access to the value + */ + public BooleanType getReadOnlyElement() { + if (this.readOnly == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireItemComponent.readOnly"); + else if (Configuration.doAutoCreate()) + this.readOnly = new BooleanType(); // bb + return this.readOnly; + } + + public boolean hasReadOnlyElement() { + return this.readOnly != null && !this.readOnly.isEmpty(); + } + + public boolean hasReadOnly() { + return this.readOnly != null && !this.readOnly.isEmpty(); + } + + /** + * @param value {@link #readOnly} (If true, the value cannot be changed by a human respondent to the Questionnaire.). This is the underlying object with id, value and extensions. The accessor "getReadOnly" gives direct access to the value + */ + public QuestionnaireItemComponent setReadOnlyElement(BooleanType value) { + this.readOnly = value; + return this; + } + + /** + * @return If true, the value cannot be changed by a human respondent to the Questionnaire. + */ + public boolean getReadOnly() { + return this.readOnly == null || this.readOnly.isEmpty() ? false : this.readOnly.getValue(); + } + + /** + * @param value If true, the value cannot be changed by a human respondent to the Questionnaire. + */ + public QuestionnaireItemComponent setReadOnly(boolean value) { + if (this.readOnly == null) + this.readOnly = new BooleanType(); + this.readOnly.setValue(value); + return this; + } + + /** + * @return {@link #maxLength} (The maximum number of characters that are permitted in the answer to be considered a "valid" QuestionnaireResponse.). This is the underlying object with id, value and extensions. The accessor "getMaxLength" gives direct access to the value + */ + public IntegerType getMaxLengthElement() { + if (this.maxLength == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireItemComponent.maxLength"); + else if (Configuration.doAutoCreate()) + this.maxLength = new IntegerType(); // bb + return this.maxLength; + } + + public boolean hasMaxLengthElement() { + return this.maxLength != null && !this.maxLength.isEmpty(); + } + + public boolean hasMaxLength() { + return this.maxLength != null && !this.maxLength.isEmpty(); + } + + /** + * @param value {@link #maxLength} (The maximum number of characters that are permitted in the answer to be considered a "valid" QuestionnaireResponse.). This is the underlying object with id, value and extensions. The accessor "getMaxLength" gives direct access to the value + */ + public QuestionnaireItemComponent setMaxLengthElement(IntegerType value) { + this.maxLength = value; + return this; + } + + /** + * @return The maximum number of characters that are permitted in the answer to be considered a "valid" QuestionnaireResponse. + */ + public int getMaxLength() { + return this.maxLength == null || this.maxLength.isEmpty() ? 0 : this.maxLength.getValue(); + } + + /** + * @param value The maximum number of characters that are permitted in the answer to be considered a "valid" QuestionnaireResponse. + */ + public QuestionnaireItemComponent setMaxLength(int value) { + if (this.maxLength == null) + this.maxLength = new IntegerType(); + this.maxLength.setValue(value); + return this; + } + /** * @return {@link #options} (Reference to a value set containing a list of codes representing permitted answers for the question.) */ @@ -903,16 +1115,16 @@ public class Questionnaire extends DomainResource { /** * @return {@link #option} (For a "choice" question, identifies one of the permitted answers for the question.) */ - public List getOption() { + public List getOption() { if (this.option == null) - this.option = new ArrayList(); + this.option = new ArrayList(); return this.option; } public boolean hasOption() { if (this.option == null) return false; - for (Coding item : this.option) + for (QuestionnaireItemOptionComponent item : this.option) if (!item.isEmpty()) return true; return false; @@ -922,24 +1134,212 @@ public class Questionnaire extends DomainResource { * @return {@link #option} (For a "choice" question, identifies one of the permitted answers for the question.) */ // syntactic sugar - public Coding addOption() { //3 - Coding t = new Coding(); + public QuestionnaireItemOptionComponent addOption() { //3 + QuestionnaireItemOptionComponent t = new QuestionnaireItemOptionComponent(); if (this.option == null) - this.option = new ArrayList(); + this.option = new ArrayList(); this.option.add(t); return t; } // syntactic sugar - public QuestionnaireItemComponent addOption(Coding t) { //3 + public QuestionnaireItemComponent addOption(QuestionnaireItemOptionComponent t) { //3 if (t == null) return this; if (this.option == null) - this.option = new ArrayList(); + this.option = new ArrayList(); this.option.add(t); return this; } + /** + * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) + */ + public Type getInitial() { + return this.initial; + } + + /** + * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) + */ + public BooleanType getInitialBooleanType() throws FHIRException { + if (!(this.initial instanceof BooleanType)) + throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.initial.getClass().getName()+" was encountered"); + return (BooleanType) this.initial; + } + + public boolean hasInitialBooleanType() { + return this.initial instanceof BooleanType; + } + + /** + * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) + */ + public DecimalType getInitialDecimalType() throws FHIRException { + if (!(this.initial instanceof DecimalType)) + throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.initial.getClass().getName()+" was encountered"); + return (DecimalType) this.initial; + } + + public boolean hasInitialDecimalType() { + return this.initial instanceof DecimalType; + } + + /** + * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) + */ + public IntegerType getInitialIntegerType() throws FHIRException { + if (!(this.initial instanceof IntegerType)) + throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.initial.getClass().getName()+" was encountered"); + return (IntegerType) this.initial; + } + + public boolean hasInitialIntegerType() { + return this.initial instanceof IntegerType; + } + + /** + * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) + */ + public DateType getInitialDateType() throws FHIRException { + if (!(this.initial instanceof DateType)) + throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.initial.getClass().getName()+" was encountered"); + return (DateType) this.initial; + } + + public boolean hasInitialDateType() { + return this.initial instanceof DateType; + } + + /** + * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) + */ + public DateTimeType getInitialDateTimeType() throws FHIRException { + if (!(this.initial instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.initial.getClass().getName()+" was encountered"); + return (DateTimeType) this.initial; + } + + public boolean hasInitialDateTimeType() { + return this.initial instanceof DateTimeType; + } + + /** + * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) + */ + public InstantType getInitialInstantType() throws FHIRException { + if (!(this.initial instanceof InstantType)) + throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.initial.getClass().getName()+" was encountered"); + return (InstantType) this.initial; + } + + public boolean hasInitialInstantType() { + return this.initial instanceof InstantType; + } + + /** + * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) + */ + public TimeType getInitialTimeType() throws FHIRException { + if (!(this.initial instanceof TimeType)) + throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.initial.getClass().getName()+" was encountered"); + return (TimeType) this.initial; + } + + public boolean hasInitialTimeType() { + return this.initial instanceof TimeType; + } + + /** + * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) + */ + public StringType getInitialStringType() throws FHIRException { + if (!(this.initial instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.initial.getClass().getName()+" was encountered"); + return (StringType) this.initial; + } + + public boolean hasInitialStringType() { + return this.initial instanceof StringType; + } + + /** + * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) + */ + public UriType getInitialUriType() throws FHIRException { + if (!(this.initial instanceof UriType)) + throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.initial.getClass().getName()+" was encountered"); + return (UriType) this.initial; + } + + public boolean hasInitialUriType() { + return this.initial instanceof UriType; + } + + /** + * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) + */ + public Attachment getInitialAttachment() throws FHIRException { + if (!(this.initial instanceof Attachment)) + throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.initial.getClass().getName()+" was encountered"); + return (Attachment) this.initial; + } + + public boolean hasInitialAttachment() { + return this.initial instanceof Attachment; + } + + /** + * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) + */ + public Coding getInitialCoding() throws FHIRException { + if (!(this.initial instanceof Coding)) + throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.initial.getClass().getName()+" was encountered"); + return (Coding) this.initial; + } + + public boolean hasInitialCoding() { + return this.initial instanceof Coding; + } + + /** + * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) + */ + public Quantity getInitialQuantity() throws FHIRException { + if (!(this.initial instanceof Quantity)) + throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.initial.getClass().getName()+" was encountered"); + return (Quantity) this.initial; + } + + public boolean hasInitialQuantity() { + return this.initial instanceof Quantity; + } + + /** + * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) + */ + public Reference getInitialReference() throws FHIRException { + if (!(this.initial instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.initial.getClass().getName()+" was encountered"); + return (Reference) this.initial; + } + + public boolean hasInitialReference() { + return this.initial instanceof Reference; + } + + public boolean hasInitial() { + return this.initial != null && !this.initial.isEmpty(); + } + + /** + * @param value {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) + */ + public QuestionnaireItemComponent setInitial(Type value) { + this.initial = value; + return this; + } + /** * @return {@link #item} (Allows text, questions and other groups to be nested beneath a question or group.) */ @@ -984,12 +1384,17 @@ public class Questionnaire extends DomainResource { super.listChildren(childrenList); childrenList.add(new Property("linkId", "string", "An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.", 0, java.lang.Integer.MAX_VALUE, linkId)); childrenList.add(new Property("concept", "Coding", "Identifies a how this group of questions is known in a particular terminology such as LOINC.", 0, java.lang.Integer.MAX_VALUE, concept)); + childrenList.add(new Property("prefix", "string", "A short label for a particular group, question or set of display text within the questionnaire.", 0, java.lang.Integer.MAX_VALUE, prefix)); childrenList.add(new Property("text", "string", "The name of a section, the text of a question or text content for a text item.", 0, java.lang.Integer.MAX_VALUE, text)); childrenList.add(new Property("type", "code", "Identifies the type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("enableWhen", "", "If present, indicates that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.", 0, java.lang.Integer.MAX_VALUE, enableWhen)); childrenList.add(new Property("required", "boolean", "If true, indicates that the item must be present in a \"completed\" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.", 0, java.lang.Integer.MAX_VALUE, required)); childrenList.add(new Property("repeats", "boolean", "Whether the item may occur multiple times in the instance, containing multiple sets of answers.", 0, java.lang.Integer.MAX_VALUE, repeats)); + childrenList.add(new Property("readOnly", "boolean", "If true, the value cannot be changed by a human respondent to the Questionnaire.", 0, java.lang.Integer.MAX_VALUE, readOnly)); + childrenList.add(new Property("maxLength", "integer", "The maximum number of characters that are permitted in the answer to be considered a \"valid\" QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, maxLength)); childrenList.add(new Property("options", "Reference(ValueSet)", "Reference to a value set containing a list of codes representing permitted answers for the question.", 0, java.lang.Integer.MAX_VALUE, options)); - childrenList.add(new Property("option", "Coding", "For a \"choice\" question, identifies one of the permitted answers for the question.", 0, java.lang.Integer.MAX_VALUE, option)); + childrenList.add(new Property("option", "", "For a \"choice\" question, identifies one of the permitted answers for the question.", 0, java.lang.Integer.MAX_VALUE, option)); + childrenList.add(new Property("initial[x]", "boolean|decimal|integer|date|dateTime|instant|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The value that should be pre-populated when rendering the questionnaire for user input.", 0, java.lang.Integer.MAX_VALUE, initial)); childrenList.add(new Property("item", "@Questionnaire.item", "Allows text, questions and other groups to be nested beneath a question or group.", 0, java.lang.Integer.MAX_VALUE, item)); } @@ -999,18 +1404,28 @@ public class Questionnaire extends DomainResource { this.linkId = castToString(value); // StringType else if (name.equals("concept")) this.getConcept().add(castToCoding(value)); + else if (name.equals("prefix")) + this.prefix = castToString(value); // StringType else if (name.equals("text")) this.text = castToString(value); // StringType else if (name.equals("type")) this.type = new QuestionnaireItemTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("enableWhen")) + this.getEnableWhen().add((QuestionnaireItemEnableWhenComponent) value); else if (name.equals("required")) this.required = castToBoolean(value); // BooleanType else if (name.equals("repeats")) this.repeats = castToBoolean(value); // BooleanType + else if (name.equals("readOnly")) + this.readOnly = castToBoolean(value); // BooleanType + else if (name.equals("maxLength")) + this.maxLength = castToInteger(value); // IntegerType else if (name.equals("options")) this.options = castToReference(value); // Reference else if (name.equals("option")) - this.getOption().add(castToCoding(value)); + this.getOption().add((QuestionnaireItemOptionComponent) value); + else if (name.equals("initial[x]")) + this.initial = (Type) value; // Type else if (name.equals("item")) this.getItem().add((QuestionnaireItemComponent) value); else @@ -1025,18 +1440,30 @@ public class Questionnaire extends DomainResource { else if (name.equals("concept")) { return addConcept(); } + else if (name.equals("prefix")) { + throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.prefix"); + } else if (name.equals("text")) { throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.text"); } else if (name.equals("type")) { throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.type"); } + else if (name.equals("enableWhen")) { + return addEnableWhen(); + } else if (name.equals("required")) { throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.required"); } else if (name.equals("repeats")) { throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.repeats"); } + else if (name.equals("readOnly")) { + throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.readOnly"); + } + else if (name.equals("maxLength")) { + throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.maxLength"); + } else if (name.equals("options")) { this.options = new Reference(); return this.options; @@ -1044,6 +1471,58 @@ public class Questionnaire extends DomainResource { else if (name.equals("option")) { return addOption(); } + else if (name.equals("initialBoolean")) { + this.initial = new BooleanType(); + return this.initial; + } + else if (name.equals("initialDecimal")) { + this.initial = new DecimalType(); + return this.initial; + } + else if (name.equals("initialInteger")) { + this.initial = new IntegerType(); + return this.initial; + } + else if (name.equals("initialDate")) { + this.initial = new DateType(); + return this.initial; + } + else if (name.equals("initialDateTime")) { + this.initial = new DateTimeType(); + return this.initial; + } + else if (name.equals("initialInstant")) { + this.initial = new InstantType(); + return this.initial; + } + else if (name.equals("initialTime")) { + this.initial = new TimeType(); + return this.initial; + } + else if (name.equals("initialString")) { + this.initial = new StringType(); + return this.initial; + } + else if (name.equals("initialUri")) { + this.initial = new UriType(); + return this.initial; + } + else if (name.equals("initialAttachment")) { + this.initial = new Attachment(); + return this.initial; + } + else if (name.equals("initialCoding")) { + this.initial = new Coding(); + return this.initial; + } + else if (name.equals("initialQuantity")) { + this.initial = new Quantity(); + return this.initial; + } + else if (name.equals("initialReference")) { + this.initial = new Reference(); + return this.initial; + } else if (name.equals("item")) { return addItem(); } @@ -1060,16 +1539,25 @@ public class Questionnaire extends DomainResource { for (Coding i : concept) dst.concept.add(i.copy()); }; + dst.prefix = prefix == null ? null : prefix.copy(); dst.text = text == null ? null : text.copy(); dst.type = type == null ? null : type.copy(); + if (enableWhen != null) { + dst.enableWhen = new ArrayList(); + for (QuestionnaireItemEnableWhenComponent i : enableWhen) + dst.enableWhen.add(i.copy()); + }; dst.required = required == null ? null : required.copy(); dst.repeats = repeats == null ? null : repeats.copy(); + dst.readOnly = readOnly == null ? null : readOnly.copy(); + dst.maxLength = maxLength == null ? null : maxLength.copy(); dst.options = options == null ? null : options.copy(); if (option != null) { - dst.option = new ArrayList(); - for (Coding i : option) + dst.option = new ArrayList(); + for (QuestionnaireItemOptionComponent i : option) dst.option.add(i.copy()); }; + dst.initial = initial == null ? null : initial.copy(); if (item != null) { dst.item = new ArrayList(); for (QuestionnaireItemComponent i : item) @@ -1085,10 +1573,11 @@ public class Questionnaire extends DomainResource { if (!(other instanceof QuestionnaireItemComponent)) return false; QuestionnaireItemComponent o = (QuestionnaireItemComponent) other; - return compareDeep(linkId, o.linkId, true) && compareDeep(concept, o.concept, true) && compareDeep(text, o.text, true) - && compareDeep(type, o.type, true) && compareDeep(required, o.required, true) && compareDeep(repeats, o.repeats, true) - && compareDeep(options, o.options, true) && compareDeep(option, o.option, true) && compareDeep(item, o.item, true) - ; + return compareDeep(linkId, o.linkId, true) && compareDeep(concept, o.concept, true) && compareDeep(prefix, o.prefix, true) + && compareDeep(text, o.text, true) && compareDeep(type, o.type, true) && compareDeep(enableWhen, o.enableWhen, true) + && compareDeep(required, o.required, true) && compareDeep(repeats, o.repeats, true) && compareDeep(readOnly, o.readOnly, true) + && compareDeep(maxLength, o.maxLength, true) && compareDeep(options, o.options, true) && compareDeep(option, o.option, true) + && compareDeep(initial, o.initial, true) && compareDeep(item, o.item, true); } @Override @@ -1098,15 +1587,15 @@ public class Questionnaire extends DomainResource { if (!(other instanceof QuestionnaireItemComponent)) return false; QuestionnaireItemComponent o = (QuestionnaireItemComponent) other; - return compareValues(linkId, o.linkId, true) && compareValues(text, o.text, true) && compareValues(type, o.type, true) - && compareValues(required, o.required, true) && compareValues(repeats, o.repeats, true); + return compareValues(linkId, o.linkId, true) && compareValues(prefix, o.prefix, true) && compareValues(text, o.text, true) + && compareValues(type, o.type, true) && compareValues(required, o.required, true) && compareValues(repeats, o.repeats, true) + && compareValues(readOnly, o.readOnly, true) && compareValues(maxLength, o.maxLength, true); } public boolean isEmpty() { - return super.isEmpty() && (linkId == null || linkId.isEmpty()) && (concept == null || concept.isEmpty()) - && (text == null || text.isEmpty()) && (type == null || type.isEmpty()) && (required == null || required.isEmpty()) - && (repeats == null || repeats.isEmpty()) && (options == null || options.isEmpty()) && (option == null || option.isEmpty()) - && (item == null || item.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( linkId, concept, prefix, text + , type, enableWhen, required, repeats, readOnly, maxLength, options, option, initial + , item); } public String fhirType() { @@ -1116,77 +1605,720 @@ public class Questionnaire extends DomainResource { } + @Block() + public static class QuestionnaireItemEnableWhenComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The linkId for the question whose answer (or lack of answer) governs whether this item is enabled. + */ + @Child(name = "question", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Question that determines whether item is enabled", formalDefinition="The linkId for the question whose answer (or lack of answer) governs whether this item is enabled." ) + protected StringType question; + + /** + * If present, indicates that this item should be enabled only if the specified question is answered or not answered. + */ + @Child(name = "answered", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Enable when answered or not", formalDefinition="If present, indicates that this item should be enabled only if the specified question is answered or not answered." ) + protected BooleanType answered; + + /** + * If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer. + */ + @Child(name = "answer", type = {BooleanType.class, DecimalType.class, IntegerType.class, DateType.class, DateTimeType.class, InstantType.class, TimeType.class, StringType.class, UriType.class, Attachment.class, Coding.class, Quantity.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Value question must have", formalDefinition="If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer." ) + protected Type answer; + + private static final long serialVersionUID = 903205698L; + + /** + * Constructor + */ + public QuestionnaireItemEnableWhenComponent() { + super(); + } + + /** + * Constructor + */ + public QuestionnaireItemEnableWhenComponent(StringType question) { + super(); + this.question = question; + } + + /** + * @return {@link #question} (The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.). This is the underlying object with id, value and extensions. The accessor "getQuestion" gives direct access to the value + */ + public StringType getQuestionElement() { + if (this.question == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireItemEnableWhenComponent.question"); + else if (Configuration.doAutoCreate()) + this.question = new StringType(); // bb + return this.question; + } + + public boolean hasQuestionElement() { + return this.question != null && !this.question.isEmpty(); + } + + public boolean hasQuestion() { + return this.question != null && !this.question.isEmpty(); + } + + /** + * @param value {@link #question} (The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.). This is the underlying object with id, value and extensions. The accessor "getQuestion" gives direct access to the value + */ + public QuestionnaireItemEnableWhenComponent setQuestionElement(StringType value) { + this.question = value; + return this; + } + + /** + * @return The linkId for the question whose answer (or lack of answer) governs whether this item is enabled. + */ + public String getQuestion() { + return this.question == null ? null : this.question.getValue(); + } + + /** + * @param value The linkId for the question whose answer (or lack of answer) governs whether this item is enabled. + */ + public QuestionnaireItemEnableWhenComponent setQuestion(String value) { + if (this.question == null) + this.question = new StringType(); + this.question.setValue(value); + return this; + } + + /** + * @return {@link #answered} (If present, indicates that this item should be enabled only if the specified question is answered or not answered.). This is the underlying object with id, value and extensions. The accessor "getAnswered" gives direct access to the value + */ + public BooleanType getAnsweredElement() { + if (this.answered == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create QuestionnaireItemEnableWhenComponent.answered"); + else if (Configuration.doAutoCreate()) + this.answered = new BooleanType(); // bb + return this.answered; + } + + public boolean hasAnsweredElement() { + return this.answered != null && !this.answered.isEmpty(); + } + + public boolean hasAnswered() { + return this.answered != null && !this.answered.isEmpty(); + } + + /** + * @param value {@link #answered} (If present, indicates that this item should be enabled only if the specified question is answered or not answered.). This is the underlying object with id, value and extensions. The accessor "getAnswered" gives direct access to the value + */ + public QuestionnaireItemEnableWhenComponent setAnsweredElement(BooleanType value) { + this.answered = value; + return this; + } + + /** + * @return If present, indicates that this item should be enabled only if the specified question is answered or not answered. + */ + public boolean getAnswered() { + return this.answered == null || this.answered.isEmpty() ? false : this.answered.getValue(); + } + + /** + * @param value If present, indicates that this item should be enabled only if the specified question is answered or not answered. + */ + public QuestionnaireItemEnableWhenComponent setAnswered(boolean value) { + if (this.answered == null) + this.answered = new BooleanType(); + this.answered.setValue(value); + return this; + } + + /** + * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) + */ + public Type getAnswer() { + return this.answer; + } + + /** + * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) + */ + public BooleanType getAnswerBooleanType() throws FHIRException { + if (!(this.answer instanceof BooleanType)) + throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.answer.getClass().getName()+" was encountered"); + return (BooleanType) this.answer; + } + + public boolean hasAnswerBooleanType() { + return this.answer instanceof BooleanType; + } + + /** + * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) + */ + public DecimalType getAnswerDecimalType() throws FHIRException { + if (!(this.answer instanceof DecimalType)) + throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.answer.getClass().getName()+" was encountered"); + return (DecimalType) this.answer; + } + + public boolean hasAnswerDecimalType() { + return this.answer instanceof DecimalType; + } + + /** + * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) + */ + public IntegerType getAnswerIntegerType() throws FHIRException { + if (!(this.answer instanceof IntegerType)) + throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.answer.getClass().getName()+" was encountered"); + return (IntegerType) this.answer; + } + + public boolean hasAnswerIntegerType() { + return this.answer instanceof IntegerType; + } + + /** + * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) + */ + public DateType getAnswerDateType() throws FHIRException { + if (!(this.answer instanceof DateType)) + throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.answer.getClass().getName()+" was encountered"); + return (DateType) this.answer; + } + + public boolean hasAnswerDateType() { + return this.answer instanceof DateType; + } + + /** + * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) + */ + public DateTimeType getAnswerDateTimeType() throws FHIRException { + if (!(this.answer instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.answer.getClass().getName()+" was encountered"); + return (DateTimeType) this.answer; + } + + public boolean hasAnswerDateTimeType() { + return this.answer instanceof DateTimeType; + } + + /** + * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) + */ + public InstantType getAnswerInstantType() throws FHIRException { + if (!(this.answer instanceof InstantType)) + throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.answer.getClass().getName()+" was encountered"); + return (InstantType) this.answer; + } + + public boolean hasAnswerInstantType() { + return this.answer instanceof InstantType; + } + + /** + * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) + */ + public TimeType getAnswerTimeType() throws FHIRException { + if (!(this.answer instanceof TimeType)) + throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.answer.getClass().getName()+" was encountered"); + return (TimeType) this.answer; + } + + public boolean hasAnswerTimeType() { + return this.answer instanceof TimeType; + } + + /** + * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) + */ + public StringType getAnswerStringType() throws FHIRException { + if (!(this.answer instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.answer.getClass().getName()+" was encountered"); + return (StringType) this.answer; + } + + public boolean hasAnswerStringType() { + return this.answer instanceof StringType; + } + + /** + * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) + */ + public UriType getAnswerUriType() throws FHIRException { + if (!(this.answer instanceof UriType)) + throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.answer.getClass().getName()+" was encountered"); + return (UriType) this.answer; + } + + public boolean hasAnswerUriType() { + return this.answer instanceof UriType; + } + + /** + * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) + */ + public Attachment getAnswerAttachment() throws FHIRException { + if (!(this.answer instanceof Attachment)) + throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.answer.getClass().getName()+" was encountered"); + return (Attachment) this.answer; + } + + public boolean hasAnswerAttachment() { + return this.answer instanceof Attachment; + } + + /** + * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) + */ + public Coding getAnswerCoding() throws FHIRException { + if (!(this.answer instanceof Coding)) + throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.answer.getClass().getName()+" was encountered"); + return (Coding) this.answer; + } + + public boolean hasAnswerCoding() { + return this.answer instanceof Coding; + } + + /** + * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) + */ + public Quantity getAnswerQuantity() throws FHIRException { + if (!(this.answer instanceof Quantity)) + throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.answer.getClass().getName()+" was encountered"); + return (Quantity) this.answer; + } + + public boolean hasAnswerQuantity() { + return this.answer instanceof Quantity; + } + + /** + * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) + */ + public Reference getAnswerReference() throws FHIRException { + if (!(this.answer instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.answer.getClass().getName()+" was encountered"); + return (Reference) this.answer; + } + + public boolean hasAnswerReference() { + return this.answer instanceof Reference; + } + + public boolean hasAnswer() { + return this.answer != null && !this.answer.isEmpty(); + } + + /** + * @param value {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) + */ + public QuestionnaireItemEnableWhenComponent setAnswer(Type value) { + this.answer = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("question", "string", "The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.", 0, java.lang.Integer.MAX_VALUE, question)); + childrenList.add(new Property("answered", "boolean", "If present, indicates that this item should be enabled only if the specified question is answered or not answered.", 0, java.lang.Integer.MAX_VALUE, answered)); + childrenList.add(new Property("answer[x]", "boolean|decimal|integer|date|dateTime|instant|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.", 0, java.lang.Integer.MAX_VALUE, answer)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("question")) + this.question = castToString(value); // StringType + else if (name.equals("answered")) + this.answered = castToBoolean(value); // BooleanType + else if (name.equals("answer[x]")) + this.answer = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("question")) { + throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.question"); + } + else if (name.equals("answered")) { + throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.answered"); + } + else if (name.equals("answerBoolean")) { + this.answer = new BooleanType(); + return this.answer; + } + else if (name.equals("answerDecimal")) { + this.answer = new DecimalType(); + return this.answer; + } + else if (name.equals("answerInteger")) { + this.answer = new IntegerType(); + return this.answer; + } + else if (name.equals("answerDate")) { + this.answer = new DateType(); + return this.answer; + } + else if (name.equals("answerDateTime")) { + this.answer = new DateTimeType(); + return this.answer; + } + else if (name.equals("answerInstant")) { + this.answer = new InstantType(); + return this.answer; + } + else if (name.equals("answerTime")) { + this.answer = new TimeType(); + return this.answer; + } + else if (name.equals("answerString")) { + this.answer = new StringType(); + return this.answer; + } + else if (name.equals("answerUri")) { + this.answer = new UriType(); + return this.answer; + } + else if (name.equals("answerAttachment")) { + this.answer = new Attachment(); + return this.answer; + } + else if (name.equals("answerCoding")) { + this.answer = new Coding(); + return this.answer; + } + else if (name.equals("answerQuantity")) { + this.answer = new Quantity(); + return this.answer; + } + else if (name.equals("answerReference")) { + this.answer = new Reference(); + return this.answer; + } + else + return super.addChild(name); + } + + public QuestionnaireItemEnableWhenComponent copy() { + QuestionnaireItemEnableWhenComponent dst = new QuestionnaireItemEnableWhenComponent(); + copyValues(dst); + dst.question = question == null ? null : question.copy(); + dst.answered = answered == null ? null : answered.copy(); + dst.answer = answer == null ? null : answer.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof QuestionnaireItemEnableWhenComponent)) + return false; + QuestionnaireItemEnableWhenComponent o = (QuestionnaireItemEnableWhenComponent) other; + return compareDeep(question, o.question, true) && compareDeep(answered, o.answered, true) && compareDeep(answer, o.answer, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof QuestionnaireItemEnableWhenComponent)) + return false; + QuestionnaireItemEnableWhenComponent o = (QuestionnaireItemEnableWhenComponent) other; + return compareValues(question, o.question, true) && compareValues(answered, o.answered, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( question, answered, answer); + } + + public String fhirType() { + return "Questionnaire.item.enableWhen"; + + } + + } + + @Block() + public static class QuestionnaireItemOptionComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Identifies a specific answer that's allowed as the answer to a question. + */ + @Child(name = "value", type = {IntegerType.class, DateType.class, TimeType.class, StringType.class, Coding.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Answer value", formalDefinition="Identifies a specific answer that's allowed as the answer to a question." ) + protected Type value; + + private static final long serialVersionUID = -732981989L; + + /** + * Constructor + */ + public QuestionnaireItemOptionComponent() { + super(); + } + + /** + * Constructor + */ + public QuestionnaireItemOptionComponent(Type value) { + super(); + this.value = value; + } + + /** + * @return {@link #value} (Identifies a specific answer that's allowed as the answer to a question.) + */ + public Type getValue() { + return this.value; + } + + /** + * @return {@link #value} (Identifies a specific answer that's allowed as the answer to a question.) + */ + public IntegerType getValueIntegerType() throws FHIRException { + if (!(this.value instanceof IntegerType)) + throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (IntegerType) this.value; + } + + public boolean hasValueIntegerType() { + return this.value instanceof IntegerType; + } + + /** + * @return {@link #value} (Identifies a specific answer that's allowed as the answer to a question.) + */ + public DateType getValueDateType() throws FHIRException { + if (!(this.value instanceof DateType)) + throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (DateType) this.value; + } + + public boolean hasValueDateType() { + return this.value instanceof DateType; + } + + /** + * @return {@link #value} (Identifies a specific answer that's allowed as the answer to a question.) + */ + public TimeType getValueTimeType() throws FHIRException { + if (!(this.value instanceof TimeType)) + throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (TimeType) this.value; + } + + public boolean hasValueTimeType() { + return this.value instanceof TimeType; + } + + /** + * @return {@link #value} (Identifies a specific answer that's allowed as the answer to a question.) + */ + public StringType getValueStringType() throws FHIRException { + if (!(this.value instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (StringType) this.value; + } + + public boolean hasValueStringType() { + return this.value instanceof StringType; + } + + /** + * @return {@link #value} (Identifies a specific answer that's allowed as the answer to a question.) + */ + public Coding getValueCoding() throws FHIRException { + if (!(this.value instanceof Coding)) + throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered"); + return (Coding) this.value; + } + + public boolean hasValueCoding() { + return this.value instanceof Coding; + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (Identifies a specific answer that's allowed as the answer to a question.) + */ + public QuestionnaireItemOptionComponent setValue(Type value) { + this.value = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("value[x]", "integer|date|time|string|Coding", "Identifies a specific answer that's allowed as the answer to a question.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("value[x]")) + this.value = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("valueInteger")) { + this.value = new IntegerType(); + return this.value; + } + else if (name.equals("valueDate")) { + this.value = new DateType(); + return this.value; + } + else if (name.equals("valueTime")) { + this.value = new TimeType(); + return this.value; + } + else if (name.equals("valueString")) { + this.value = new StringType(); + return this.value; + } + else if (name.equals("valueCoding")) { + this.value = new Coding(); + return this.value; + } + else + return super.addChild(name); + } + + public QuestionnaireItemOptionComponent copy() { + QuestionnaireItemOptionComponent dst = new QuestionnaireItemOptionComponent(); + copyValues(dst); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof QuestionnaireItemOptionComponent)) + return false; + QuestionnaireItemOptionComponent o = (QuestionnaireItemOptionComponent) other; + return compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof QuestionnaireItemOptionComponent)) + return false; + QuestionnaireItemOptionComponent o = (QuestionnaireItemOptionComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value); + } + + public String fhirType() { + return "Questionnaire.item.option"; + + } + + } + + /** + * An absolute URL that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published. + */ + @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Globally unique logical identifier for questionnaire", formalDefinition="An absolute URL that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published." ) + protected UriType url; + /** * This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). */ - @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="External identifiers for this questionnaire", formalDefinition="This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) protected List identifier; /** * The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated. */ - @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Logical identifier for this version of Questionnaire", formalDefinition="The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated." ) protected StringType version; /** * The lifecycle status of the questionnaire as a whole. */ - @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true) + @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) @Description(shortDefinition="draft | published | retired", formalDefinition="The lifecycle status of the questionnaire as a whole." ) protected Enumeration status; /** * The date that this questionnaire was last changed. */ - @Child(name = "date", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "date", type = {DateTimeType.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Date this version was authored", formalDefinition="The date that this questionnaire was last changed." ) protected DateTimeType date; /** * Organization or person responsible for developing and maintaining the questionnaire. */ - @Child(name = "publisher", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "publisher", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Organization/individual who designed the questionnaire", formalDefinition="Organization or person responsible for developing and maintaining the questionnaire." ) protected StringType publisher; /** * Contact details to assist a user in finding and communicating with the publisher. */ - @Child(name = "telecom", type = {ContactPoint.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "telecom", type = {ContactPoint.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) protected List telecom; + /** + * A code that identifies the questionnaire as falling into a particular group of like questionnaires; e.g. "Pediatric", "Admissions", "Research", "Demographic", "Opinion Survey", etc. + */ + @Child(name = "useContext", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Questionnaire intends to support these contexts", formalDefinition="A code that identifies the questionnaire as falling into a particular group of like questionnaires; e.g. \"Pediatric\", \"Admissions\", \"Research\", \"Demographic\", \"Opinion Survey\", etc." ) + protected List useContext; + /** * The name or label associated with this questionnaire. */ - @Child(name = "title", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "title", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Name for the questionnaire", formalDefinition="The name or label associated with this questionnaire." ) protected StringType title; /** * Identifies a how this question or group of questions is known in a particular terminology such as LOINC. */ - @Child(name = "concept", type = {Coding.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "concept", type = {Coding.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Concept that represents the overall questionnaire", formalDefinition="Identifies a how this question or group of questions is known in a particular terminology such as LOINC." ) protected List concept; /** * Identifies the types of subjects that can be the subject of the questionnaire. */ - @Child(name = "subjectType", type = {CodeType.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "subjectType", type = {CodeType.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Resource that can be subject of QuestionnaireResponse", formalDefinition="Identifies the types of subjects that can be the subject of the questionnaire." ) protected List subjectType; /** * The questions and groupings of questions that make up the questionnaire. */ - @Child(name = "item", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "item", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Questions and sections within the Questionnaire", formalDefinition="The questions and groupings of questions that make up the questionnaire." ) protected List item; - private static final long serialVersionUID = 154986016L; + private static final long serialVersionUID = 1271324566L; /** * Constructor @@ -1203,6 +2335,55 @@ public class Questionnaire extends DomainResource { this.status = status; } + /** + * @return {@link #url} (An absolute URL that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Questionnaire.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An absolute URL that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public Questionnaire setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An absolute URL that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An absolute URL that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published. + */ + public Questionnaire setUrl(String value) { + if (Utilities.noString(value)) + this.url = null; + else { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + } + return this; + } + /** * @return {@link #identifier} (This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) */ @@ -1475,6 +2656,46 @@ public class Questionnaire extends DomainResource { return this; } + /** + * @return {@link #useContext} (A code that identifies the questionnaire as falling into a particular group of like questionnaires; e.g. "Pediatric", "Admissions", "Research", "Demographic", "Opinion Survey", etc.) + */ + public List getUseContext() { + if (this.useContext == null) + this.useContext = new ArrayList(); + return this.useContext; + } + + public boolean hasUseContext() { + if (this.useContext == null) + return false; + for (CodeableConcept item : this.useContext) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #useContext} (A code that identifies the questionnaire as falling into a particular group of like questionnaires; e.g. "Pediatric", "Admissions", "Research", "Demographic", "Opinion Survey", etc.) + */ + // syntactic sugar + public CodeableConcept addUseContext() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return t; + } + + // syntactic sugar + public Questionnaire addUseContext(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return this; + } + /** * @return {@link #title} (The name or label associated with this questionnaire.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value */ @@ -1660,12 +2881,14 @@ public class Questionnaire extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); + childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); childrenList.add(new Property("version", "string", "The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated.", 0, java.lang.Integer.MAX_VALUE, version)); childrenList.add(new Property("status", "code", "The lifecycle status of the questionnaire as a whole.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("date", "dateTime", "The date that this questionnaire was last changed.", 0, java.lang.Integer.MAX_VALUE, date)); childrenList.add(new Property("publisher", "string", "Organization or person responsible for developing and maintaining the questionnaire.", 0, java.lang.Integer.MAX_VALUE, publisher)); childrenList.add(new Property("telecom", "ContactPoint", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + childrenList.add(new Property("useContext", "CodeableConcept", "A code that identifies the questionnaire as falling into a particular group of like questionnaires; e.g. \"Pediatric\", \"Admissions\", \"Research\", \"Demographic\", \"Opinion Survey\", etc.", 0, java.lang.Integer.MAX_VALUE, useContext)); childrenList.add(new Property("title", "string", "The name or label associated with this questionnaire.", 0, java.lang.Integer.MAX_VALUE, title)); childrenList.add(new Property("concept", "Coding", "Identifies a how this question or group of questions is known in a particular terminology such as LOINC.", 0, java.lang.Integer.MAX_VALUE, concept)); childrenList.add(new Property("subjectType", "code", "Identifies the types of subjects that can be the subject of the questionnaire.", 0, java.lang.Integer.MAX_VALUE, subjectType)); @@ -1674,7 +2897,9 @@ public class Questionnaire extends DomainResource { @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("identifier")) + if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); else if (name.equals("version")) this.version = castToString(value); // StringType @@ -1686,6 +2911,8 @@ public class Questionnaire extends DomainResource { this.publisher = castToString(value); // StringType else if (name.equals("telecom")) this.getTelecom().add(castToContactPoint(value)); + else if (name.equals("useContext")) + this.getUseContext().add(castToCodeableConcept(value)); else if (name.equals("title")) this.title = castToString(value); // StringType else if (name.equals("concept")) @@ -1700,7 +2927,10 @@ public class Questionnaire extends DomainResource { @Override public Base addChild(String name) throws FHIRException { - if (name.equals("identifier")) { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.url"); + } + else if (name.equals("identifier")) { return addIdentifier(); } else if (name.equals("version")) { @@ -1718,6 +2948,9 @@ public class Questionnaire extends DomainResource { else if (name.equals("telecom")) { return addTelecom(); } + else if (name.equals("useContext")) { + return addUseContext(); + } else if (name.equals("title")) { throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.title"); } @@ -1742,6 +2975,7 @@ public class Questionnaire extends DomainResource { public Questionnaire copy() { Questionnaire dst = new Questionnaire(); copyValues(dst); + dst.url = url == null ? null : url.copy(); if (identifier != null) { dst.identifier = new ArrayList(); for (Identifier i : identifier) @@ -1756,6 +2990,11 @@ public class Questionnaire extends DomainResource { for (ContactPoint i : telecom) dst.telecom.add(i.copy()); }; + if (useContext != null) { + dst.useContext = new ArrayList(); + for (CodeableConcept i : useContext) + dst.useContext.add(i.copy()); + }; dst.title = title == null ? null : title.copy(); if (concept != null) { dst.concept = new ArrayList(); @@ -1786,10 +3025,11 @@ public class Questionnaire extends DomainResource { if (!(other instanceof Questionnaire)) return false; Questionnaire o = (Questionnaire) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) && compareDeep(status, o.status, true) - && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) && compareDeep(telecom, o.telecom, true) - && compareDeep(title, o.title, true) && compareDeep(concept, o.concept, true) && compareDeep(subjectType, o.subjectType, true) - && compareDeep(item, o.item, true); + return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) + && compareDeep(status, o.status, true) && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) + && compareDeep(telecom, o.telecom, true) && compareDeep(useContext, o.useContext, true) && compareDeep(title, o.title, true) + && compareDeep(concept, o.concept, true) && compareDeep(subjectType, o.subjectType, true) && compareDeep(item, o.item, true) + ; } @Override @@ -1799,16 +3039,14 @@ public class Questionnaire extends DomainResource { if (!(other instanceof Questionnaire)) return false; Questionnaire o = (Questionnaire) other; - return compareValues(version, o.version, true) && compareValues(status, o.status, true) && compareValues(date, o.date, true) - && compareValues(publisher, o.publisher, true) && compareValues(title, o.title, true) && compareValues(subjectType, o.subjectType, true) - ; + return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(status, o.status, true) + && compareValues(date, o.date, true) && compareValues(publisher, o.publisher, true) && compareValues(title, o.title, true) + && compareValues(subjectType, o.subjectType, true); } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (version == null || version.isEmpty()) - && (status == null || status.isEmpty()) && (date == null || date.isEmpty()) && (publisher == null || publisher.isEmpty()) - && (telecom == null || telecom.isEmpty()) && (title == null || title.isEmpty()) && (concept == null || concept.isEmpty()) - && (subjectType == null || subjectType.isEmpty()) && (item == null || item.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, identifier, version, status + , date, publisher, telecom, useContext, title, concept, subjectType, item); } @Override @@ -1876,6 +3114,26 @@ public class Questionnaire extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); + /** + * Search parameter: context + *

+ * Description: A use context assigned to the questionnaire
+ * Type: token
+ * Path: Questionnaire.useContext
+ *

+ */ + @SearchParamDefinition(name="context", path="Questionnaire.useContext", description="A use context assigned to the questionnaire", type="token" ) + public static final String SP_CONTEXT = "context"; + /** + * Fluent Client search parameter constant for context + *

+ * Description: A use context assigned to the questionnaire
+ * Type: token
+ * Path: Questionnaire.useContext
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT); + /** * Search parameter: publisher *

diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/QuestionnaireResponse.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/QuestionnaireResponse.java index ac1ae3e400a..10017324337 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/QuestionnaireResponse.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/QuestionnaireResponse.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions. */ @@ -507,9 +506,8 @@ public class QuestionnaireResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (linkId == null || linkId.isEmpty()) && (text == null || text.isEmpty()) - && (subject == null || subject.isEmpty()) && (answer == null || answer.isEmpty()) && (item == null || item.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( linkId, text, subject, answer + , item); } public String fhirType() { @@ -882,8 +880,7 @@ public class QuestionnaireResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (value == null || value.isEmpty()) && (item == null || item.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value, item); } public String fhirType() { @@ -1489,10 +1486,8 @@ public class QuestionnaireResponse extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (questionnaire == null || questionnaire.isEmpty()) - && (status == null || status.isEmpty()) && (subject == null || subject.isEmpty()) && (author == null || author.isEmpty()) - && (authored == null || authored.isEmpty()) && (source == null || source.isEmpty()) && (encounter == null || encounter.isEmpty()) - && (item == null || item.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, questionnaire, status + , subject, author, authored, source, encounter, item); } @Override @@ -1554,7 +1549,7 @@ public class QuestionnaireResponse extends DomainResource { * Path: QuestionnaireResponse.subject
*

*/ - @SearchParamDefinition(name="subject", path="QuestionnaireResponse.subject", description="The subject of the questionnaire", type="reference" ) + @SearchParamDefinition(name="subject", path="QuestionnaireResponse.subject", description="The subject of the questionnaire", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject @@ -1580,7 +1575,7 @@ public class QuestionnaireResponse extends DomainResource { * Path: QuestionnaireResponse.author
*

*/ - @SearchParamDefinition(name="author", path="QuestionnaireResponse.author", description="The author of the questionnaire", type="reference" ) + @SearchParamDefinition(name="author", path="QuestionnaireResponse.author", description="The author of the questionnaire", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_AUTHOR = "author"; /** * Fluent Client search parameter constant for author @@ -1632,7 +1627,7 @@ public class QuestionnaireResponse extends DomainResource { * Path: QuestionnaireResponse.encounter
*

*/ - @SearchParamDefinition(name="encounter", path="QuestionnaireResponse.encounter", description="Encounter during which questionnaire was authored", type="reference" ) + @SearchParamDefinition(name="encounter", path="QuestionnaireResponse.encounter", description="Encounter during which questionnaire was authored", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) public static final String SP_ENCOUNTER = "encounter"; /** * Fluent Client search parameter constant for encounter @@ -1658,7 +1653,7 @@ public class QuestionnaireResponse extends DomainResource { * Path: QuestionnaireResponse.source
*

*/ - @SearchParamDefinition(name="source", path="QuestionnaireResponse.source", description="The person who answered the questions", type="reference" ) + @SearchParamDefinition(name="source", path="QuestionnaireResponse.source", description="The person who answered the questions", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_SOURCE = "source"; /** * Fluent Client search parameter constant for source diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Range.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Range.java index cb2bed0391e..d7c90b3c7d1 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Range.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Range.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -37,9 +37,8 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A set of ordered Quantities defined by a low and high limit. */ @@ -185,8 +184,7 @@ public class Range extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (low == null || low.isEmpty()) && (high == null || high.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( low, high); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Ratio.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Ratio.java index 09e7d34a560..d2fc63fcf10 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Ratio.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Ratio.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -37,9 +37,8 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A relationship of two Quantity values - expressed as a numerator and a denominator. */ @@ -186,8 +185,7 @@ public class Ratio extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (numerator == null || numerator.isEmpty()) && (denominator == null || denominator.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( numerator, denominator); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Reference.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Reference.java index 8bd1254cc50..6b6f0bec428 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Reference.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Reference.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -38,9 +38,8 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A reference from one resource to another. */ @@ -100,6 +99,15 @@ public class Reference extends BaseReference implements IBaseReference, IComposi /** * @return {@link #reference} (A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value */ + public StringType getReferenceElement_() { + if (this.reference == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Reference.reference"); + else if (Configuration.doAutoCreate()) + this.reference = new StringType(); // bb + return this.reference; + } + public boolean hasReferenceElement() { return this.reference != null && !this.reference.isEmpty(); } @@ -268,8 +276,7 @@ public class Reference extends BaseReference implements IBaseReference, IComposi } public boolean isEmpty() { - return super.isEmpty() && (reference == null || reference.isEmpty()) && (display == null || display.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( reference, display); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ReferralRequest.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ReferralRequest.java index cd208eeda7e..7fcce62745c 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ReferralRequest.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ReferralRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization. */ @@ -54,29 +53,21 @@ public class ReferralRequest extends DomainResource { */ DRAFT, /** - * The referral has been transmitted, but not yet acknowledged by the recipient. - */ - REQUESTED, - /** - * The referral has been acknowledged by the recipient, and is in the process of being actioned. + * The referral is complete and is ready for fulfillment. */ ACTIVE, /** * The referral has been cancelled without being completed. For example it is no longer needed. */ CANCELLED, - /** - * The recipient has agreed to deliver the care requested by the referral. - */ - ACCEPTED, - /** - * The recipient has declined to accept the referral. - */ - REJECTED, /** * The referral has been completely actioned. */ COMPLETED, + /** + * This referral record should never have existed, though it's possible some degree of real-world activity or decisions may have been taken due to its existence + */ + ENTEREDINERROR, /** * added to help the parsers */ @@ -86,65 +77,53 @@ public class ReferralRequest extends DomainResource { return null; if ("draft".equals(codeString)) return DRAFT; - if ("requested".equals(codeString)) - return REQUESTED; if ("active".equals(codeString)) return ACTIVE; if ("cancelled".equals(codeString)) return CANCELLED; - if ("accepted".equals(codeString)) - return ACCEPTED; - if ("rejected".equals(codeString)) - return REJECTED; if ("completed".equals(codeString)) return COMPLETED; + if ("entered-in-error".equals(codeString)) + return ENTEREDINERROR; throw new FHIRException("Unknown ReferralStatus code '"+codeString+"'"); } public String toCode() { switch (this) { case DRAFT: return "draft"; - case REQUESTED: return "requested"; case ACTIVE: return "active"; case CANCELLED: return "cancelled"; - case ACCEPTED: return "accepted"; - case REJECTED: return "rejected"; case COMPLETED: return "completed"; + case ENTEREDINERROR: return "entered-in-error"; default: return "?"; } } public String getSystem() { switch (this) { case DRAFT: return "http://hl7.org/fhir/referralstatus"; - case REQUESTED: return "http://hl7.org/fhir/referralstatus"; case ACTIVE: return "http://hl7.org/fhir/referralstatus"; case CANCELLED: return "http://hl7.org/fhir/referralstatus"; - case ACCEPTED: return "http://hl7.org/fhir/referralstatus"; - case REJECTED: return "http://hl7.org/fhir/referralstatus"; case COMPLETED: return "http://hl7.org/fhir/referralstatus"; + case ENTEREDINERROR: return "http://hl7.org/fhir/referralstatus"; default: return "?"; } } public String getDefinition() { switch (this) { case DRAFT: return "A draft referral that has yet to be send."; - case REQUESTED: return "The referral has been transmitted, but not yet acknowledged by the recipient."; - case ACTIVE: return "The referral has been acknowledged by the recipient, and is in the process of being actioned."; + case ACTIVE: return "The referral is complete and is ready for fulfillment."; case CANCELLED: return "The referral has been cancelled without being completed. For example it is no longer needed."; - case ACCEPTED: return "The recipient has agreed to deliver the care requested by the referral."; - case REJECTED: return "The recipient has declined to accept the referral."; case COMPLETED: return "The referral has been completely actioned."; + case ENTEREDINERROR: return "This referral record should never have existed, though it's possible some degree of real-world activity or decisions may have been taken due to its existence"; default: return "?"; } } public String getDisplay() { switch (this) { case DRAFT: return "Draft"; - case REQUESTED: return "Requested"; case ACTIVE: return "Active"; case CANCELLED: return "Cancelled"; - case ACCEPTED: return "Accepted"; - case REJECTED: return "Rejected"; case COMPLETED: return "Completed"; + case ENTEREDINERROR: return "Entered in Error"; default: return "?"; } } @@ -157,18 +136,14 @@ public class ReferralRequest extends DomainResource { return null; if ("draft".equals(codeString)) return ReferralStatus.DRAFT; - if ("requested".equals(codeString)) - return ReferralStatus.REQUESTED; if ("active".equals(codeString)) return ReferralStatus.ACTIVE; if ("cancelled".equals(codeString)) return ReferralStatus.CANCELLED; - if ("accepted".equals(codeString)) - return ReferralStatus.ACCEPTED; - if ("rejected".equals(codeString)) - return ReferralStatus.REJECTED; if ("completed".equals(codeString)) return ReferralStatus.COMPLETED; + if ("entered-in-error".equals(codeString)) + return ReferralStatus.ENTEREDINERROR; throw new IllegalArgumentException("Unknown ReferralStatus code '"+codeString+"'"); } public Enumeration fromType(Base code) throws FHIRException { @@ -179,35 +154,27 @@ public class ReferralRequest extends DomainResource { return null; if ("draft".equals(codeString)) return new Enumeration(this, ReferralStatus.DRAFT); - if ("requested".equals(codeString)) - return new Enumeration(this, ReferralStatus.REQUESTED); if ("active".equals(codeString)) return new Enumeration(this, ReferralStatus.ACTIVE); if ("cancelled".equals(codeString)) return new Enumeration(this, ReferralStatus.CANCELLED); - if ("accepted".equals(codeString)) - return new Enumeration(this, ReferralStatus.ACCEPTED); - if ("rejected".equals(codeString)) - return new Enumeration(this, ReferralStatus.REJECTED); if ("completed".equals(codeString)) return new Enumeration(this, ReferralStatus.COMPLETED); + if ("entered-in-error".equals(codeString)) + return new Enumeration(this, ReferralStatus.ENTEREDINERROR); throw new FHIRException("Unknown ReferralStatus code '"+codeString+"'"); } public String toCode(ReferralStatus code) { if (code == ReferralStatus.DRAFT) return "draft"; - if (code == ReferralStatus.REQUESTED) - return "requested"; if (code == ReferralStatus.ACTIVE) return "active"; if (code == ReferralStatus.CANCELLED) return "cancelled"; - if (code == ReferralStatus.ACCEPTED) - return "accepted"; - if (code == ReferralStatus.REJECTED) - return "rejected"; if (code == ReferralStatus.COMPLETED) return "completed"; + if (code == ReferralStatus.ENTEREDINERROR) + return "entered-in-error"; return "?"; } public String toSystem(ReferralStatus code) { @@ -215,52 +182,167 @@ public class ReferralRequest extends DomainResource { } } - /** - * The workflow status of the referral or transfer of care request. - */ - @Child(name = "status", type = {CodeType.class}, order=0, min=1, max=1, modifier=true, summary=true) - @Description(shortDefinition="draft | requested | active | cancelled | accepted | rejected | completed", formalDefinition="The workflow status of the referral or transfer of care request." ) - protected Enumeration status; + public enum ReferralCategory { + /** + * The referral request represents a suggestion or recommendation that a referral be made. + */ + PROPOSAL, + /** + * The referral request represents an intention by the author to make a referral, but no actual referral has yet been made/authorized. + */ + PLAN, + /** + * This is an actual referral request which, when active, will have the authorizations needed to allow it to be actioned. + */ + REQUEST, + /** + * added to help the parsers + */ + NULL; + public static ReferralCategory fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("proposal".equals(codeString)) + return PROPOSAL; + if ("plan".equals(codeString)) + return PLAN; + if ("request".equals(codeString)) + return REQUEST; + throw new FHIRException("Unknown ReferralCategory code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case PROPOSAL: return "proposal"; + case PLAN: return "plan"; + case REQUEST: return "request"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case PROPOSAL: return "http://hl7.org/fhir/referralcategory"; + case PLAN: return "http://hl7.org/fhir/referralcategory"; + case REQUEST: return "http://hl7.org/fhir/referralcategory"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case PROPOSAL: return "The referral request represents a suggestion or recommendation that a referral be made."; + case PLAN: return "The referral request represents an intention by the author to make a referral, but no actual referral has yet been made/authorized."; + case REQUEST: return "This is an actual referral request which, when active, will have the authorizations needed to allow it to be actioned."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case PROPOSAL: return "Proposal"; + case PLAN: return "Plan"; + case REQUEST: return "Request"; + default: return "?"; + } + } + } + + public static class ReferralCategoryEnumFactory implements EnumFactory { + public ReferralCategory fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("proposal".equals(codeString)) + return ReferralCategory.PROPOSAL; + if ("plan".equals(codeString)) + return ReferralCategory.PLAN; + if ("request".equals(codeString)) + return ReferralCategory.REQUEST; + throw new IllegalArgumentException("Unknown ReferralCategory code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("proposal".equals(codeString)) + return new Enumeration(this, ReferralCategory.PROPOSAL); + if ("plan".equals(codeString)) + return new Enumeration(this, ReferralCategory.PLAN); + if ("request".equals(codeString)) + return new Enumeration(this, ReferralCategory.REQUEST); + throw new FHIRException("Unknown ReferralCategory code '"+codeString+"'"); + } + public String toCode(ReferralCategory code) { + if (code == ReferralCategory.PROPOSAL) + return "proposal"; + if (code == ReferralCategory.PLAN) + return "plan"; + if (code == ReferralCategory.REQUEST) + return "request"; + return "?"; + } + public String toSystem(ReferralCategory code) { + return code.getSystem(); + } + } /** * Business identifier that uniquely identifies the referral/care transfer request instance. */ - @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Business identifier", formalDefinition="Business identifier that uniquely identifies the referral/care transfer request instance." ) protected List identifier; /** - * Date/DateTime of creation for draft requests and date of activation for active requests. + * Indicates any plans, proposals or orders that this request is intended to satisfy - in whole or in part. */ - @Child(name = "date", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Date of creation/activation", formalDefinition="Date/DateTime of creation for draft requests and date of activation for active requests." ) - protected DateTimeType date; + @Child(name = "basedOn", type = {ReferralRequest.class, CarePlan.class, DiagnosticOrder.class, ProcedureRequest.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Request fulfilled by this request", formalDefinition="Indicates any plans, proposals or orders that this request is intended to satisfy - in whole or in part." ) + protected List basedOn; + /** + * The actual objects that are the target of the reference (Indicates any plans, proposals or orders that this request is intended to satisfy - in whole or in part.) + */ + protected List basedOnTarget; + + + /** + * The business identifier of the logical "grouping" request/order that this referral is a part of. + */ + @Child(name = "parent", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Composite request this is part of", formalDefinition="The business identifier of the logical \"grouping\" request/order that this referral is a part of." ) + protected Identifier parent; + + /** + * The status of the authorization/intention reflected by the referral request record. + */ + @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="draft | active | cancelled | completed | entered-in-error", formalDefinition="The status of the authorization/intention reflected by the referral request record." ) + protected Enumeration status; + + /** + * Distinguishes the "level" of authorization/demand implicit in this request. + */ + @Child(name = "category", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="proposal | plan | request", formalDefinition="Distinguishes the \"level\" of authorization/demand implicit in this request." ) + protected Enumeration category; /** * An indication of the type of referral (or where applicable the type of transfer of care) request. */ - @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "type", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Referral/Transition of care request type", formalDefinition="An indication of the type of referral (or where applicable the type of transfer of care) request." ) protected CodeableConcept type; - /** - * Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology. - */ - @Child(name = "specialty", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The clinical specialty (discipline) that the referral is requested for", formalDefinition="Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology." ) - protected CodeableConcept specialty; - /** * An indication of the urgency of referral (or where applicable the type of transfer of care) request. */ - @Child(name = "priority", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "priority", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Urgency of referral / transfer of care request", formalDefinition="An indication of the urgency of referral (or where applicable the type of transfer of care) request." ) protected CodeableConcept priority; /** * The patient who is the subject of a referral or transfer of care request. */ - @Child(name = "patient", type = {Patient.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "patient", type = {Patient.class}, order=7, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Patient referred to care or transfer", formalDefinition="The patient who is the subject of a referral or transfer of care request." ) protected Reference patient; @@ -269,10 +351,36 @@ public class ReferralRequest extends DomainResource { */ protected Patient patientTarget; + /** + * The encounter at which the request for referral or transfer of care is initiated. + */ + @Child(name = "context", type = {Encounter.class, EpisodeOfCare.class}, order=8, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Originating encounter", formalDefinition="The encounter at which the request for referral or transfer of care is initiated." ) + protected Reference context; + + /** + * The actual object that is the target of the reference (The encounter at which the request for referral or transfer of care is initiated.) + */ + protected Resource contextTarget; + + /** + * The period of time within which the services identified in the referral/transfer of care is specified or required to occur. + */ + @Child(name = "fulfillmentTime", type = {Period.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Requested service(s) fulfillment time", formalDefinition="The period of time within which the services identified in the referral/transfer of care is specified or required to occur." ) + protected Period fulfillmentTime; + + /** + * Date/DateTime of creation for draft requests and date of activation for active requests. + */ + @Child(name = "authored", type = {DateTimeType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date of creation/activation", formalDefinition="Date/DateTime of creation for draft requests and date of activation for active requests." ) + protected DateTimeType authored; + /** * The healthcare provider or provider organization who/which initiated the referral/transfer of care request. Can also be Patient (a self referral). */ - @Child(name = "requester", type = {Practitioner.class, Organization.class, Patient.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "requester", type = {Practitioner.class, Organization.class, Patient.class}, order=11, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Requester of referral / transfer of care", formalDefinition="The healthcare provider or provider organization who/which initiated the referral/transfer of care request. Can also be Patient (a self referral)." ) protected Reference requester; @@ -281,10 +389,17 @@ public class ReferralRequest extends DomainResource { */ protected Resource requesterTarget; + /** + * Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology. + */ + @Child(name = "specialty", type = {CodeableConcept.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The clinical specialty (discipline) that the referral is requested for", formalDefinition="Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology." ) + protected CodeableConcept specialty; + /** * The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request. */ - @Child(name = "recipient", type = {Practitioner.class, Organization.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "recipient", type = {Practitioner.class, Organization.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Receiver of referral / transfer of care request", formalDefinition="The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request." ) protected List recipient; /** @@ -293,50 +408,31 @@ public class ReferralRequest extends DomainResource { protected List recipientTarget; - /** - * The encounter at which the request for referral or transfer of care is initiated. - */ - @Child(name = "encounter", type = {Encounter.class}, order=9, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Originating encounter", formalDefinition="The encounter at which the request for referral or transfer of care is initiated." ) - protected Reference encounter; - - /** - * The actual object that is the target of the reference (The encounter at which the request for referral or transfer of care is initiated.) - */ - protected Encounter encounterTarget; - - /** - * Date/DateTime the request for referral or transfer of care is sent by the author. - */ - @Child(name = "dateSent", type = {DateTimeType.class}, order=10, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Date referral/transfer of care request is sent", formalDefinition="Date/DateTime the request for referral or transfer of care is sent by the author." ) - protected DateTimeType dateSent; - /** * Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management. */ - @Child(name = "reason", type = {CodeableConcept.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Child(name = "reason", type = {CodeableConcept.class}, order=14, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Reason for referral / transfer of care request", formalDefinition="Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management." ) protected CodeableConcept reason; /** * The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary. */ - @Child(name = "description", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Child(name = "description", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="A textual description of the referral", formalDefinition="The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary." ) protected StringType description; /** * The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion. */ - @Child(name = "serviceRequested", type = {CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "serviceRequested", type = {CodeableConcept.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Actions requested as part of the referral", formalDefinition="The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion." ) protected List serviceRequested; /** * Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan. */ - @Child(name = "supportingInformation", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "supportingInformation", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Additonal information to support referral or transfer of care request", formalDefinition="Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan." ) protected List supportingInformation; /** @@ -345,14 +441,7 @@ public class ReferralRequest extends DomainResource { protected List supportingInformationTarget; - /** - * The period of time within which the services identified in the referral/transfer of care is specified or required to occur. - */ - @Child(name = "fulfillmentTime", type = {Period.class}, order=15, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Requested service(s) fulfillment time", formalDefinition="The period of time within which the services identified in the referral/transfer of care is specified or required to occur." ) - protected Period fulfillmentTime; - - private static final long serialVersionUID = 1948652599L; + private static final long serialVersionUID = -1030392098L; /** * Constructor @@ -364,54 +453,10 @@ public class ReferralRequest extends DomainResource { /** * Constructor */ - public ReferralRequest(Enumeration status) { + public ReferralRequest(Enumeration status, Enumeration category) { super(); this.status = status; - } - - /** - * @return {@link #status} (The workflow status of the referral or transfer of care request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value - */ - public Enumeration getStatusElement() { - if (this.status == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ReferralRequest.status"); - else if (Configuration.doAutoCreate()) - this.status = new Enumeration(new ReferralStatusEnumFactory()); // bb - return this.status; - } - - public boolean hasStatusElement() { - return this.status != null && !this.status.isEmpty(); - } - - public boolean hasStatus() { - return this.status != null && !this.status.isEmpty(); - } - - /** - * @param value {@link #status} (The workflow status of the referral or transfer of care request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value - */ - public ReferralRequest setStatusElement(Enumeration value) { - this.status = value; - return this; - } - - /** - * @return The workflow status of the referral or transfer of care request. - */ - public ReferralStatus getStatus() { - return this.status == null ? null : this.status.getValue(); - } - - /** - * @param value The workflow status of the referral or transfer of care request. - */ - public ReferralRequest setStatus(ReferralStatus value) { - if (this.status == null) - this.status = new Enumeration(new ReferralStatusEnumFactory()); - this.status.setValue(value); - return this; + this.category = category; } /** @@ -455,51 +500,165 @@ public class ReferralRequest extends DomainResource { } /** - * @return {@link #date} (Date/DateTime of creation for draft requests and date of activation for active requests.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + * @return {@link #basedOn} (Indicates any plans, proposals or orders that this request is intended to satisfy - in whole or in part.) */ - public DateTimeType getDateElement() { - if (this.date == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ReferralRequest.date"); - else if (Configuration.doAutoCreate()) - this.date = new DateTimeType(); // bb - return this.date; + public List getBasedOn() { + if (this.basedOn == null) + this.basedOn = new ArrayList(); + return this.basedOn; } - public boolean hasDateElement() { - return this.date != null && !this.date.isEmpty(); - } - - public boolean hasDate() { - return this.date != null && !this.date.isEmpty(); + public boolean hasBasedOn() { + if (this.basedOn == null) + return false; + for (Reference item : this.basedOn) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #date} (Date/DateTime of creation for draft requests and date of activation for active requests.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + * @return {@link #basedOn} (Indicates any plans, proposals or orders that this request is intended to satisfy - in whole or in part.) */ - public ReferralRequest setDateElement(DateTimeType value) { - this.date = value; + // syntactic sugar + public Reference addBasedOn() { //3 + Reference t = new Reference(); + if (this.basedOn == null) + this.basedOn = new ArrayList(); + this.basedOn.add(t); + return t; + } + + // syntactic sugar + public ReferralRequest addBasedOn(Reference t) { //3 + if (t == null) + return this; + if (this.basedOn == null) + this.basedOn = new ArrayList(); + this.basedOn.add(t); return this; } /** - * @return Date/DateTime of creation for draft requests and date of activation for active requests. + * @return {@link #basedOn} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Indicates any plans, proposals or orders that this request is intended to satisfy - in whole or in part.) */ - public Date getDate() { - return this.date == null ? null : this.date.getValue(); + public List getBasedOnTarget() { + if (this.basedOnTarget == null) + this.basedOnTarget = new ArrayList(); + return this.basedOnTarget; } /** - * @param value Date/DateTime of creation for draft requests and date of activation for active requests. + * @return {@link #parent} (The business identifier of the logical "grouping" request/order that this referral is a part of.) */ - public ReferralRequest setDate(Date value) { - if (value == null) - this.date = null; - else { - if (this.date == null) - this.date = new DateTimeType(); - this.date.setValue(value); - } + public Identifier getParent() { + if (this.parent == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.parent"); + else if (Configuration.doAutoCreate()) + this.parent = new Identifier(); // cc + return this.parent; + } + + public boolean hasParent() { + return this.parent != null && !this.parent.isEmpty(); + } + + /** + * @param value {@link #parent} (The business identifier of the logical "grouping" request/order that this referral is a part of.) + */ + public ReferralRequest setParent(Identifier value) { + this.parent = value; + return this; + } + + /** + * @return {@link #status} (The status of the authorization/intention reflected by the referral request record.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ReferralStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the authorization/intention reflected by the referral request record.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public ReferralRequest setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the authorization/intention reflected by the referral request record. + */ + public ReferralStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the authorization/intention reflected by the referral request record. + */ + public ReferralRequest setStatus(ReferralStatus value) { + if (this.status == null) + this.status = new Enumeration(new ReferralStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #category} (Distinguishes the "level" of authorization/demand implicit in this request.). This is the underlying object with id, value and extensions. The accessor "getCategory" gives direct access to the value + */ + public Enumeration getCategoryElement() { + if (this.category == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.category"); + else if (Configuration.doAutoCreate()) + this.category = new Enumeration(new ReferralCategoryEnumFactory()); // bb + return this.category; + } + + public boolean hasCategoryElement() { + return this.category != null && !this.category.isEmpty(); + } + + public boolean hasCategory() { + return this.category != null && !this.category.isEmpty(); + } + + /** + * @param value {@link #category} (Distinguishes the "level" of authorization/demand implicit in this request.). This is the underlying object with id, value and extensions. The accessor "getCategory" gives direct access to the value + */ + public ReferralRequest setCategoryElement(Enumeration value) { + this.category = value; + return this; + } + + /** + * @return Distinguishes the "level" of authorization/demand implicit in this request. + */ + public ReferralCategory getCategory() { + return this.category == null ? null : this.category.getValue(); + } + + /** + * @param value Distinguishes the "level" of authorization/demand implicit in this request. + */ + public ReferralRequest setCategory(ReferralCategory value) { + if (this.category == null) + this.category = new Enumeration(new ReferralCategoryEnumFactory()); + this.category.setValue(value); return this; } @@ -527,30 +686,6 @@ public class ReferralRequest extends DomainResource { return this; } - /** - * @return {@link #specialty} (Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.) - */ - public CodeableConcept getSpecialty() { - if (this.specialty == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ReferralRequest.specialty"); - else if (Configuration.doAutoCreate()) - this.specialty = new CodeableConcept(); // cc - return this.specialty; - } - - public boolean hasSpecialty() { - return this.specialty != null && !this.specialty.isEmpty(); - } - - /** - * @param value {@link #specialty} (Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.) - */ - public ReferralRequest setSpecialty(CodeableConcept value) { - this.specialty = value; - return this; - } - /** * @return {@link #priority} (An indication of the urgency of referral (or where applicable the type of transfer of care) request.) */ @@ -619,6 +754,118 @@ public class ReferralRequest extends DomainResource { return this; } + /** + * @return {@link #context} (The encounter at which the request for referral or transfer of care is initiated.) + */ + public Reference getContext() { + if (this.context == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.context"); + else if (Configuration.doAutoCreate()) + this.context = new Reference(); // cc + return this.context; + } + + public boolean hasContext() { + return this.context != null && !this.context.isEmpty(); + } + + /** + * @param value {@link #context} (The encounter at which the request for referral or transfer of care is initiated.) + */ + public ReferralRequest setContext(Reference value) { + this.context = value; + return this; + } + + /** + * @return {@link #context} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The encounter at which the request for referral or transfer of care is initiated.) + */ + public Resource getContextTarget() { + return this.contextTarget; + } + + /** + * @param value {@link #context} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The encounter at which the request for referral or transfer of care is initiated.) + */ + public ReferralRequest setContextTarget(Resource value) { + this.contextTarget = value; + return this; + } + + /** + * @return {@link #fulfillmentTime} (The period of time within which the services identified in the referral/transfer of care is specified or required to occur.) + */ + public Period getFulfillmentTime() { + if (this.fulfillmentTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.fulfillmentTime"); + else if (Configuration.doAutoCreate()) + this.fulfillmentTime = new Period(); // cc + return this.fulfillmentTime; + } + + public boolean hasFulfillmentTime() { + return this.fulfillmentTime != null && !this.fulfillmentTime.isEmpty(); + } + + /** + * @param value {@link #fulfillmentTime} (The period of time within which the services identified in the referral/transfer of care is specified or required to occur.) + */ + public ReferralRequest setFulfillmentTime(Period value) { + this.fulfillmentTime = value; + return this; + } + + /** + * @return {@link #authored} (Date/DateTime of creation for draft requests and date of activation for active requests.). This is the underlying object with id, value and extensions. The accessor "getAuthored" gives direct access to the value + */ + public DateTimeType getAuthoredElement() { + if (this.authored == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.authored"); + else if (Configuration.doAutoCreate()) + this.authored = new DateTimeType(); // bb + return this.authored; + } + + public boolean hasAuthoredElement() { + return this.authored != null && !this.authored.isEmpty(); + } + + public boolean hasAuthored() { + return this.authored != null && !this.authored.isEmpty(); + } + + /** + * @param value {@link #authored} (Date/DateTime of creation for draft requests and date of activation for active requests.). This is the underlying object with id, value and extensions. The accessor "getAuthored" gives direct access to the value + */ + public ReferralRequest setAuthoredElement(DateTimeType value) { + this.authored = value; + return this; + } + + /** + * @return Date/DateTime of creation for draft requests and date of activation for active requests. + */ + public Date getAuthored() { + return this.authored == null ? null : this.authored.getValue(); + } + + /** + * @param value Date/DateTime of creation for draft requests and date of activation for active requests. + */ + public ReferralRequest setAuthored(Date value) { + if (value == null) + this.authored = null; + else { + if (this.authored == null) + this.authored = new DateTimeType(); + this.authored.setValue(value); + } + return this; + } + /** * @return {@link #requester} (The healthcare provider or provider organization who/which initiated the referral/transfer of care request. Can also be Patient (a self referral).) */ @@ -658,6 +905,30 @@ public class ReferralRequest extends DomainResource { return this; } + /** + * @return {@link #specialty} (Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.) + */ + public CodeableConcept getSpecialty() { + if (this.specialty == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ReferralRequest.specialty"); + else if (Configuration.doAutoCreate()) + this.specialty = new CodeableConcept(); // cc + return this.specialty; + } + + public boolean hasSpecialty() { + return this.specialty != null && !this.specialty.isEmpty(); + } + + /** + * @param value {@link #specialty} (Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.) + */ + public ReferralRequest setSpecialty(CodeableConcept value) { + this.specialty = value; + return this; + } + /** * @return {@link #recipient} (The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.) */ @@ -707,99 +978,6 @@ public class ReferralRequest extends DomainResource { return this.recipientTarget; } - /** - * @return {@link #encounter} (The encounter at which the request for referral or transfer of care is initiated.) - */ - public Reference getEncounter() { - if (this.encounter == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ReferralRequest.encounter"); - else if (Configuration.doAutoCreate()) - this.encounter = new Reference(); // cc - return this.encounter; - } - - public boolean hasEncounter() { - return this.encounter != null && !this.encounter.isEmpty(); - } - - /** - * @param value {@link #encounter} (The encounter at which the request for referral or transfer of care is initiated.) - */ - public ReferralRequest setEncounter(Reference value) { - this.encounter = value; - return this; - } - - /** - * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The encounter at which the request for referral or transfer of care is initiated.) - */ - public Encounter getEncounterTarget() { - if (this.encounterTarget == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ReferralRequest.encounter"); - else if (Configuration.doAutoCreate()) - this.encounterTarget = new Encounter(); // aa - return this.encounterTarget; - } - - /** - * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The encounter at which the request for referral or transfer of care is initiated.) - */ - public ReferralRequest setEncounterTarget(Encounter value) { - this.encounterTarget = value; - return this; - } - - /** - * @return {@link #dateSent} (Date/DateTime the request for referral or transfer of care is sent by the author.). This is the underlying object with id, value and extensions. The accessor "getDateSent" gives direct access to the value - */ - public DateTimeType getDateSentElement() { - if (this.dateSent == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ReferralRequest.dateSent"); - else if (Configuration.doAutoCreate()) - this.dateSent = new DateTimeType(); // bb - return this.dateSent; - } - - public boolean hasDateSentElement() { - return this.dateSent != null && !this.dateSent.isEmpty(); - } - - public boolean hasDateSent() { - return this.dateSent != null && !this.dateSent.isEmpty(); - } - - /** - * @param value {@link #dateSent} (Date/DateTime the request for referral or transfer of care is sent by the author.). This is the underlying object with id, value and extensions. The accessor "getDateSent" gives direct access to the value - */ - public ReferralRequest setDateSentElement(DateTimeType value) { - this.dateSent = value; - return this; - } - - /** - * @return Date/DateTime the request for referral or transfer of care is sent by the author. - */ - public Date getDateSent() { - return this.dateSent == null ? null : this.dateSent.getValue(); - } - - /** - * @param value Date/DateTime the request for referral or transfer of care is sent by the author. - */ - public ReferralRequest setDateSent(Date value) { - if (value == null) - this.dateSent = null; - else { - if (this.dateSent == null) - this.dateSent = new DateTimeType(); - this.dateSent.setValue(value); - } - return this; - } - /** * @return {@link #reason} (Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management.) */ @@ -962,74 +1140,58 @@ public class ReferralRequest extends DomainResource { return this.supportingInformationTarget; } - /** - * @return {@link #fulfillmentTime} (The period of time within which the services identified in the referral/transfer of care is specified or required to occur.) - */ - public Period getFulfillmentTime() { - if (this.fulfillmentTime == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ReferralRequest.fulfillmentTime"); - else if (Configuration.doAutoCreate()) - this.fulfillmentTime = new Period(); // cc - return this.fulfillmentTime; - } - - public boolean hasFulfillmentTime() { - return this.fulfillmentTime != null && !this.fulfillmentTime.isEmpty(); - } - - /** - * @param value {@link #fulfillmentTime} (The period of time within which the services identified in the referral/transfer of care is specified or required to occur.) - */ - public ReferralRequest setFulfillmentTime(Period value) { - this.fulfillmentTime = value; - return this; - } - protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("status", "code", "The workflow status of the referral or transfer of care request.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("identifier", "Identifier", "Business identifier that uniquely identifies the referral/care transfer request instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("date", "dateTime", "Date/DateTime of creation for draft requests and date of activation for active requests.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("basedOn", "Reference(ReferralRequest|CarePlan|DiagnosticOrder|ProcedureRequest)", "Indicates any plans, proposals or orders that this request is intended to satisfy - in whole or in part.", 0, java.lang.Integer.MAX_VALUE, basedOn)); + childrenList.add(new Property("parent", "Identifier", "The business identifier of the logical \"grouping\" request/order that this referral is a part of.", 0, java.lang.Integer.MAX_VALUE, parent)); + childrenList.add(new Property("status", "code", "The status of the authorization/intention reflected by the referral request record.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("category", "code", "Distinguishes the \"level\" of authorization/demand implicit in this request.", 0, java.lang.Integer.MAX_VALUE, category)); childrenList.add(new Property("type", "CodeableConcept", "An indication of the type of referral (or where applicable the type of transfer of care) request.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("specialty", "CodeableConcept", "Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.", 0, java.lang.Integer.MAX_VALUE, specialty)); childrenList.add(new Property("priority", "CodeableConcept", "An indication of the urgency of referral (or where applicable the type of transfer of care) request.", 0, java.lang.Integer.MAX_VALUE, priority)); childrenList.add(new Property("patient", "Reference(Patient)", "The patient who is the subject of a referral or transfer of care request.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("context", "Reference(Encounter|EpisodeOfCare)", "The encounter at which the request for referral or transfer of care is initiated.", 0, java.lang.Integer.MAX_VALUE, context)); + childrenList.add(new Property("fulfillmentTime", "Period", "The period of time within which the services identified in the referral/transfer of care is specified or required to occur.", 0, java.lang.Integer.MAX_VALUE, fulfillmentTime)); + childrenList.add(new Property("authored", "dateTime", "Date/DateTime of creation for draft requests and date of activation for active requests.", 0, java.lang.Integer.MAX_VALUE, authored)); childrenList.add(new Property("requester", "Reference(Practitioner|Organization|Patient)", "The healthcare provider or provider organization who/which initiated the referral/transfer of care request. Can also be Patient (a self referral).", 0, java.lang.Integer.MAX_VALUE, requester)); + childrenList.add(new Property("specialty", "CodeableConcept", "Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.", 0, java.lang.Integer.MAX_VALUE, specialty)); childrenList.add(new Property("recipient", "Reference(Practitioner|Organization)", "The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.", 0, java.lang.Integer.MAX_VALUE, recipient)); - childrenList.add(new Property("encounter", "Reference(Encounter)", "The encounter at which the request for referral or transfer of care is initiated.", 0, java.lang.Integer.MAX_VALUE, encounter)); - childrenList.add(new Property("dateSent", "dateTime", "Date/DateTime the request for referral or transfer of care is sent by the author.", 0, java.lang.Integer.MAX_VALUE, dateSent)); childrenList.add(new Property("reason", "CodeableConcept", "Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management.", 0, java.lang.Integer.MAX_VALUE, reason)); childrenList.add(new Property("description", "string", "The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.", 0, java.lang.Integer.MAX_VALUE, description)); childrenList.add(new Property("serviceRequested", "CodeableConcept", "The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion.", 0, java.lang.Integer.MAX_VALUE, serviceRequested)); childrenList.add(new Property("supportingInformation", "Reference(Any)", "Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); - childrenList.add(new Property("fulfillmentTime", "Period", "The period of time within which the services identified in the referral/transfer of care is specified or required to occur.", 0, java.lang.Integer.MAX_VALUE, fulfillmentTime)); } @Override public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("status")) - this.status = new ReferralStatusEnumFactory().fromType(value); // Enumeration - else if (name.equals("identifier")) + if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); - else if (name.equals("date")) - this.date = castToDateTime(value); // DateTimeType + else if (name.equals("basedOn")) + this.getBasedOn().add(castToReference(value)); + else if (name.equals("parent")) + this.parent = castToIdentifier(value); // Identifier + else if (name.equals("status")) + this.status = new ReferralStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("category")) + this.category = new ReferralCategoryEnumFactory().fromType(value); // Enumeration else if (name.equals("type")) this.type = castToCodeableConcept(value); // CodeableConcept - else if (name.equals("specialty")) - this.specialty = castToCodeableConcept(value); // CodeableConcept else if (name.equals("priority")) this.priority = castToCodeableConcept(value); // CodeableConcept else if (name.equals("patient")) this.patient = castToReference(value); // Reference + else if (name.equals("context")) + this.context = castToReference(value); // Reference + else if (name.equals("fulfillmentTime")) + this.fulfillmentTime = castToPeriod(value); // Period + else if (name.equals("authored")) + this.authored = castToDateTime(value); // DateTimeType else if (name.equals("requester")) this.requester = castToReference(value); // Reference + else if (name.equals("specialty")) + this.specialty = castToCodeableConcept(value); // CodeableConcept else if (name.equals("recipient")) this.getRecipient().add(castToReference(value)); - else if (name.equals("encounter")) - this.encounter = castToReference(value); // Reference - else if (name.equals("dateSent")) - this.dateSent = castToDateTime(value); // DateTimeType else if (name.equals("reason")) this.reason = castToCodeableConcept(value); // CodeableConcept else if (name.equals("description")) @@ -1038,31 +1200,32 @@ public class ReferralRequest extends DomainResource { this.getServiceRequested().add(castToCodeableConcept(value)); else if (name.equals("supportingInformation")) this.getSupportingInformation().add(castToReference(value)); - else if (name.equals("fulfillmentTime")) - this.fulfillmentTime = castToPeriod(value); // Period else super.setProperty(name, value); } @Override public Base addChild(String name) throws FHIRException { - if (name.equals("status")) { - throw new FHIRException("Cannot call addChild on a primitive type ReferralRequest.status"); - } - else if (name.equals("identifier")) { + if (name.equals("identifier")) { return addIdentifier(); } - else if (name.equals("date")) { - throw new FHIRException("Cannot call addChild on a primitive type ReferralRequest.date"); + else if (name.equals("basedOn")) { + return addBasedOn(); + } + else if (name.equals("parent")) { + this.parent = new Identifier(); + return this.parent; + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type ReferralRequest.status"); + } + else if (name.equals("category")) { + throw new FHIRException("Cannot call addChild on a primitive type ReferralRequest.category"); } else if (name.equals("type")) { this.type = new CodeableConcept(); return this.type; } - else if (name.equals("specialty")) { - this.specialty = new CodeableConcept(); - return this.specialty; - } else if (name.equals("priority")) { this.priority = new CodeableConcept(); return this.priority; @@ -1071,20 +1234,28 @@ public class ReferralRequest extends DomainResource { this.patient = new Reference(); return this.patient; } + else if (name.equals("context")) { + this.context = new Reference(); + return this.context; + } + else if (name.equals("fulfillmentTime")) { + this.fulfillmentTime = new Period(); + return this.fulfillmentTime; + } + else if (name.equals("authored")) { + throw new FHIRException("Cannot call addChild on a primitive type ReferralRequest.authored"); + } else if (name.equals("requester")) { this.requester = new Reference(); return this.requester; } + else if (name.equals("specialty")) { + this.specialty = new CodeableConcept(); + return this.specialty; + } else if (name.equals("recipient")) { return addRecipient(); } - else if (name.equals("encounter")) { - this.encounter = new Reference(); - return this.encounter; - } - else if (name.equals("dateSent")) { - throw new FHIRException("Cannot call addChild on a primitive type ReferralRequest.dateSent"); - } else if (name.equals("reason")) { this.reason = new CodeableConcept(); return this.reason; @@ -1098,10 +1269,6 @@ public class ReferralRequest extends DomainResource { else if (name.equals("supportingInformation")) { return addSupportingInformation(); } - else if (name.equals("fulfillmentTime")) { - this.fulfillmentTime = new Period(); - return this.fulfillmentTime; - } else return super.addChild(name); } @@ -1114,25 +1281,32 @@ public class ReferralRequest extends DomainResource { public ReferralRequest copy() { ReferralRequest dst = new ReferralRequest(); copyValues(dst); - dst.status = status == null ? null : status.copy(); if (identifier != null) { dst.identifier = new ArrayList(); for (Identifier i : identifier) dst.identifier.add(i.copy()); }; - dst.date = date == null ? null : date.copy(); + if (basedOn != null) { + dst.basedOn = new ArrayList(); + for (Reference i : basedOn) + dst.basedOn.add(i.copy()); + }; + dst.parent = parent == null ? null : parent.copy(); + dst.status = status == null ? null : status.copy(); + dst.category = category == null ? null : category.copy(); dst.type = type == null ? null : type.copy(); - dst.specialty = specialty == null ? null : specialty.copy(); dst.priority = priority == null ? null : priority.copy(); dst.patient = patient == null ? null : patient.copy(); + dst.context = context == null ? null : context.copy(); + dst.fulfillmentTime = fulfillmentTime == null ? null : fulfillmentTime.copy(); + dst.authored = authored == null ? null : authored.copy(); dst.requester = requester == null ? null : requester.copy(); + dst.specialty = specialty == null ? null : specialty.copy(); if (recipient != null) { dst.recipient = new ArrayList(); for (Reference i : recipient) dst.recipient.add(i.copy()); }; - dst.encounter = encounter == null ? null : encounter.copy(); - dst.dateSent = dateSent == null ? null : dateSent.copy(); dst.reason = reason == null ? null : reason.copy(); dst.description = description == null ? null : description.copy(); if (serviceRequested != null) { @@ -1145,7 +1319,6 @@ public class ReferralRequest extends DomainResource { for (Reference i : supportingInformation) dst.supportingInformation.add(i.copy()); }; - dst.fulfillmentTime = fulfillmentTime == null ? null : fulfillmentTime.copy(); return dst; } @@ -1160,13 +1333,13 @@ public class ReferralRequest extends DomainResource { if (!(other instanceof ReferralRequest)) return false; ReferralRequest o = (ReferralRequest) other; - return compareDeep(status, o.status, true) && compareDeep(identifier, o.identifier, true) && compareDeep(date, o.date, true) - && compareDeep(type, o.type, true) && compareDeep(specialty, o.specialty, true) && compareDeep(priority, o.priority, true) - && compareDeep(patient, o.patient, true) && compareDeep(requester, o.requester, true) && compareDeep(recipient, o.recipient, true) - && compareDeep(encounter, o.encounter, true) && compareDeep(dateSent, o.dateSent, true) && compareDeep(reason, o.reason, true) - && compareDeep(description, o.description, true) && compareDeep(serviceRequested, o.serviceRequested, true) - && compareDeep(supportingInformation, o.supportingInformation, true) && compareDeep(fulfillmentTime, o.fulfillmentTime, true) - ; + return compareDeep(identifier, o.identifier, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(parent, o.parent, true) + && compareDeep(status, o.status, true) && compareDeep(category, o.category, true) && compareDeep(type, o.type, true) + && compareDeep(priority, o.priority, true) && compareDeep(patient, o.patient, true) && compareDeep(context, o.context, true) + && compareDeep(fulfillmentTime, o.fulfillmentTime, true) && compareDeep(authored, o.authored, true) + && compareDeep(requester, o.requester, true) && compareDeep(specialty, o.specialty, true) && compareDeep(recipient, o.recipient, true) + && compareDeep(reason, o.reason, true) && compareDeep(description, o.description, true) && compareDeep(serviceRequested, o.serviceRequested, true) + && compareDeep(supportingInformation, o.supportingInformation, true); } @Override @@ -1176,18 +1349,14 @@ public class ReferralRequest extends DomainResource { if (!(other instanceof ReferralRequest)) return false; ReferralRequest o = (ReferralRequest) other; - return compareValues(status, o.status, true) && compareValues(date, o.date, true) && compareValues(dateSent, o.dateSent, true) + return compareValues(status, o.status, true) && compareValues(category, o.category, true) && compareValues(authored, o.authored, true) && compareValues(description, o.description, true); } public boolean isEmpty() { - return super.isEmpty() && (status == null || status.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (date == null || date.isEmpty()) && (type == null || type.isEmpty()) && (specialty == null || specialty.isEmpty()) - && (priority == null || priority.isEmpty()) && (patient == null || patient.isEmpty()) && (requester == null || requester.isEmpty()) - && (recipient == null || recipient.isEmpty()) && (encounter == null || encounter.isEmpty()) - && (dateSent == null || dateSent.isEmpty()) && (reason == null || reason.isEmpty()) && (description == null || description.isEmpty()) - && (serviceRequested == null || serviceRequested.isEmpty()) && (supportingInformation == null || supportingInformation.isEmpty()) - && (fulfillmentTime == null || fulfillmentTime.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, basedOn, parent, status + , category, type, priority, patient, context, fulfillmentTime, authored, requester, specialty + , recipient, reason, description, serviceRequested, supportingInformation); } @Override @@ -1200,17 +1369,17 @@ public class ReferralRequest extends DomainResource { *

* Description: Creation or activation date
* Type: date
- * Path: ReferralRequest.date
+ * Path: ReferralRequest.authored
*

*/ - @SearchParamDefinition(name="date", path="ReferralRequest.date", description="Creation or activation date", type="date" ) + @SearchParamDefinition(name="date", path="ReferralRequest.authored", description="Creation or activation date", type="date" ) public static final String SP_DATE = "date"; /** * Fluent Client search parameter constant for date *

* Description: Creation or activation date
* Type: date
- * Path: ReferralRequest.date
+ * Path: ReferralRequest.authored
*

*/ public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); @@ -1223,7 +1392,7 @@ public class ReferralRequest extends DomainResource { * Path: ReferralRequest.requester
*

*/ - @SearchParamDefinition(name="requester", path="ReferralRequest.requester", description="Requester of referral / transfer of care", type="reference" ) + @SearchParamDefinition(name="requester", path="ReferralRequest.requester", description="Requester of referral / transfer of care", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_REQUESTER = "requester"; /** * Fluent Client search parameter constant for requester @@ -1241,6 +1410,26 @@ public class ReferralRequest extends DomainResource { */ public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTER = new ca.uhn.fhir.model.api.Include("ReferralRequest:requester").toLocked(); + /** + * Search parameter: parent + *

+ * Description: Part of common request
+ * Type: token
+ * Path: ReferralRequest.parent
+ *

+ */ + @SearchParamDefinition(name="parent", path="ReferralRequest.parent", description="Part of common request", type="token" ) + public static final String SP_PARENT = "parent"; + /** + * Fluent Client search parameter constant for parent + *

+ * Description: Part of common request
+ * Type: token
+ * Path: ReferralRequest.parent
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam PARENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PARENT); + /** * Search parameter: specialty *

@@ -1269,7 +1458,7 @@ public class ReferralRequest extends DomainResource { * Path: ReferralRequest.patient
*

*/ - @SearchParamDefinition(name="patient", path="ReferralRequest.patient", description="Who the referral is about", type="reference" ) + @SearchParamDefinition(name="patient", path="ReferralRequest.patient", description="Who the referral is about", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient @@ -1295,7 +1484,7 @@ public class ReferralRequest extends DomainResource { * Path: ReferralRequest.recipient
*

*/ - @SearchParamDefinition(name="recipient", path="ReferralRequest.recipient", description="The person that the referral was sent to", type="reference" ) + @SearchParamDefinition(name="recipient", path="ReferralRequest.recipient", description="The person that the referral was sent to", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_RECIPIENT = "recipient"; /** * Fluent Client search parameter constant for recipient @@ -1313,6 +1502,32 @@ public class ReferralRequest extends DomainResource { */ public static final ca.uhn.fhir.model.api.Include INCLUDE_RECIPIENT = new ca.uhn.fhir.model.api.Include("ReferralRequest:recipient").toLocked(); + /** + * Search parameter: context + *

+ * Description: Part of encounter or episode of care
+ * Type: reference
+ * Path: ReferralRequest.context
+ *

+ */ + @SearchParamDefinition(name="context", path="ReferralRequest.context", description="Part of encounter or episode of care", type="reference" ) + public static final String SP_CONTEXT = "context"; + /** + * Fluent Client search parameter constant for context + *

+ * Description: Part of encounter or episode of care
+ * Type: reference
+ * Path: ReferralRequest.context
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONTEXT); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "ReferralRequest:context". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_CONTEXT = new ca.uhn.fhir.model.api.Include("ReferralRequest:context").toLocked(); + /** * Search parameter: type *

@@ -1353,6 +1568,52 @@ public class ReferralRequest extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam PRIORITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PRIORITY); + /** + * Search parameter: category + *

+ * Description: Proposal, plan or request
+ * Type: token
+ * Path: ReferralRequest.category
+ *

+ */ + @SearchParamDefinition(name="category", path="ReferralRequest.category", description="Proposal, plan or request", type="token" ) + public static final String SP_CATEGORY = "category"; + /** + * Fluent Client search parameter constant for category + *

+ * Description: Proposal, plan or request
+ * Type: token
+ * Path: ReferralRequest.category
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY); + + /** + * Search parameter: basedon + *

+ * Description: Request being fulfilled
+ * Type: reference
+ * Path: ReferralRequest.basedOn
+ *

+ */ + @SearchParamDefinition(name="basedon", path="ReferralRequest.basedOn", description="Request being fulfilled", type="reference" ) + public static final String SP_BASEDON = "basedon"; + /** + * Fluent Client search parameter constant for basedon + *

+ * Description: Request being fulfilled
+ * Type: reference
+ * Path: ReferralRequest.basedOn
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASEDON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASEDON); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "ReferralRequest:basedon". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_BASEDON = new ca.uhn.fhir.model.api.Include("ReferralRequest:basedon").toLocked(); + /** * Search parameter: status *

diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/RelatedPerson.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/RelatedPerson.java index 4fcb334516b..604580ef965 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/RelatedPerson.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/RelatedPerson.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process. */ @@ -661,10 +659,8 @@ public class RelatedPerson extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (patient == null || patient.isEmpty()) - && (relationship == null || relationship.isEmpty()) && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) - && (gender == null || gender.isEmpty()) && (birthDate == null || birthDate.isEmpty()) && (address == null || address.isEmpty()) - && (photo == null || photo.isEmpty()) && (period == null || period.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, patient, relationship + , name, telecom, gender, birthDate, address, photo, period); } @Override @@ -860,7 +856,7 @@ public class RelatedPerson extends DomainResource { * Path: RelatedPerson.patient
*

*/ - @SearchParamDefinition(name="patient", path="RelatedPerson.patient", description="The patient this person is related to", type="reference" ) + @SearchParamDefinition(name="patient", path="RelatedPerson.patient", description="The patient this person is related to", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Resource.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Resource.java index 98c45691903..a87a15a5588 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Resource.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Resource.java @@ -29,23 +29,23 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Mon, Dec 21, 2015 20:18-0500 for FHIR v1.2.0 -import java.util.List; +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 + +import java.util.*; -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.instance.model.api.IAnyResource; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * This is the base resource type for everything. */ public abstract class Resource extends BaseResource implements IAnyResource { - @Override - public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() { - return ca.uhn.fhir.context.FhirVersionEnum.DSTU3; - } /** * The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes. @@ -332,8 +332,8 @@ public abstract class Resource extends BaseResource implements IAnyResource { } public boolean isEmpty() { - return super.isEmpty() && (id == null || id.isEmpty()) && (meta == null || meta.isEmpty()) && (implicitRules == null || implicitRules.isEmpty()) - && (language == null || language.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( id, meta, implicitRules, language + ); } public abstract ResourceType getResourceType(); diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ResourceFactory.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ResourceFactory.java index 6c00773d03e..675588c634b 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ResourceFactory.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ResourceFactory.java @@ -1,5 +1,36 @@ package org.hl7.fhir.dstu3.model; +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 + import org.hl7.fhir.dstu3.exceptions.FHIRException; public class ResourceFactory extends Factory { @@ -29,6 +60,10 @@ public class ResourceFactory extends Factory { return new Parameters(); if ("Conformance".equals(name)) return new Conformance(); + if ("MeasureReport".equals(name)) + return new MeasureReport(); + if ("PractitionerRole".equals(name)) + return new PractitionerRole(); if ("RelatedPerson".equals(name)) return new RelatedPerson(); if ("SupplyRequest".equals(name)) @@ -53,6 +88,8 @@ public class ResourceFactory extends Factory { return new PaymentNotice(); if ("Organization".equals(name)) return new Organization(); + if ("CareTeam".equals(name)) + return new CareTeam(); if ("ImplementationGuide".equals(name)) return new ImplementationGuide(); if ("ImagingStudy".equals(name)) @@ -85,6 +122,8 @@ public class ResourceFactory extends Factory { return new BodySite(); if ("Provenance".equals(name)) return new Provenance(); + if ("Task".equals(name)) + return new Task(); if ("Questionnaire".equals(name)) return new Questionnaire(); if ("ExplanationOfBenefit".equals(name)) @@ -121,8 +160,6 @@ public class ResourceFactory extends Factory { return new VisionPrescription(); if ("Media".equals(name)) return new Media(); - if ("ModuleMetadata".equals(name)) - return new ModuleMetadata(); if ("ProcedureRequest".equals(name)) return new ProcedureRequest(); if ("EligibilityResponse".equals(name)) @@ -139,6 +176,8 @@ public class ResourceFactory extends Factory { return new CodeSystem(); if ("AppointmentResponse".equals(name)) return new AppointmentResponse(); + if ("StructureMap".equals(name)) + return new StructureMap(); if ("GuidanceResponse".equals(name)) return new GuidanceResponse(); if ("Observation".equals(name)) @@ -179,6 +218,8 @@ public class ResourceFactory extends Factory { return new NutritionOrder(); if ("AuditEvent".equals(name)) return new AuditEvent(); + if ("ImagingExcerpt".equals(name)) + return new ImagingExcerpt(); if ("MedicationOrder".equals(name)) return new MedicationOrder(); if ("DecisionSupportRule".equals(name)) @@ -193,6 +234,8 @@ public class ResourceFactory extends Factory { return new DetectedIssue(); if ("Bundle".equals(name)) return new Bundle(); + if ("CompartmentDefinition".equals(name)) + return new CompartmentDefinition(); if ("DiagnosticOrder".equals(name)) return new DiagnosticOrder(); if ("Patient".equals(name)) @@ -232,6 +275,10 @@ public class ResourceFactory extends Factory { return new Attachment(); if ("Count".equals(name)) return new Count(); + if ("DataRequirement".equals(name)) + return new DataRequirement(); + if ("ActionDefinition".equals(name)) + return new ActionDefinition(); if ("Money".equals(name)) return new Money(); if ("HumanName".equals(name)) @@ -256,8 +303,12 @@ public class ResourceFactory extends Factory { return new Age(); if ("Reference".equals(name)) return new Reference(); + if ("TriggerDefinition".equals(name)) + return new TriggerDefinition(); if ("SimpleQuantity".equals(name)) return new SimpleQuantity(); + if ("ModuleMetadata".equals(name)) + return new ModuleMetadata(); if ("Quantity".equals(name)) return new Quantity(); if ("Period".equals(name)) @@ -276,6 +327,8 @@ public class ResourceFactory extends Factory { return new Timing(); if ("CodeableConcept".equals(name)) return new CodeableConcept(); + if ("ParameterDefinition".equals(name)) + return new ParameterDefinition(); else throw new FHIRException("Unknown Type Name '"+name+"'"); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ResourceType.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ResourceType.java index 2a3938ee393..fe2c1207370 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ResourceType.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ResourceType.java @@ -2,7 +2,7 @@ package org.hl7.fhir.dstu3.model; import org.hl7.fhir.dstu3.exceptions.FHIRException; -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 public enum ResourceType { Account, @@ -15,12 +15,14 @@ public enum ResourceType { BodySite, Bundle, CarePlan, + CareTeam, Claim, ClaimResponse, ClinicalImpression, CodeSystem, Communication, CommunicationRequest, + CompartmentDefinition, Composition, ConceptMap, Condition, @@ -54,6 +56,7 @@ public enum ResourceType { Group, GuidanceResponse, HealthcareService, + ImagingExcerpt, ImagingObjectSelection, ImagingStudy, Immunization, @@ -64,6 +67,7 @@ public enum ResourceType { List, Location, Measure, + MeasureReport, Media, Medication, MedicationAdministration, @@ -72,7 +76,6 @@ public enum ResourceType { MedicationStatement, MessageHeader, ModuleDefinition, - ModuleMetadata, NamingSystem, NutritionOrder, Observation, @@ -88,6 +91,7 @@ public enum ResourceType { PaymentReconciliation, Person, Practitioner, + PractitionerRole, Procedure, ProcedureRequest, ProcessRequest, @@ -105,10 +109,12 @@ public enum ResourceType { Slot, Specimen, StructureDefinition, + StructureMap, Subscription, Substance, SupplyDelivery, SupplyRequest, + Task, TestScript, ValueSet, VisionPrescription; @@ -136,6 +142,8 @@ public enum ResourceType { return "bundle"; case CarePlan: return "careplan"; + case CareTeam: + return "careteam"; case Claim: return "claim"; case ClaimResponse: @@ -148,6 +156,8 @@ public enum ResourceType { return "communication"; case CommunicationRequest: return "communicationrequest"; + case CompartmentDefinition: + return "compartmentdefinition"; case Composition: return "composition"; case ConceptMap: @@ -214,6 +224,8 @@ public enum ResourceType { return "guidanceresponse"; case HealthcareService: return "healthcareservice"; + case ImagingExcerpt: + return "imagingexcerpt"; case ImagingObjectSelection: return "imagingobjectselection"; case ImagingStudy: @@ -234,6 +246,8 @@ public enum ResourceType { return "location"; case Measure: return "measure"; + case MeasureReport: + return "measurereport"; case Media: return "media"; case Medication: @@ -250,8 +264,6 @@ public enum ResourceType { return "messageheader"; case ModuleDefinition: return "moduledefinition"; - case ModuleMetadata: - return "modulemetadata"; case NamingSystem: return "namingsystem"; case NutritionOrder: @@ -282,6 +294,8 @@ public enum ResourceType { return "person"; case Practitioner: return "practitioner"; + case PractitionerRole: + return "practitionerrole"; case Procedure: return "procedure"; case ProcedureRequest: @@ -316,6 +330,8 @@ public enum ResourceType { return "specimen"; case StructureDefinition: return "structuredefinition"; + case StructureMap: + return "structuremap"; case Subscription: return "subscription"; case Substance: @@ -324,6 +340,8 @@ public enum ResourceType { return "supplydelivery"; case SupplyRequest: return "supplyrequest"; + case Task: + return "task"; case TestScript: return "testscript"; case ValueSet: @@ -356,6 +374,8 @@ public enum ResourceType { return Bundle; if ("CarePlan".equals(code)) return CarePlan; + if ("CareTeam".equals(code)) + return CareTeam; if ("Claim".equals(code)) return Claim; if ("ClaimResponse".equals(code)) @@ -368,6 +388,8 @@ public enum ResourceType { return Communication; if ("CommunicationRequest".equals(code)) return CommunicationRequest; + if ("CompartmentDefinition".equals(code)) + return CompartmentDefinition; if ("Composition".equals(code)) return Composition; if ("ConceptMap".equals(code)) @@ -434,6 +456,8 @@ public enum ResourceType { return GuidanceResponse; if ("HealthcareService".equals(code)) return HealthcareService; + if ("ImagingExcerpt".equals(code)) + return ImagingExcerpt; if ("ImagingObjectSelection".equals(code)) return ImagingObjectSelection; if ("ImagingStudy".equals(code)) @@ -454,6 +478,8 @@ public enum ResourceType { return Location; if ("Measure".equals(code)) return Measure; + if ("MeasureReport".equals(code)) + return MeasureReport; if ("Media".equals(code)) return Media; if ("Medication".equals(code)) @@ -470,8 +496,6 @@ public enum ResourceType { return MessageHeader; if ("ModuleDefinition".equals(code)) return ModuleDefinition; - if ("ModuleMetadata".equals(code)) - return ModuleMetadata; if ("NamingSystem".equals(code)) return NamingSystem; if ("NutritionOrder".equals(code)) @@ -502,6 +526,8 @@ public enum ResourceType { return Person; if ("Practitioner".equals(code)) return Practitioner; + if ("PractitionerRole".equals(code)) + return PractitionerRole; if ("Procedure".equals(code)) return Procedure; if ("ProcedureRequest".equals(code)) @@ -536,6 +562,8 @@ public enum ResourceType { return Specimen; if ("StructureDefinition".equals(code)) return StructureDefinition; + if ("StructureMap".equals(code)) + return StructureMap; if ("Subscription".equals(code)) return Subscription; if ("Substance".equals(code)) @@ -544,6 +572,8 @@ public enum ResourceType { return SupplyDelivery; if ("SupplyRequest".equals(code)) return SupplyRequest; + if ("Task".equals(code)) + return Task; if ("TestScript".equals(code)) return TestScript; if ("ValueSet".equals(code)) diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/RiskAssessment.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/RiskAssessment.java index 150e9e8cc18..f4ba0d64083 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/RiskAssessment.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/RiskAssessment.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -40,9 +40,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome. */ @@ -441,9 +440,8 @@ public class RiskAssessment extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (outcome == null || outcome.isEmpty()) && (probability == null || probability.isEmpty()) - && (relativeRisk == null || relativeRisk.isEmpty()) && (when == null || when.isEmpty()) && (rationale == null || rationale.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( outcome, probability, relativeRisk + , when, rationale); } public String fhirType() { @@ -1097,11 +1095,8 @@ public class RiskAssessment extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (subject == null || subject.isEmpty()) && (date == null || date.isEmpty()) - && (condition == null || condition.isEmpty()) && (encounter == null || encounter.isEmpty()) - && (performer == null || performer.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (method == null || method.isEmpty()) && (basis == null || basis.isEmpty()) && (prediction == null || prediction.isEmpty()) - && (mitigation == null || mitigation.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( subject, date, condition, encounter + , performer, identifier, method, basis, prediction, mitigation); } @Override @@ -1183,7 +1178,7 @@ public class RiskAssessment extends DomainResource { * Path: RiskAssessment.performer
*

*/ - @SearchParamDefinition(name="performer", path="RiskAssessment.performer", description="Who did assessment?", type="reference" ) + @SearchParamDefinition(name="performer", path="RiskAssessment.performer", description="Who did assessment?", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_PERFORMER = "performer"; /** * Fluent Client search parameter constant for performer @@ -1229,7 +1224,7 @@ public class RiskAssessment extends DomainResource { * Path: RiskAssessment.subject
*

*/ - @SearchParamDefinition(name="subject", path="RiskAssessment.subject", description="Who/what does assessment apply to?", type="reference" ) + @SearchParamDefinition(name="subject", path="RiskAssessment.subject", description="Who/what does assessment apply to?", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SampledData.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SampledData.java index 10def3784a6..7c89fc336bd 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SampledData.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SampledData.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data. */ @@ -93,7 +92,7 @@ public class SampledData extends Type implements ICompositeType { /** * A series of data points which are decimal values separated by a single space (character u20). The special values "E" (error), "L" (below detection limit) and "U" (above detection limit) can also be used in place of a decimal value. */ - @Child(name = "data", type = {StringType.class}, order=6, min=1, max=1, modifier=false, summary=true) + @Child(name = "data", type = {StringType.class}, order=6, min=1, max=1, modifier=false, summary=false) @Description(shortDefinition="Decimal values with spaces, or \"E\" | \"U\" | \"L\"", formalDefinition="A series of data points which are decimal values separated by a single space (character u20). The special values \"E\" (error), \"L\" (below detection limit) and \"U\" (above detection limit) can also be used in place of a decimal value." ) protected StringType data; @@ -601,9 +600,8 @@ public class SampledData extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (origin == null || origin.isEmpty()) && (period == null || period.isEmpty()) - && (factor == null || factor.isEmpty()) && (lowerLimit == null || lowerLimit.isEmpty()) && (upperLimit == null || upperLimit.isEmpty()) - && (dimensions == null || dimensions.isEmpty()) && (data == null || data.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( origin, period, factor, lowerLimit + , upperLimit, dimensions, data); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Schedule.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Schedule.java index 864a694b51a..dd2fd44b01c 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Schedule.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Schedule.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A container for slot(s) of time that may be available for booking appointments. */ @@ -56,16 +55,30 @@ public class Schedule extends DomainResource { protected List identifier; /** - * The schedule type can be used for the categorization of healthcare services or other appointment types. + * A broad categorisation of the service that is to be performed during this appointment. */ - @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="The schedule type can be used for the categorization of healthcare services or other appointment types", formalDefinition="The schedule type can be used for the categorization of healthcare services or other appointment types." ) - protected List type; + @Child(name = "serviceCategory", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="A broad categorisation of the service that is to be performed during this appointment", formalDefinition="A broad categorisation of the service that is to be performed during this appointment." ) + protected CodeableConcept serviceCategory; + + /** + * The specific service that is to be performed during this appointment. + */ + @Child(name = "serviceType", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The specific service that is to be performed during this appointment", formalDefinition="The specific service that is to be performed during this appointment." ) + protected List serviceType; + + /** + * The specialty of a practitioner that would be required to perform the service requested in this appointment. + */ + @Child(name = "specialty", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The specialty of a practitioner that would be required to perform the service requested in this appointment", formalDefinition="The specialty of a practitioner that would be required to perform the service requested in this appointment." ) + protected List specialty; /** * The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson. */ - @Child(name = "actor", type = {Patient.class, Practitioner.class, RelatedPerson.class, Device.class, HealthcareService.class, Location.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Child(name = "actor", type = {Patient.class, Practitioner.class, RelatedPerson.class, Device.class, HealthcareService.class, Location.class}, order=4, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson", formalDefinition="The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson." ) protected Reference actor; @@ -77,18 +90,18 @@ public class Schedule extends DomainResource { /** * The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a "template" for planning outside these dates. */ - @Child(name = "planningHorizon", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "planningHorizon", type = {Period.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a \"template\" for planning outside these dates", formalDefinition="The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a \"template\" for planning outside these dates." ) protected Period planningHorizon; /** * Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated. */ - @Child(name = "comment", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Child(name = "comment", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated", formalDefinition="Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated." ) protected StringType comment; - private static final long serialVersionUID = 158030926L; + private static final long serialVersionUID = 1234951934L; /** * Constructor @@ -146,42 +159,106 @@ public class Schedule extends DomainResource { } /** - * @return {@link #type} (The schedule type can be used for the categorization of healthcare services or other appointment types.) + * @return {@link #serviceCategory} (A broad categorisation of the service that is to be performed during this appointment.) */ - public List getType() { - if (this.type == null) - this.type = new ArrayList(); - return this.type; + public CodeableConcept getServiceCategory() { + if (this.serviceCategory == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Schedule.serviceCategory"); + else if (Configuration.doAutoCreate()) + this.serviceCategory = new CodeableConcept(); // cc + return this.serviceCategory; } - public boolean hasType() { - if (this.type == null) + public boolean hasServiceCategory() { + return this.serviceCategory != null && !this.serviceCategory.isEmpty(); + } + + /** + * @param value {@link #serviceCategory} (A broad categorisation of the service that is to be performed during this appointment.) + */ + public Schedule setServiceCategory(CodeableConcept value) { + this.serviceCategory = value; + return this; + } + + /** + * @return {@link #serviceType} (The specific service that is to be performed during this appointment.) + */ + public List getServiceType() { + if (this.serviceType == null) + this.serviceType = new ArrayList(); + return this.serviceType; + } + + public boolean hasServiceType() { + if (this.serviceType == null) return false; - for (CodeableConcept item : this.type) + for (CodeableConcept item : this.serviceType) if (!item.isEmpty()) return true; return false; } /** - * @return {@link #type} (The schedule type can be used for the categorization of healthcare services or other appointment types.) + * @return {@link #serviceType} (The specific service that is to be performed during this appointment.) */ // syntactic sugar - public CodeableConcept addType() { //3 + public CodeableConcept addServiceType() { //3 CodeableConcept t = new CodeableConcept(); - if (this.type == null) - this.type = new ArrayList(); - this.type.add(t); + if (this.serviceType == null) + this.serviceType = new ArrayList(); + this.serviceType.add(t); return t; } // syntactic sugar - public Schedule addType(CodeableConcept t) { //3 + public Schedule addServiceType(CodeableConcept t) { //3 if (t == null) return this; - if (this.type == null) - this.type = new ArrayList(); - this.type.add(t); + if (this.serviceType == null) + this.serviceType = new ArrayList(); + this.serviceType.add(t); + return this; + } + + /** + * @return {@link #specialty} (The specialty of a practitioner that would be required to perform the service requested in this appointment.) + */ + public List getSpecialty() { + if (this.specialty == null) + this.specialty = new ArrayList(); + return this.specialty; + } + + public boolean hasSpecialty() { + if (this.specialty == null) + return false; + for (CodeableConcept item : this.specialty) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #specialty} (The specialty of a practitioner that would be required to perform the service requested in this appointment.) + */ + // syntactic sugar + public CodeableConcept addSpecialty() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.specialty == null) + this.specialty = new ArrayList(); + this.specialty.add(t); + return t; + } + + // syntactic sugar + public Schedule addSpecialty(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.specialty == null) + this.specialty = new ArrayList(); + this.specialty.add(t); return this; } @@ -300,7 +377,9 @@ public class Schedule extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("identifier", "Identifier", "External Ids for this item.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("type", "CodeableConcept", "The schedule type can be used for the categorization of healthcare services or other appointment types.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("serviceCategory", "CodeableConcept", "A broad categorisation of the service that is to be performed during this appointment.", 0, java.lang.Integer.MAX_VALUE, serviceCategory)); + childrenList.add(new Property("serviceType", "CodeableConcept", "The specific service that is to be performed during this appointment.", 0, java.lang.Integer.MAX_VALUE, serviceType)); + childrenList.add(new Property("specialty", "CodeableConcept", "The specialty of a practitioner that would be required to perform the service requested in this appointment.", 0, java.lang.Integer.MAX_VALUE, specialty)); childrenList.add(new Property("actor", "Reference(Patient|Practitioner|RelatedPerson|Device|HealthcareService|Location)", "The resource this Schedule resource is providing availability information for. These are expected to usually be one of HealthcareService, Location, Practitioner, Device, Patient or RelatedPerson.", 0, java.lang.Integer.MAX_VALUE, actor)); childrenList.add(new Property("planningHorizon", "Period", "The period of time that the slots that are attached to this Schedule resource cover (even if none exist). These cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a \"template\" for planning outside these dates.", 0, java.lang.Integer.MAX_VALUE, planningHorizon)); childrenList.add(new Property("comment", "string", "Comments on the availability to describe any extended information. Such as custom constraints on the slot(s) that may be associated.", 0, java.lang.Integer.MAX_VALUE, comment)); @@ -310,8 +389,12 @@ public class Schedule extends DomainResource { public void setProperty(String name, Base value) throws FHIRException { if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); - else if (name.equals("type")) - this.getType().add(castToCodeableConcept(value)); + else if (name.equals("serviceCategory")) + this.serviceCategory = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("serviceType")) + this.getServiceType().add(castToCodeableConcept(value)); + else if (name.equals("specialty")) + this.getSpecialty().add(castToCodeableConcept(value)); else if (name.equals("actor")) this.actor = castToReference(value); // Reference else if (name.equals("planningHorizon")) @@ -327,8 +410,15 @@ public class Schedule extends DomainResource { if (name.equals("identifier")) { return addIdentifier(); } - else if (name.equals("type")) { - return addType(); + else if (name.equals("serviceCategory")) { + this.serviceCategory = new CodeableConcept(); + return this.serviceCategory; + } + else if (name.equals("serviceType")) { + return addServiceType(); + } + else if (name.equals("specialty")) { + return addSpecialty(); } else if (name.equals("actor")) { this.actor = new Reference(); @@ -358,10 +448,16 @@ public class Schedule extends DomainResource { for (Identifier i : identifier) dst.identifier.add(i.copy()); }; - if (type != null) { - dst.type = new ArrayList(); - for (CodeableConcept i : type) - dst.type.add(i.copy()); + dst.serviceCategory = serviceCategory == null ? null : serviceCategory.copy(); + if (serviceType != null) { + dst.serviceType = new ArrayList(); + for (CodeableConcept i : serviceType) + dst.serviceType.add(i.copy()); + }; + if (specialty != null) { + dst.specialty = new ArrayList(); + for (CodeableConcept i : specialty) + dst.specialty.add(i.copy()); }; dst.actor = actor == null ? null : actor.copy(); dst.planningHorizon = planningHorizon == null ? null : planningHorizon.copy(); @@ -380,7 +476,8 @@ public class Schedule extends DomainResource { if (!(other instanceof Schedule)) return false; Schedule o = (Schedule) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(actor, o.actor, true) + return compareDeep(identifier, o.identifier, true) && compareDeep(serviceCategory, o.serviceCategory, true) + && compareDeep(serviceType, o.serviceType, true) && compareDeep(specialty, o.specialty, true) && compareDeep(actor, o.actor, true) && compareDeep(planningHorizon, o.planningHorizon, true) && compareDeep(comment, o.comment, true) ; } @@ -396,9 +493,8 @@ public class Schedule extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (type == null || type.isEmpty()) - && (actor == null || actor.isEmpty()) && (planningHorizon == null || planningHorizon.isEmpty()) - && (comment == null || comment.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, serviceCategory, serviceType + , specialty, actor, planningHorizon, comment); } @Override @@ -414,7 +510,7 @@ public class Schedule extends DomainResource { * Path: Schedule.actor
*

*/ - @SearchParamDefinition(name="actor", path="Schedule.actor", description="The individual(HealthcareService, Practitioner, Location, ...) to find a Schedule for", type="reference" ) + @SearchParamDefinition(name="actor", path="Schedule.actor", description="The individual(HealthcareService, Practitioner, Location, ...) to find a Schedule for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") } ) public static final String SP_ACTOR = "actor"; /** * Fluent Client search parameter constant for actor @@ -477,17 +573,17 @@ public class Schedule extends DomainResource { *

* Description: The type of appointments that can be booked into associated slot(s)
* Type: token
- * Path: Schedule.type
+ * Path: Schedule.serviceType
*

*/ - @SearchParamDefinition(name="type", path="Schedule.type", description="The type of appointments that can be booked into associated slot(s)", type="token" ) + @SearchParamDefinition(name="type", path="Schedule.serviceType", description="The type of appointments that can be booked into associated slot(s)", type="token" ) public static final String SP_TYPE = "type"; /** * Fluent Client search parameter constant for type *

* Description: The type of appointments that can be booked into associated slot(s)
* Type: token
- * Path: Schedule.type
+ * Path: Schedule.serviceType
*

*/ public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SearchParameter.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SearchParameter.java index 8df3c95c7cc..0b480e2ca12 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SearchParameter.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SearchParameter.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A search parameter that defines a named search item that can be used to search/filter on a resource. */ @@ -191,7 +189,7 @@ public class SearchParameter extends DomainResource { * The name of an individual to contact regarding the search parameter. */ @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the search parameter." ) + @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the search parameter." ) protected StringType name; /** @@ -360,8 +358,7 @@ public class SearchParameter extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); } public String fhirType() { @@ -399,84 +396,98 @@ public class SearchParameter extends DomainResource { @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) protected BooleanType experimental; + /** + * The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes. + */ + @Child(name = "date", type = {DateTimeType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Publication Date(/time)", formalDefinition="The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes." ) + protected DateTimeType date; + /** * The name of the individual or organization that published the search parameter. */ - @Child(name = "publisher", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "publisher", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the search parameter." ) protected StringType publisher; /** * Contacts to assist a user in finding and communicating with the publisher. */ - @Child(name = "contact", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "contact", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) protected List contact; /** - * The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes. + * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of search parameters. */ - @Child(name = "date", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Publication Date(/time)", formalDefinition="The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes." ) - protected DateTimeType date; + @Child(name = "useContext", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Content intends to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of search parameters." ) + protected List useContext; /** * The Scope and Usage that this search parameter was created to meet. */ - @Child(name = "requirements", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Child(name = "requirements", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Why this search parameter is defined", formalDefinition="The Scope and Usage that this search parameter was created to meet." ) protected StringType requirements; /** * The code used in the URL or the parameter name in a parameters resource for this search parameter. */ - @Child(name = "code", type = {CodeType.class}, order=8, min=1, max=1, modifier=false, summary=true) + @Child(name = "code", type = {CodeType.class}, order=9, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Code used in URL", formalDefinition="The code used in the URL or the parameter name in a parameters resource for this search parameter." ) protected CodeType code; /** * The base resource type that this search parameter refers to. */ - @Child(name = "base", type = {CodeType.class}, order=9, min=1, max=1, modifier=false, summary=true) + @Child(name = "base", type = {CodeType.class}, order=10, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="The resource type this search parameter applies to", formalDefinition="The base resource type that this search parameter refers to." ) protected CodeType base; /** * The type of value a search parameter refers to, and how the content is interpreted. */ - @Child(name = "type", type = {CodeType.class}, order=10, min=1, max=1, modifier=false, summary=true) + @Child(name = "type", type = {CodeType.class}, order=11, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="number | date | string | token | reference | composite | quantity | uri", formalDefinition="The type of value a search parameter refers to, and how the content is interpreted." ) protected Enumeration type; /** * A description of the search parameters and how it used. */ - @Child(name = "description", type = {StringType.class}, order=11, min=1, max=1, modifier=false, summary=true) + @Child(name = "description", type = {StringType.class}, order=12, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Documentation for search parameter", formalDefinition="A description of the search parameters and how it used." ) protected StringType description; + /** + * A FluentPath expression that returns a set of elements for the search parameter. + */ + @Child(name = "expression", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="FluentPath expression that extracts the values", formalDefinition="A FluentPath expression that returns a set of elements for the search parameter." ) + protected StringType expression; + /** * An XPath expression that returns a set of elements for the search parameter. */ - @Child(name = "xpath", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Child(name = "xpath", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="XPath that extracts the values", formalDefinition="An XPath expression that returns a set of elements for the search parameter." ) protected StringType xpath; /** * How the search parameter relates to the set of elements returned by evaluating the xpath query. */ - @Child(name = "xpathUsage", type = {CodeType.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Child(name = "xpathUsage", type = {CodeType.class}, order=15, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="normal | phonetic | nearby | distance | other", formalDefinition="How the search parameter relates to the set of elements returned by evaluating the xpath query." ) protected Enumeration xpathUsage; /** * Types of resource (if a resource is referenced). */ - @Child(name = "target", type = {CodeType.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "target", type = {CodeType.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Types of resource (if a resource reference)", formalDefinition="Types of resource (if a resource is referenced)." ) protected List target; - private static final long serialVersionUID = -742596414L; + private static final long serialVersionUID = -310845178L; /** * Constructor @@ -682,6 +693,55 @@ public class SearchParameter extends DomainResource { return this; } + /** + * @return {@link #date} (The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SearchParameter.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public SearchParameter setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes. + */ + public SearchParameter setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + /** * @return {@link #publisher} (The name of the individual or organization that published the search parameter.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value */ @@ -772,51 +832,42 @@ public class SearchParameter extends DomainResource { } /** - * @return {@link #date} (The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of search parameters.) */ - public DateTimeType getDateElement() { - if (this.date == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SearchParameter.date"); - else if (Configuration.doAutoCreate()) - this.date = new DateTimeType(); // bb - return this.date; + public List getUseContext() { + if (this.useContext == null) + this.useContext = new ArrayList(); + return this.useContext; } - public boolean hasDateElement() { - return this.date != null && !this.date.isEmpty(); - } - - public boolean hasDate() { - return this.date != null && !this.date.isEmpty(); + public boolean hasUseContext() { + if (this.useContext == null) + return false; + for (CodeableConcept item : this.useContext) + if (!item.isEmpty()) + return true; + return false; } /** - * @param value {@link #date} (The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of search parameters.) */ - public SearchParameter setDateElement(DateTimeType value) { - this.date = value; - return this; + // syntactic sugar + public CodeableConcept addUseContext() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return t; } - /** - * @return The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes. - */ - public Date getDate() { - return this.date == null ? null : this.date.getValue(); - } - - /** - * @param value The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes. - */ - public SearchParameter setDate(Date value) { - if (value == null) - this.date = null; - else { - if (this.date == null) - this.date = new DateTimeType(); - this.date.setValue(value); - } + // syntactic sugar + public SearchParameter addUseContext(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); return this; } @@ -1049,6 +1100,55 @@ public class SearchParameter extends DomainResource { return this; } + /** + * @return {@link #expression} (A FluentPath expression that returns a set of elements for the search parameter.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value + */ + public StringType getExpressionElement() { + if (this.expression == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SearchParameter.expression"); + else if (Configuration.doAutoCreate()) + this.expression = new StringType(); // bb + return this.expression; + } + + public boolean hasExpressionElement() { + return this.expression != null && !this.expression.isEmpty(); + } + + public boolean hasExpression() { + return this.expression != null && !this.expression.isEmpty(); + } + + /** + * @param value {@link #expression} (A FluentPath expression that returns a set of elements for the search parameter.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value + */ + public SearchParameter setExpressionElement(StringType value) { + this.expression = value; + return this; + } + + /** + * @return A FluentPath expression that returns a set of elements for the search parameter. + */ + public String getExpression() { + return this.expression == null ? null : this.expression.getValue(); + } + + /** + * @param value A FluentPath expression that returns a set of elements for the search parameter. + */ + public SearchParameter setExpression(String value) { + if (Utilities.noString(value)) + this.expression = null; + else { + if (this.expression == null) + this.expression = new StringType(); + this.expression.setValue(value); + } + return this; + } + /** * @return {@link #xpath} (An XPath expression that returns a set of elements for the search parameter.). This is the underlying object with id, value and extensions. The accessor "getXpath" gives direct access to the value */ @@ -1207,14 +1307,16 @@ public class SearchParameter extends DomainResource { childrenList.add(new Property("name", "string", "A free text natural language name identifying the search parameter.", 0, java.lang.Integer.MAX_VALUE, name)); childrenList.add(new Property("status", "code", "The status of this search parameter definition.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("experimental", "boolean", "A flag to indicate that this search parameter definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); + childrenList.add(new Property("date", "dateTime", "The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.", 0, java.lang.Integer.MAX_VALUE, date)); childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the search parameter.", 0, java.lang.Integer.MAX_VALUE, publisher)); childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); - childrenList.add(new Property("date", "dateTime", "The date (and optionally time) when the search parameter definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the search parameter changes.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of search parameters.", 0, java.lang.Integer.MAX_VALUE, useContext)); childrenList.add(new Property("requirements", "string", "The Scope and Usage that this search parameter was created to meet.", 0, java.lang.Integer.MAX_VALUE, requirements)); childrenList.add(new Property("code", "code", "The code used in the URL or the parameter name in a parameters resource for this search parameter.", 0, java.lang.Integer.MAX_VALUE, code)); childrenList.add(new Property("base", "code", "The base resource type that this search parameter refers to.", 0, java.lang.Integer.MAX_VALUE, base)); childrenList.add(new Property("type", "code", "The type of value a search parameter refers to, and how the content is interpreted.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("description", "string", "A description of the search parameters and how it used.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("expression", "string", "A FluentPath expression that returns a set of elements for the search parameter.", 0, java.lang.Integer.MAX_VALUE, expression)); childrenList.add(new Property("xpath", "string", "An XPath expression that returns a set of elements for the search parameter.", 0, java.lang.Integer.MAX_VALUE, xpath)); childrenList.add(new Property("xpathUsage", "code", "How the search parameter relates to the set of elements returned by evaluating the xpath query.", 0, java.lang.Integer.MAX_VALUE, xpathUsage)); childrenList.add(new Property("target", "code", "Types of resource (if a resource is referenced).", 0, java.lang.Integer.MAX_VALUE, target)); @@ -1230,12 +1332,14 @@ public class SearchParameter extends DomainResource { this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration else if (name.equals("experimental")) this.experimental = castToBoolean(value); // BooleanType + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType else if (name.equals("publisher")) this.publisher = castToString(value); // StringType else if (name.equals("contact")) this.getContact().add((SearchParameterContactComponent) value); - else if (name.equals("date")) - this.date = castToDateTime(value); // DateTimeType + else if (name.equals("useContext")) + this.getUseContext().add(castToCodeableConcept(value)); else if (name.equals("requirements")) this.requirements = castToString(value); // StringType else if (name.equals("code")) @@ -1246,6 +1350,8 @@ public class SearchParameter extends DomainResource { this.type = new SearchParamTypeEnumFactory().fromType(value); // Enumeration else if (name.equals("description")) this.description = castToString(value); // StringType + else if (name.equals("expression")) + this.expression = castToString(value); // StringType else if (name.equals("xpath")) this.xpath = castToString(value); // StringType else if (name.equals("xpathUsage")) @@ -1270,14 +1376,17 @@ public class SearchParameter extends DomainResource { else if (name.equals("experimental")) { throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.experimental"); } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.date"); + } else if (name.equals("publisher")) { throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.publisher"); } else if (name.equals("contact")) { return addContact(); } - else if (name.equals("date")) { - throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.date"); + else if (name.equals("useContext")) { + return addUseContext(); } else if (name.equals("requirements")) { throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.requirements"); @@ -1294,6 +1403,9 @@ public class SearchParameter extends DomainResource { else if (name.equals("description")) { throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.description"); } + else if (name.equals("expression")) { + throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.expression"); + } else if (name.equals("xpath")) { throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.xpath"); } @@ -1319,18 +1431,24 @@ public class SearchParameter extends DomainResource { dst.name = name == null ? null : name.copy(); dst.status = status == null ? null : status.copy(); dst.experimental = experimental == null ? null : experimental.copy(); + dst.date = date == null ? null : date.copy(); dst.publisher = publisher == null ? null : publisher.copy(); if (contact != null) { dst.contact = new ArrayList(); for (SearchParameterContactComponent i : contact) dst.contact.add(i.copy()); }; - dst.date = date == null ? null : date.copy(); + if (useContext != null) { + dst.useContext = new ArrayList(); + for (CodeableConcept i : useContext) + dst.useContext.add(i.copy()); + }; dst.requirements = requirements == null ? null : requirements.copy(); dst.code = code == null ? null : code.copy(); dst.base = base == null ? null : base.copy(); dst.type = type == null ? null : type.copy(); dst.description = description == null ? null : description.copy(); + dst.expression = expression == null ? null : expression.copy(); dst.xpath = xpath == null ? null : xpath.copy(); dst.xpathUsage = xpathUsage == null ? null : xpathUsage.copy(); if (target != null) { @@ -1353,11 +1471,12 @@ public class SearchParameter extends DomainResource { return false; SearchParameter o = (SearchParameter) other; return compareDeep(url, o.url, true) && compareDeep(name, o.name, true) && compareDeep(status, o.status, true) - && compareDeep(experimental, o.experimental, true) && compareDeep(publisher, o.publisher, true) - && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) && compareDeep(requirements, o.requirements, true) + && compareDeep(experimental, o.experimental, true) && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) + && compareDeep(contact, o.contact, true) && compareDeep(useContext, o.useContext, true) && compareDeep(requirements, o.requirements, true) && compareDeep(code, o.code, true) && compareDeep(base, o.base, true) && compareDeep(type, o.type, true) - && compareDeep(description, o.description, true) && compareDeep(xpath, o.xpath, true) && compareDeep(xpathUsage, o.xpathUsage, true) - && compareDeep(target, o.target, true); + && compareDeep(description, o.description, true) && compareDeep(expression, o.expression, true) + && compareDeep(xpath, o.xpath, true) && compareDeep(xpathUsage, o.xpathUsage, true) && compareDeep(target, o.target, true) + ; } @Override @@ -1368,20 +1487,17 @@ public class SearchParameter extends DomainResource { return false; SearchParameter o = (SearchParameter) other; return compareValues(url, o.url, true) && compareValues(name, o.name, true) && compareValues(status, o.status, true) - && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) - && compareValues(date, o.date, true) && compareValues(requirements, o.requirements, true) && compareValues(code, o.code, true) - && compareValues(base, o.base, true) && compareValues(type, o.type, true) && compareValues(description, o.description, true) + && compareValues(experimental, o.experimental, true) && compareValues(date, o.date, true) && compareValues(publisher, o.publisher, true) + && compareValues(requirements, o.requirements, true) && compareValues(code, o.code, true) && compareValues(base, o.base, true) + && compareValues(type, o.type, true) && compareValues(description, o.description, true) && compareValues(expression, o.expression, true) && compareValues(xpath, o.xpath, true) && compareValues(xpathUsage, o.xpathUsage, true) && compareValues(target, o.target, true) ; } public boolean isEmpty() { - return super.isEmpty() && (url == null || url.isEmpty()) && (name == null || name.isEmpty()) - && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty()) - && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) - && (requirements == null || requirements.isEmpty()) && (code == null || code.isEmpty()) && (base == null || base.isEmpty()) - && (type == null || type.isEmpty()) && (description == null || description.isEmpty()) && (xpath == null || xpath.isEmpty()) - && (xpathUsage == null || xpathUsage.isEmpty()) && (target == null || target.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, name, status, experimental + , date, publisher, contact, useContext, requirements, code, base, type, description + , expression, xpath, xpathUsage, target); } @Override @@ -1429,6 +1545,26 @@ public class SearchParameter extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); + /** + * Search parameter: context + *

+ * Description: A use context assigned to the search parameter
+ * Type: token
+ * Path: SearchParameter.useContext
+ *

+ */ + @SearchParamDefinition(name="context", path="SearchParameter.useContext", description="A use context assigned to the search parameter", type="token" ) + public static final String SP_CONTEXT = "context"; + /** + * Fluent Client search parameter constant for context + *

+ * Description: A use context assigned to the search parameter
+ * Type: token
+ * Path: SearchParameter.useContext
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT); + /** * Search parameter: description *

diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Sequence.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Sequence.java index c6b942ef06e..5f38f0088ec 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Sequence.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Sequence.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -40,9 +40,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Variation and Sequence data. */ @@ -153,7 +152,7 @@ public class Sequence extends DomainResource { } @Block() - public static class SequenceCoordinateComponent extends BackboneElement implements IBaseBackboneElement { + public static class SequenceReferenceSeqComponent extends BackboneElement implements IBaseBackboneElement { /** * The chromosome containing the genetic finding. The value set will be 1-22, X, Y when the species is human without chromosome abnormality. Otherwise, NCBI-Gene code system should be used. */ @@ -161,43 +160,79 @@ public class Sequence extends DomainResource { @Description(shortDefinition="The chromosome containing the genetic finding", formalDefinition="The chromosome containing the genetic finding. The value set will be 1-22, X, Y when the species is human without chromosome abnormality. Otherwise, NCBI-Gene code system should be used." ) protected CodeableConcept chromosome; - /** - * Inclusive 0-based nucleotide position for start of genomic finding on the positive (+) genomics strand. - */ - @Child(name = "start", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="0-based start position (inclusive) of the sequence", formalDefinition="Inclusive 0-based nucleotide position for start of genomic finding on the positive (+) genomics strand." ) - protected IntegerType start; - - /** - * Exclusive 0-based nucleotide position for end of genomic finding on the positive (+) genomic strand. - */ - @Child(name = "end", type = {IntegerType.class}, order=3, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="0-based end position (exclusive) of the sequence", formalDefinition="Exclusive 0-based nucleotide position for end of genomic finding on the positive (+) genomic strand." ) - protected IntegerType end; - /** * The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used. */ - @Child(name = "genomeBuild", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "genomeBuild", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'", formalDefinition="The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used." ) protected StringType genomeBuild; - private static final long serialVersionUID = 1604914542L; + /** + * Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences. + */ + @Child(name = "referenceSeqId", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Reference identifier", formalDefinition="Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences." ) + protected CodeableConcept referenceSeqId; + + /** + * A Pointer to another Sequence entity as refence sequence. + */ + @Child(name = "referenceSeqPointer", type = {Sequence.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="A Pointer to another Sequence entity as refence sequence", formalDefinition="A Pointer to another Sequence entity as refence sequence." ) + protected Reference referenceSeqPointer; + + /** + * The actual object that is the target of the reference (A Pointer to another Sequence entity as refence sequence.) + */ + protected Sequence referenceSeqPointerTarget; + + /** + * A Reference Sequence string. + */ + @Child(name = "referenceSeqString", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="A Reference Sequence string", formalDefinition="A Reference Sequence string." ) + protected StringType referenceSeqString; + + /** + * 0-based start position (inclusive) of the window on the reference sequence. + */ + @Child(name = "windowStart", type = {IntegerType.class}, order=6, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="0-based start position (inclusive) of the window on the reference sequence", formalDefinition="0-based start position (inclusive) of the window on the reference sequence." ) + protected IntegerType windowStart; + + /** + * 0-based end position (exclusive) of the window on the reference sequence. + */ + @Child(name = "windowEnd", type = {IntegerType.class}, order=7, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="0-based end position (exclusive) of the window on the reference sequence", formalDefinition="0-based end position (exclusive) of the window on the reference sequence." ) + protected IntegerType windowEnd; + + private static final long serialVersionUID = -165922935L; /** * Constructor */ - public SequenceCoordinateComponent() { + public SequenceReferenceSeqComponent() { super(); } + /** + * Constructor + */ + public SequenceReferenceSeqComponent(CodeableConcept referenceSeqId, IntegerType windowStart, IntegerType windowEnd) { + super(); + this.referenceSeqId = referenceSeqId; + this.windowStart = windowStart; + this.windowEnd = windowEnd; + } + /** * @return {@link #chromosome} (The chromosome containing the genetic finding. The value set will be 1-22, X, Y when the species is human without chromosome abnormality. Otherwise, NCBI-Gene code system should be used.) */ public CodeableConcept getChromosome() { if (this.chromosome == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SequenceCoordinateComponent.chromosome"); + throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.chromosome"); else if (Configuration.doAutoCreate()) this.chromosome = new CodeableConcept(); // cc return this.chromosome; @@ -210,108 +245,18 @@ public class Sequence extends DomainResource { /** * @param value {@link #chromosome} (The chromosome containing the genetic finding. The value set will be 1-22, X, Y when the species is human without chromosome abnormality. Otherwise, NCBI-Gene code system should be used.) */ - public SequenceCoordinateComponent setChromosome(CodeableConcept value) { + public SequenceReferenceSeqComponent setChromosome(CodeableConcept value) { this.chromosome = value; return this; } - /** - * @return {@link #start} (Inclusive 0-based nucleotide position for start of genomic finding on the positive (+) genomics strand.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value - */ - public IntegerType getStartElement() { - if (this.start == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SequenceCoordinateComponent.start"); - else if (Configuration.doAutoCreate()) - this.start = new IntegerType(); // bb - return this.start; - } - - public boolean hasStartElement() { - return this.start != null && !this.start.isEmpty(); - } - - public boolean hasStart() { - return this.start != null && !this.start.isEmpty(); - } - - /** - * @param value {@link #start} (Inclusive 0-based nucleotide position for start of genomic finding on the positive (+) genomics strand.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value - */ - public SequenceCoordinateComponent setStartElement(IntegerType value) { - this.start = value; - return this; - } - - /** - * @return Inclusive 0-based nucleotide position for start of genomic finding on the positive (+) genomics strand. - */ - public int getStart() { - return this.start == null || this.start.isEmpty() ? 0 : this.start.getValue(); - } - - /** - * @param value Inclusive 0-based nucleotide position for start of genomic finding on the positive (+) genomics strand. - */ - public SequenceCoordinateComponent setStart(int value) { - if (this.start == null) - this.start = new IntegerType(); - this.start.setValue(value); - return this; - } - - /** - * @return {@link #end} (Exclusive 0-based nucleotide position for end of genomic finding on the positive (+) genomic strand.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value - */ - public IntegerType getEndElement() { - if (this.end == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SequenceCoordinateComponent.end"); - else if (Configuration.doAutoCreate()) - this.end = new IntegerType(); // bb - return this.end; - } - - public boolean hasEndElement() { - return this.end != null && !this.end.isEmpty(); - } - - public boolean hasEnd() { - return this.end != null && !this.end.isEmpty(); - } - - /** - * @param value {@link #end} (Exclusive 0-based nucleotide position for end of genomic finding on the positive (+) genomic strand.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value - */ - public SequenceCoordinateComponent setEndElement(IntegerType value) { - this.end = value; - return this; - } - - /** - * @return Exclusive 0-based nucleotide position for end of genomic finding on the positive (+) genomic strand. - */ - public int getEnd() { - return this.end == null || this.end.isEmpty() ? 0 : this.end.getValue(); - } - - /** - * @param value Exclusive 0-based nucleotide position for end of genomic finding on the positive (+) genomic strand. - */ - public SequenceCoordinateComponent setEnd(int value) { - if (this.end == null) - this.end = new IntegerType(); - this.end.setValue(value); - return this; - } - /** * @return {@link #genomeBuild} (The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used.). This is the underlying object with id, value and extensions. The accessor "getGenomeBuild" gives direct access to the value */ public StringType getGenomeBuildElement() { if (this.genomeBuild == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SequenceCoordinateComponent.genomeBuild"); + throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.genomeBuild"); else if (Configuration.doAutoCreate()) this.genomeBuild = new StringType(); // bb return this.genomeBuild; @@ -328,7 +273,7 @@ public class Sequence extends DomainResource { /** * @param value {@link #genomeBuild} (The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used.). This is the underlying object with id, value and extensions. The accessor "getGenomeBuild" gives direct access to the value */ - public SequenceCoordinateComponent setGenomeBuildElement(StringType value) { + public SequenceReferenceSeqComponent setGenomeBuildElement(StringType value) { this.genomeBuild = value; return this; } @@ -343,7 +288,7 @@ public class Sequence extends DomainResource { /** * @param value The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used. */ - public SequenceCoordinateComponent setGenomeBuild(String value) { + public SequenceReferenceSeqComponent setGenomeBuild(String value) { if (Utilities.noString(value)) this.genomeBuild = null; else { @@ -354,24 +299,240 @@ public class Sequence extends DomainResource { return this; } + /** + * @return {@link #referenceSeqId} (Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences.) + */ + public CodeableConcept getReferenceSeqId() { + if (this.referenceSeqId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.referenceSeqId"); + else if (Configuration.doAutoCreate()) + this.referenceSeqId = new CodeableConcept(); // cc + return this.referenceSeqId; + } + + public boolean hasReferenceSeqId() { + return this.referenceSeqId != null && !this.referenceSeqId.isEmpty(); + } + + /** + * @param value {@link #referenceSeqId} (Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences.) + */ + public SequenceReferenceSeqComponent setReferenceSeqId(CodeableConcept value) { + this.referenceSeqId = value; + return this; + } + + /** + * @return {@link #referenceSeqPointer} (A Pointer to another Sequence entity as refence sequence.) + */ + public Reference getReferenceSeqPointer() { + if (this.referenceSeqPointer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.referenceSeqPointer"); + else if (Configuration.doAutoCreate()) + this.referenceSeqPointer = new Reference(); // cc + return this.referenceSeqPointer; + } + + public boolean hasReferenceSeqPointer() { + return this.referenceSeqPointer != null && !this.referenceSeqPointer.isEmpty(); + } + + /** + * @param value {@link #referenceSeqPointer} (A Pointer to another Sequence entity as refence sequence.) + */ + public SequenceReferenceSeqComponent setReferenceSeqPointer(Reference value) { + this.referenceSeqPointer = value; + return this; + } + + /** + * @return {@link #referenceSeqPointer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A Pointer to another Sequence entity as refence sequence.) + */ + public Sequence getReferenceSeqPointerTarget() { + if (this.referenceSeqPointerTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.referenceSeqPointer"); + else if (Configuration.doAutoCreate()) + this.referenceSeqPointerTarget = new Sequence(); // aa + return this.referenceSeqPointerTarget; + } + + /** + * @param value {@link #referenceSeqPointer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A Pointer to another Sequence entity as refence sequence.) + */ + public SequenceReferenceSeqComponent setReferenceSeqPointerTarget(Sequence value) { + this.referenceSeqPointerTarget = value; + return this; + } + + /** + * @return {@link #referenceSeqString} (A Reference Sequence string.). This is the underlying object with id, value and extensions. The accessor "getReferenceSeqString" gives direct access to the value + */ + public StringType getReferenceSeqStringElement() { + if (this.referenceSeqString == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.referenceSeqString"); + else if (Configuration.doAutoCreate()) + this.referenceSeqString = new StringType(); // bb + return this.referenceSeqString; + } + + public boolean hasReferenceSeqStringElement() { + return this.referenceSeqString != null && !this.referenceSeqString.isEmpty(); + } + + public boolean hasReferenceSeqString() { + return this.referenceSeqString != null && !this.referenceSeqString.isEmpty(); + } + + /** + * @param value {@link #referenceSeqString} (A Reference Sequence string.). This is the underlying object with id, value and extensions. The accessor "getReferenceSeqString" gives direct access to the value + */ + public SequenceReferenceSeqComponent setReferenceSeqStringElement(StringType value) { + this.referenceSeqString = value; + return this; + } + + /** + * @return A Reference Sequence string. + */ + public String getReferenceSeqString() { + return this.referenceSeqString == null ? null : this.referenceSeqString.getValue(); + } + + /** + * @param value A Reference Sequence string. + */ + public SequenceReferenceSeqComponent setReferenceSeqString(String value) { + if (Utilities.noString(value)) + this.referenceSeqString = null; + else { + if (this.referenceSeqString == null) + this.referenceSeqString = new StringType(); + this.referenceSeqString.setValue(value); + } + return this; + } + + /** + * @return {@link #windowStart} (0-based start position (inclusive) of the window on the reference sequence.). This is the underlying object with id, value and extensions. The accessor "getWindowStart" gives direct access to the value + */ + public IntegerType getWindowStartElement() { + if (this.windowStart == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.windowStart"); + else if (Configuration.doAutoCreate()) + this.windowStart = new IntegerType(); // bb + return this.windowStart; + } + + public boolean hasWindowStartElement() { + return this.windowStart != null && !this.windowStart.isEmpty(); + } + + public boolean hasWindowStart() { + return this.windowStart != null && !this.windowStart.isEmpty(); + } + + /** + * @param value {@link #windowStart} (0-based start position (inclusive) of the window on the reference sequence.). This is the underlying object with id, value and extensions. The accessor "getWindowStart" gives direct access to the value + */ + public SequenceReferenceSeqComponent setWindowStartElement(IntegerType value) { + this.windowStart = value; + return this; + } + + /** + * @return 0-based start position (inclusive) of the window on the reference sequence. + */ + public int getWindowStart() { + return this.windowStart == null || this.windowStart.isEmpty() ? 0 : this.windowStart.getValue(); + } + + /** + * @param value 0-based start position (inclusive) of the window on the reference sequence. + */ + public SequenceReferenceSeqComponent setWindowStart(int value) { + if (this.windowStart == null) + this.windowStart = new IntegerType(); + this.windowStart.setValue(value); + return this; + } + + /** + * @return {@link #windowEnd} (0-based end position (exclusive) of the window on the reference sequence.). This is the underlying object with id, value and extensions. The accessor "getWindowEnd" gives direct access to the value + */ + public IntegerType getWindowEndElement() { + if (this.windowEnd == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceReferenceSeqComponent.windowEnd"); + else if (Configuration.doAutoCreate()) + this.windowEnd = new IntegerType(); // bb + return this.windowEnd; + } + + public boolean hasWindowEndElement() { + return this.windowEnd != null && !this.windowEnd.isEmpty(); + } + + public boolean hasWindowEnd() { + return this.windowEnd != null && !this.windowEnd.isEmpty(); + } + + /** + * @param value {@link #windowEnd} (0-based end position (exclusive) of the window on the reference sequence.). This is the underlying object with id, value and extensions. The accessor "getWindowEnd" gives direct access to the value + */ + public SequenceReferenceSeqComponent setWindowEndElement(IntegerType value) { + this.windowEnd = value; + return this; + } + + /** + * @return 0-based end position (exclusive) of the window on the reference sequence. + */ + public int getWindowEnd() { + return this.windowEnd == null || this.windowEnd.isEmpty() ? 0 : this.windowEnd.getValue(); + } + + /** + * @param value 0-based end position (exclusive) of the window on the reference sequence. + */ + public SequenceReferenceSeqComponent setWindowEnd(int value) { + if (this.windowEnd == null) + this.windowEnd = new IntegerType(); + this.windowEnd.setValue(value); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("chromosome", "CodeableConcept", "The chromosome containing the genetic finding. The value set will be 1-22, X, Y when the species is human without chromosome abnormality. Otherwise, NCBI-Gene code system should be used.", 0, java.lang.Integer.MAX_VALUE, chromosome)); - childrenList.add(new Property("start", "integer", "Inclusive 0-based nucleotide position for start of genomic finding on the positive (+) genomics strand.", 0, java.lang.Integer.MAX_VALUE, start)); - childrenList.add(new Property("end", "integer", "Exclusive 0-based nucleotide position for end of genomic finding on the positive (+) genomic strand.", 0, java.lang.Integer.MAX_VALUE, end)); childrenList.add(new Property("genomeBuild", "string", "The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'. Version number must be included if a versioned release of a primary build was used.", 0, java.lang.Integer.MAX_VALUE, genomeBuild)); + childrenList.add(new Property("referenceSeqId", "CodeableConcept", "Reference identifier of reference sequence submitted to NCBI. It must match the type in the Sequence.type field. For example, the prefix, “NG_” identifies reference sequence for genes, “NM_” for messenger RNA transcripts, and “NP_” for amino acid sequences.", 0, java.lang.Integer.MAX_VALUE, referenceSeqId)); + childrenList.add(new Property("referenceSeqPointer", "Reference(Sequence)", "A Pointer to another Sequence entity as refence sequence.", 0, java.lang.Integer.MAX_VALUE, referenceSeqPointer)); + childrenList.add(new Property("referenceSeqString", "string", "A Reference Sequence string.", 0, java.lang.Integer.MAX_VALUE, referenceSeqString)); + childrenList.add(new Property("windowStart", "integer", "0-based start position (inclusive) of the window on the reference sequence.", 0, java.lang.Integer.MAX_VALUE, windowStart)); + childrenList.add(new Property("windowEnd", "integer", "0-based end position (exclusive) of the window on the reference sequence.", 0, java.lang.Integer.MAX_VALUE, windowEnd)); } @Override public void setProperty(String name, Base value) throws FHIRException { if (name.equals("chromosome")) this.chromosome = castToCodeableConcept(value); // CodeableConcept - else if (name.equals("start")) - this.start = castToInteger(value); // IntegerType - else if (name.equals("end")) - this.end = castToInteger(value); // IntegerType else if (name.equals("genomeBuild")) this.genomeBuild = castToString(value); // StringType + else if (name.equals("referenceSeqId")) + this.referenceSeqId = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("referenceSeqPointer")) + this.referenceSeqPointer = castToReference(value); // Reference + else if (name.equals("referenceSeqString")) + this.referenceSeqString = castToString(value); // StringType + else if (name.equals("windowStart")) + this.windowStart = castToInteger(value); // IntegerType + else if (name.equals("windowEnd")) + this.windowEnd = castToInteger(value); // IntegerType else super.setProperty(name, value); } @@ -382,26 +543,40 @@ public class Sequence extends DomainResource { this.chromosome = new CodeableConcept(); return this.chromosome; } - else if (name.equals("start")) { - throw new FHIRException("Cannot call addChild on a primitive type Sequence.start"); - } - else if (name.equals("end")) { - throw new FHIRException("Cannot call addChild on a primitive type Sequence.end"); - } else if (name.equals("genomeBuild")) { throw new FHIRException("Cannot call addChild on a primitive type Sequence.genomeBuild"); } + else if (name.equals("referenceSeqId")) { + this.referenceSeqId = new CodeableConcept(); + return this.referenceSeqId; + } + else if (name.equals("referenceSeqPointer")) { + this.referenceSeqPointer = new Reference(); + return this.referenceSeqPointer; + } + else if (name.equals("referenceSeqString")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.referenceSeqString"); + } + else if (name.equals("windowStart")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.windowStart"); + } + else if (name.equals("windowEnd")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.windowEnd"); + } else return super.addChild(name); } - public SequenceCoordinateComponent copy() { - SequenceCoordinateComponent dst = new SequenceCoordinateComponent(); + public SequenceReferenceSeqComponent copy() { + SequenceReferenceSeqComponent dst = new SequenceReferenceSeqComponent(); copyValues(dst); dst.chromosome = chromosome == null ? null : chromosome.copy(); - dst.start = start == null ? null : start.copy(); - dst.end = end == null ? null : end.copy(); dst.genomeBuild = genomeBuild == null ? null : genomeBuild.copy(); + dst.referenceSeqId = referenceSeqId == null ? null : referenceSeqId.copy(); + dst.referenceSeqPointer = referenceSeqPointer == null ? null : referenceSeqPointer.copy(); + dst.referenceSeqString = referenceSeqString == null ? null : referenceSeqString.copy(); + dst.windowStart = windowStart == null ? null : windowStart.copy(); + dst.windowEnd = windowEnd == null ? null : windowEnd.copy(); return dst; } @@ -409,31 +584,407 @@ public class Sequence extends DomainResource { public boolean equalsDeep(Base other) { if (!super.equalsDeep(other)) return false; - if (!(other instanceof SequenceCoordinateComponent)) + if (!(other instanceof SequenceReferenceSeqComponent)) return false; - SequenceCoordinateComponent o = (SequenceCoordinateComponent) other; - return compareDeep(chromosome, o.chromosome, true) && compareDeep(start, o.start, true) && compareDeep(end, o.end, true) - && compareDeep(genomeBuild, o.genomeBuild, true); + SequenceReferenceSeqComponent o = (SequenceReferenceSeqComponent) other; + return compareDeep(chromosome, o.chromosome, true) && compareDeep(genomeBuild, o.genomeBuild, true) + && compareDeep(referenceSeqId, o.referenceSeqId, true) && compareDeep(referenceSeqPointer, o.referenceSeqPointer, true) + && compareDeep(referenceSeqString, o.referenceSeqString, true) && compareDeep(windowStart, o.windowStart, true) + && compareDeep(windowEnd, o.windowEnd, true); } @Override public boolean equalsShallow(Base other) { if (!super.equalsShallow(other)) return false; - if (!(other instanceof SequenceCoordinateComponent)) + if (!(other instanceof SequenceReferenceSeqComponent)) return false; - SequenceCoordinateComponent o = (SequenceCoordinateComponent) other; - return compareValues(start, o.start, true) && compareValues(end, o.end, true) && compareValues(genomeBuild, o.genomeBuild, true) - ; + SequenceReferenceSeqComponent o = (SequenceReferenceSeqComponent) other; + return compareValues(genomeBuild, o.genomeBuild, true) && compareValues(referenceSeqString, o.referenceSeqString, true) + && compareValues(windowStart, o.windowStart, true) && compareValues(windowEnd, o.windowEnd, true); } public boolean isEmpty() { - return super.isEmpty() && (chromosome == null || chromosome.isEmpty()) && (start == null || start.isEmpty()) - && (end == null || end.isEmpty()) && (genomeBuild == null || genomeBuild.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( chromosome, genomeBuild, referenceSeqId + , referenceSeqPointer, referenceSeqString, windowStart, windowEnd); } public String fhirType() { - return "Sequence.coordinate"; + return "Sequence.referenceSeq"; + + } + + } + + @Block() + public static class SequenceVariationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * 0-based start position (inclusive) of the variation on the reference sequence. + */ + @Child(name = "start", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="0-based start position (inclusive) of the variation on the reference sequence", formalDefinition="0-based start position (inclusive) of the variation on the reference sequence." ) + protected IntegerType start; + + /** + * 0-based end position (exclusive) of the variation on the reference sequence. + */ + @Child(name = "end", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="0-based end position (exclusive) of the variation on the reference sequence", formalDefinition="0-based end position (exclusive) of the variation on the reference sequence." ) + protected IntegerType end; + + /** + * Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. + */ + @Child(name = "observedAllele", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Nucleotide(s)/amino acids from start position to stop position of observed variation", formalDefinition="Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand." ) + protected StringType observedAllele; + + /** + * Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. + */ + @Child(name = "referenceAllele", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Nucleotide(s)/amino acids from start position to stop position of reference variation", formalDefinition="Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand." ) + protected StringType referenceAllele; + + /** + * Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm). + */ + @Child(name = "cigar", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Extended CIGAR string for aligning the sequence with reference bases", formalDefinition="Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm)." ) + protected StringType cigar; + + private static final long serialVersionUID = 913298829L; + + /** + * Constructor + */ + public SequenceVariationComponent() { + super(); + } + + /** + * @return {@link #start} (0-based start position (inclusive) of the variation on the reference sequence.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public IntegerType getStartElement() { + if (this.start == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceVariationComponent.start"); + else if (Configuration.doAutoCreate()) + this.start = new IntegerType(); // bb + return this.start; + } + + public boolean hasStartElement() { + return this.start != null && !this.start.isEmpty(); + } + + public boolean hasStart() { + return this.start != null && !this.start.isEmpty(); + } + + /** + * @param value {@link #start} (0-based start position (inclusive) of the variation on the reference sequence.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public SequenceVariationComponent setStartElement(IntegerType value) { + this.start = value; + return this; + } + + /** + * @return 0-based start position (inclusive) of the variation on the reference sequence. + */ + public int getStart() { + return this.start == null || this.start.isEmpty() ? 0 : this.start.getValue(); + } + + /** + * @param value 0-based start position (inclusive) of the variation on the reference sequence. + */ + public SequenceVariationComponent setStart(int value) { + if (this.start == null) + this.start = new IntegerType(); + this.start.setValue(value); + return this; + } + + /** + * @return {@link #end} (0-based end position (exclusive) of the variation on the reference sequence.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public IntegerType getEndElement() { + if (this.end == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceVariationComponent.end"); + else if (Configuration.doAutoCreate()) + this.end = new IntegerType(); // bb + return this.end; + } + + public boolean hasEndElement() { + return this.end != null && !this.end.isEmpty(); + } + + public boolean hasEnd() { + return this.end != null && !this.end.isEmpty(); + } + + /** + * @param value {@link #end} (0-based end position (exclusive) of the variation on the reference sequence.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public SequenceVariationComponent setEndElement(IntegerType value) { + this.end = value; + return this; + } + + /** + * @return 0-based end position (exclusive) of the variation on the reference sequence. + */ + public int getEnd() { + return this.end == null || this.end.isEmpty() ? 0 : this.end.getValue(); + } + + /** + * @param value 0-based end position (exclusive) of the variation on the reference sequence. + */ + public SequenceVariationComponent setEnd(int value) { + if (this.end == null) + this.end = new IntegerType(); + this.end.setValue(value); + return this; + } + + /** + * @return {@link #observedAllele} (Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand.). This is the underlying object with id, value and extensions. The accessor "getObservedAllele" gives direct access to the value + */ + public StringType getObservedAlleleElement() { + if (this.observedAllele == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceVariationComponent.observedAllele"); + else if (Configuration.doAutoCreate()) + this.observedAllele = new StringType(); // bb + return this.observedAllele; + } + + public boolean hasObservedAlleleElement() { + return this.observedAllele != null && !this.observedAllele.isEmpty(); + } + + public boolean hasObservedAllele() { + return this.observedAllele != null && !this.observedAllele.isEmpty(); + } + + /** + * @param value {@link #observedAllele} (Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand.). This is the underlying object with id, value and extensions. The accessor "getObservedAllele" gives direct access to the value + */ + public SequenceVariationComponent setObservedAlleleElement(StringType value) { + this.observedAllele = value; + return this; + } + + /** + * @return Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. + */ + public String getObservedAllele() { + return this.observedAllele == null ? null : this.observedAllele.getValue(); + } + + /** + * @param value Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. + */ + public SequenceVariationComponent setObservedAllele(String value) { + if (Utilities.noString(value)) + this.observedAllele = null; + else { + if (this.observedAllele == null) + this.observedAllele = new StringType(); + this.observedAllele.setValue(value); + } + return this; + } + + /** + * @return {@link #referenceAllele} (Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand.). This is the underlying object with id, value and extensions. The accessor "getReferenceAllele" gives direct access to the value + */ + public StringType getReferenceAlleleElement() { + if (this.referenceAllele == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceVariationComponent.referenceAllele"); + else if (Configuration.doAutoCreate()) + this.referenceAllele = new StringType(); // bb + return this.referenceAllele; + } + + public boolean hasReferenceAlleleElement() { + return this.referenceAllele != null && !this.referenceAllele.isEmpty(); + } + + public boolean hasReferenceAllele() { + return this.referenceAllele != null && !this.referenceAllele.isEmpty(); + } + + /** + * @param value {@link #referenceAllele} (Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand.). This is the underlying object with id, value and extensions. The accessor "getReferenceAllele" gives direct access to the value + */ + public SequenceVariationComponent setReferenceAlleleElement(StringType value) { + this.referenceAllele = value; + return this; + } + + /** + * @return Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. + */ + public String getReferenceAllele() { + return this.referenceAllele == null ? null : this.referenceAllele.getValue(); + } + + /** + * @param value Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. + */ + public SequenceVariationComponent setReferenceAllele(String value) { + if (Utilities.noString(value)) + this.referenceAllele = null; + else { + if (this.referenceAllele == null) + this.referenceAllele = new StringType(); + this.referenceAllele.setValue(value); + } + return this; + } + + /** + * @return {@link #cigar} (Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).). This is the underlying object with id, value and extensions. The accessor "getCigar" gives direct access to the value + */ + public StringType getCigarElement() { + if (this.cigar == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceVariationComponent.cigar"); + else if (Configuration.doAutoCreate()) + this.cigar = new StringType(); // bb + return this.cigar; + } + + public boolean hasCigarElement() { + return this.cigar != null && !this.cigar.isEmpty(); + } + + public boolean hasCigar() { + return this.cigar != null && !this.cigar.isEmpty(); + } + + /** + * @param value {@link #cigar} (Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).). This is the underlying object with id, value and extensions. The accessor "getCigar" gives direct access to the value + */ + public SequenceVariationComponent setCigarElement(StringType value) { + this.cigar = value; + return this; + } + + /** + * @return Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm). + */ + public String getCigar() { + return this.cigar == null ? null : this.cigar.getValue(); + } + + /** + * @param value Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm). + */ + public SequenceVariationComponent setCigar(String value) { + if (Utilities.noString(value)) + this.cigar = null; + else { + if (this.cigar == null) + this.cigar = new StringType(); + this.cigar.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("start", "integer", "0-based start position (inclusive) of the variation on the reference sequence.", 0, java.lang.Integer.MAX_VALUE, start)); + childrenList.add(new Property("end", "integer", "0-based end position (exclusive) of the variation on the reference sequence.", 0, java.lang.Integer.MAX_VALUE, end)); + childrenList.add(new Property("observedAllele", "string", "Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand.", 0, java.lang.Integer.MAX_VALUE, observedAllele)); + childrenList.add(new Property("referenceAllele", "string", "Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand.", 0, java.lang.Integer.MAX_VALUE, referenceAllele)); + childrenList.add(new Property("cigar", "string", "Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).", 0, java.lang.Integer.MAX_VALUE, cigar)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("start")) + this.start = castToInteger(value); // IntegerType + else if (name.equals("end")) + this.end = castToInteger(value); // IntegerType + else if (name.equals("observedAllele")) + this.observedAllele = castToString(value); // StringType + else if (name.equals("referenceAllele")) + this.referenceAllele = castToString(value); // StringType + else if (name.equals("cigar")) + this.cigar = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("start")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.start"); + } + else if (name.equals("end")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.end"); + } + else if (name.equals("observedAllele")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.observedAllele"); + } + else if (name.equals("referenceAllele")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.referenceAllele"); + } + else if (name.equals("cigar")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.cigar"); + } + else + return super.addChild(name); + } + + public SequenceVariationComponent copy() { + SequenceVariationComponent dst = new SequenceVariationComponent(); + copyValues(dst); + dst.start = start == null ? null : start.copy(); + dst.end = end == null ? null : end.copy(); + dst.observedAllele = observedAllele == null ? null : observedAllele.copy(); + dst.referenceAllele = referenceAllele == null ? null : referenceAllele.copy(); + dst.cigar = cigar == null ? null : cigar.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SequenceVariationComponent)) + return false; + SequenceVariationComponent o = (SequenceVariationComponent) other; + return compareDeep(start, o.start, true) && compareDeep(end, o.end, true) && compareDeep(observedAllele, o.observedAllele, true) + && compareDeep(referenceAllele, o.referenceAllele, true) && compareDeep(cigar, o.cigar, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SequenceVariationComponent)) + return false; + SequenceVariationComponent o = (SequenceVariationComponent) other; + return compareValues(start, o.start, true) && compareValues(end, o.end, true) && compareValues(observedAllele, o.observedAllele, true) + && compareValues(referenceAllele, o.referenceAllele, true) && compareValues(cigar, o.cigar, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( start, end, observedAllele, referenceAllele + , cigar); + } + + public String fhirType() { + return "Sequence.variation"; } @@ -463,13 +1014,13 @@ public class Sequence extends DomainResource { protected Quantity score; /** - * Platform. + * Method for quality. */ - @Child(name = "platform", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Platform", formalDefinition="Platform." ) - protected StringType platform; + @Child(name = "method", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Method for quality", formalDefinition="Method for quality." ) + protected StringType method; - private static final long serialVersionUID = 1391681700L; + private static final long serialVersionUID = -1046665930L; /** * Constructor @@ -593,50 +1144,50 @@ public class Sequence extends DomainResource { } /** - * @return {@link #platform} (Platform.). This is the underlying object with id, value and extensions. The accessor "getPlatform" gives direct access to the value + * @return {@link #method} (Method for quality.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value */ - public StringType getPlatformElement() { - if (this.platform == null) + public StringType getMethodElement() { + if (this.method == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SequenceQualityComponent.platform"); + throw new Error("Attempt to auto-create SequenceQualityComponent.method"); else if (Configuration.doAutoCreate()) - this.platform = new StringType(); // bb - return this.platform; + this.method = new StringType(); // bb + return this.method; } - public boolean hasPlatformElement() { - return this.platform != null && !this.platform.isEmpty(); + public boolean hasMethodElement() { + return this.method != null && !this.method.isEmpty(); } - public boolean hasPlatform() { - return this.platform != null && !this.platform.isEmpty(); + public boolean hasMethod() { + return this.method != null && !this.method.isEmpty(); } /** - * @param value {@link #platform} (Platform.). This is the underlying object with id, value and extensions. The accessor "getPlatform" gives direct access to the value + * @param value {@link #method} (Method for quality.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value */ - public SequenceQualityComponent setPlatformElement(StringType value) { - this.platform = value; + public SequenceQualityComponent setMethodElement(StringType value) { + this.method = value; return this; } /** - * @return Platform. + * @return Method for quality. */ - public String getPlatform() { - return this.platform == null ? null : this.platform.getValue(); + public String getMethod() { + return this.method == null ? null : this.method.getValue(); } /** - * @param value Platform. + * @param value Method for quality. */ - public SequenceQualityComponent setPlatform(String value) { + public SequenceQualityComponent setMethod(String value) { if (Utilities.noString(value)) - this.platform = null; + this.method = null; else { - if (this.platform == null) - this.platform = new StringType(); - this.platform.setValue(value); + if (this.method == null) + this.method = new StringType(); + this.method.setValue(value); } return this; } @@ -646,7 +1197,7 @@ public class Sequence extends DomainResource { childrenList.add(new Property("start", "integer", "0-based start position (inclusive) of the sequence.", 0, java.lang.Integer.MAX_VALUE, start)); childrenList.add(new Property("end", "integer", "0-based end position (exclusive) of the sequence.", 0, java.lang.Integer.MAX_VALUE, end)); childrenList.add(new Property("score", "Quantity", "Quality score.", 0, java.lang.Integer.MAX_VALUE, score)); - childrenList.add(new Property("platform", "string", "Platform.", 0, java.lang.Integer.MAX_VALUE, platform)); + childrenList.add(new Property("method", "string", "Method for quality.", 0, java.lang.Integer.MAX_VALUE, method)); } @Override @@ -657,8 +1208,8 @@ public class Sequence extends DomainResource { this.end = castToInteger(value); // IntegerType else if (name.equals("score")) this.score = castToQuantity(value); // Quantity - else if (name.equals("platform")) - this.platform = castToString(value); // StringType + else if (name.equals("method")) + this.method = castToString(value); // StringType else super.setProperty(name, value); } @@ -675,8 +1226,8 @@ public class Sequence extends DomainResource { this.score = new Quantity(); return this.score; } - else if (name.equals("platform")) { - throw new FHIRException("Cannot call addChild on a primitive type Sequence.platform"); + else if (name.equals("method")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.method"); } else return super.addChild(name); @@ -688,7 +1239,7 @@ public class Sequence extends DomainResource { dst.start = start == null ? null : start.copy(); dst.end = end == null ? null : end.copy(); dst.score = score == null ? null : score.copy(); - dst.platform = platform == null ? null : platform.copy(); + dst.method = method == null ? null : method.copy(); return dst; } @@ -700,7 +1251,7 @@ public class Sequence extends DomainResource { return false; SequenceQualityComponent o = (SequenceQualityComponent) other; return compareDeep(start, o.start, true) && compareDeep(end, o.end, true) && compareDeep(score, o.score, true) - && compareDeep(platform, o.platform, true); + && compareDeep(method, o.method, true); } @Override @@ -710,13 +1261,12 @@ public class Sequence extends DomainResource { if (!(other instanceof SequenceQualityComponent)) return false; SequenceQualityComponent o = (SequenceQualityComponent) other; - return compareValues(start, o.start, true) && compareValues(end, o.end, true) && compareValues(platform, o.platform, true) + return compareValues(start, o.start, true) && compareValues(end, o.end, true) && compareValues(method, o.method, true) ; } public boolean isEmpty() { - return super.isEmpty() && (start == null || start.isEmpty()) && (end == null || end.isEmpty()) - && (score == null || score.isEmpty()) && (platform == null || platform.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( start, end, score, method); } public String fhirType() { @@ -724,302 +1274,39 @@ public class Sequence extends DomainResource { } - } - - @Block() - public static class SequenceChipComponent extends BackboneElement implements IBaseBackboneElement { - /** - * Chip id. - */ - @Child(name = "chipId", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Chip id", formalDefinition="Chip id." ) - protected StringType chipId; - - /** - * Chip manufacturer id. - */ - @Child(name = "manufacturerId", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Chip manufacturer id", formalDefinition="Chip manufacturer id." ) - protected StringType manufacturerId; - - /** - * Chip version. - */ - @Child(name = "version", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Chip version", formalDefinition="Chip version." ) - protected StringType version; - - private static final long serialVersionUID = 1437362028L; - - /** - * Constructor - */ - public SequenceChipComponent() { - super(); - } - - /** - * @return {@link #chipId} (Chip id.). This is the underlying object with id, value and extensions. The accessor "getChipId" gives direct access to the value - */ - public StringType getChipIdElement() { - if (this.chipId == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SequenceChipComponent.chipId"); - else if (Configuration.doAutoCreate()) - this.chipId = new StringType(); // bb - return this.chipId; - } - - public boolean hasChipIdElement() { - return this.chipId != null && !this.chipId.isEmpty(); - } - - public boolean hasChipId() { - return this.chipId != null && !this.chipId.isEmpty(); - } - - /** - * @param value {@link #chipId} (Chip id.). This is the underlying object with id, value and extensions. The accessor "getChipId" gives direct access to the value - */ - public SequenceChipComponent setChipIdElement(StringType value) { - this.chipId = value; - return this; - } - - /** - * @return Chip id. - */ - public String getChipId() { - return this.chipId == null ? null : this.chipId.getValue(); - } - - /** - * @param value Chip id. - */ - public SequenceChipComponent setChipId(String value) { - if (Utilities.noString(value)) - this.chipId = null; - else { - if (this.chipId == null) - this.chipId = new StringType(); - this.chipId.setValue(value); - } - return this; - } - - /** - * @return {@link #manufacturerId} (Chip manufacturer id.). This is the underlying object with id, value and extensions. The accessor "getManufacturerId" gives direct access to the value - */ - public StringType getManufacturerIdElement() { - if (this.manufacturerId == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SequenceChipComponent.manufacturerId"); - else if (Configuration.doAutoCreate()) - this.manufacturerId = new StringType(); // bb - return this.manufacturerId; - } - - public boolean hasManufacturerIdElement() { - return this.manufacturerId != null && !this.manufacturerId.isEmpty(); - } - - public boolean hasManufacturerId() { - return this.manufacturerId != null && !this.manufacturerId.isEmpty(); - } - - /** - * @param value {@link #manufacturerId} (Chip manufacturer id.). This is the underlying object with id, value and extensions. The accessor "getManufacturerId" gives direct access to the value - */ - public SequenceChipComponent setManufacturerIdElement(StringType value) { - this.manufacturerId = value; - return this; - } - - /** - * @return Chip manufacturer id. - */ - public String getManufacturerId() { - return this.manufacturerId == null ? null : this.manufacturerId.getValue(); - } - - /** - * @param value Chip manufacturer id. - */ - public SequenceChipComponent setManufacturerId(String value) { - if (Utilities.noString(value)) - this.manufacturerId = null; - else { - if (this.manufacturerId == null) - this.manufacturerId = new StringType(); - this.manufacturerId.setValue(value); - } - return this; - } - - /** - * @return {@link #version} (Chip version.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value - */ - public StringType getVersionElement() { - if (this.version == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SequenceChipComponent.version"); - else if (Configuration.doAutoCreate()) - this.version = new StringType(); // bb - return this.version; - } - - public boolean hasVersionElement() { - return this.version != null && !this.version.isEmpty(); - } - - public boolean hasVersion() { - return this.version != null && !this.version.isEmpty(); - } - - /** - * @param value {@link #version} (Chip version.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value - */ - public SequenceChipComponent setVersionElement(StringType value) { - this.version = value; - return this; - } - - /** - * @return Chip version. - */ - public String getVersion() { - return this.version == null ? null : this.version.getValue(); - } - - /** - * @param value Chip version. - */ - public SequenceChipComponent setVersion(String value) { - if (Utilities.noString(value)) - this.version = null; - else { - if (this.version == null) - this.version = new StringType(); - this.version.setValue(value); - } - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("chipId", "string", "Chip id.", 0, java.lang.Integer.MAX_VALUE, chipId)); - childrenList.add(new Property("manufacturerId", "string", "Chip manufacturer id.", 0, java.lang.Integer.MAX_VALUE, manufacturerId)); - childrenList.add(new Property("version", "string", "Chip version.", 0, java.lang.Integer.MAX_VALUE, version)); - } - - @Override - public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("chipId")) - this.chipId = castToString(value); // StringType - else if (name.equals("manufacturerId")) - this.manufacturerId = castToString(value); // StringType - else if (name.equals("version")) - this.version = castToString(value); // StringType - else - super.setProperty(name, value); - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("chipId")) { - throw new FHIRException("Cannot call addChild on a primitive type Sequence.chipId"); - } - else if (name.equals("manufacturerId")) { - throw new FHIRException("Cannot call addChild on a primitive type Sequence.manufacturerId"); - } - else if (name.equals("version")) { - throw new FHIRException("Cannot call addChild on a primitive type Sequence.version"); - } - else - return super.addChild(name); - } - - public SequenceChipComponent copy() { - SequenceChipComponent dst = new SequenceChipComponent(); - copyValues(dst); - dst.chipId = chipId == null ? null : chipId.copy(); - dst.manufacturerId = manufacturerId == null ? null : manufacturerId.copy(); - dst.version = version == null ? null : version.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof SequenceChipComponent)) - return false; - SequenceChipComponent o = (SequenceChipComponent) other; - return compareDeep(chipId, o.chipId, true) && compareDeep(manufacturerId, o.manufacturerId, true) - && compareDeep(version, o.version, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof SequenceChipComponent)) - return false; - SequenceChipComponent o = (SequenceChipComponent) other; - return compareValues(chipId, o.chipId, true) && compareValues(manufacturerId, o.manufacturerId, true) - && compareValues(version, o.version, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (chipId == null || chipId.isEmpty()) && (manufacturerId == null || manufacturerId.isEmpty()) - && (version == null || version.isEmpty()); - } - - public String fhirType() { - return "Sequence.chip"; - - } - } @Block() public static class SequenceRepositoryComponent extends BackboneElement implements IBaseBackboneElement { /** - * URI of a GA4GH repository which contains further details about the genetics data. + * URI of an external repository which contains further details about the genetics data. */ @Child(name = "url", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="URI of the repository", formalDefinition="URI of a GA4GH repository which contains further details about the genetics data." ) + @Description(shortDefinition="URI of the repository", formalDefinition="URI of an external repository which contains further details about the genetics data." ) protected UriType url; /** - * URI of a GA4GH repository which contains further details about the genetics data. + * URI of an external repository which contains further details about the genetics data. */ @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Name of the repository", formalDefinition="URI of a GA4GH repository which contains further details about the genetics data." ) + @Description(shortDefinition="Name of the repository", formalDefinition="URI of an external repository which contains further details about the genetics data." ) protected StringType name; /** - * URI of the page containing information about the structure of the repository. + * Id of the variation in this external repository. */ - @Child(name = "structure", type = {UriType.class}, order=3, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="URI of the page containing information about the structure of the repository", formalDefinition="URI of the page containing information about the structure of the repository." ) - protected UriType structure; - - /** - * Id of the GA4GH call set that matches identity of patient. A CallSet in GA4GH represents an individual. - */ - @Child(name = "variantId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Id of a GA4GH variant", formalDefinition="Id of the GA4GH call set that matches identity of patient. A CallSet in GA4GH represents an individual." ) + @Child(name = "variantId", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Id of the variant", formalDefinition="Id of the variation in this external repository." ) protected StringType variantId; /** - * Id of the GA4GH read group from which details about the sequence can be found. A read group in GA4GH represents a set of DNA reads processed the same way by the sequencer. + * Id of the read in this external repository. */ - @Child(name = "readGroupSetId", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Id of a GA4GH read group", formalDefinition="Id of the GA4GH read group from which details about the sequence can be found. A read group in GA4GH represents a set of DNA reads processed the same way by the sequencer." ) - protected StringType readGroupSetId; + @Child(name = "readId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Id of the read", formalDefinition="Id of the read in this external repository." ) + protected StringType readId; - private static final long serialVersionUID = -1249242292L; + private static final long serialVersionUID = 1218159360L; /** * Constructor @@ -1029,7 +1316,7 @@ public class Sequence extends DomainResource { } /** - * @return {@link #url} (URI of a GA4GH repository which contains further details about the genetics data.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + * @return {@link #url} (URI of an external repository which contains further details about the genetics data.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value */ public UriType getUrlElement() { if (this.url == null) @@ -1049,7 +1336,7 @@ public class Sequence extends DomainResource { } /** - * @param value {@link #url} (URI of a GA4GH repository which contains further details about the genetics data.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + * @param value {@link #url} (URI of an external repository which contains further details about the genetics data.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value */ public SequenceRepositoryComponent setUrlElement(UriType value) { this.url = value; @@ -1057,14 +1344,14 @@ public class Sequence extends DomainResource { } /** - * @return URI of a GA4GH repository which contains further details about the genetics data. + * @return URI of an external repository which contains further details about the genetics data. */ public String getUrl() { return this.url == null ? null : this.url.getValue(); } /** - * @param value URI of a GA4GH repository which contains further details about the genetics data. + * @param value URI of an external repository which contains further details about the genetics data. */ public SequenceRepositoryComponent setUrl(String value) { if (Utilities.noString(value)) @@ -1078,7 +1365,7 @@ public class Sequence extends DomainResource { } /** - * @return {@link #name} (URI of a GA4GH repository which contains further details about the genetics data.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + * @return {@link #name} (URI of an external repository which contains further details about the genetics data.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ public StringType getNameElement() { if (this.name == null) @@ -1098,7 +1385,7 @@ public class Sequence extends DomainResource { } /** - * @param value {@link #name} (URI of a GA4GH repository which contains further details about the genetics data.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + * @param value {@link #name} (URI of an external repository which contains further details about the genetics data.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value */ public SequenceRepositoryComponent setNameElement(StringType value) { this.name = value; @@ -1106,14 +1393,14 @@ public class Sequence extends DomainResource { } /** - * @return URI of a GA4GH repository which contains further details about the genetics data. + * @return URI of an external repository which contains further details about the genetics data. */ public String getName() { return this.name == null ? null : this.name.getValue(); } /** - * @param value URI of a GA4GH repository which contains further details about the genetics data. + * @param value URI of an external repository which contains further details about the genetics data. */ public SequenceRepositoryComponent setName(String value) { if (Utilities.noString(value)) @@ -1127,56 +1414,7 @@ public class Sequence extends DomainResource { } /** - * @return {@link #structure} (URI of the page containing information about the structure of the repository.). This is the underlying object with id, value and extensions. The accessor "getStructure" gives direct access to the value - */ - public UriType getStructureElement() { - if (this.structure == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SequenceRepositoryComponent.structure"); - else if (Configuration.doAutoCreate()) - this.structure = new UriType(); // bb - return this.structure; - } - - public boolean hasStructureElement() { - return this.structure != null && !this.structure.isEmpty(); - } - - public boolean hasStructure() { - return this.structure != null && !this.structure.isEmpty(); - } - - /** - * @param value {@link #structure} (URI of the page containing information about the structure of the repository.). This is the underlying object with id, value and extensions. The accessor "getStructure" gives direct access to the value - */ - public SequenceRepositoryComponent setStructureElement(UriType value) { - this.structure = value; - return this; - } - - /** - * @return URI of the page containing information about the structure of the repository. - */ - public String getStructure() { - return this.structure == null ? null : this.structure.getValue(); - } - - /** - * @param value URI of the page containing information about the structure of the repository. - */ - public SequenceRepositoryComponent setStructure(String value) { - if (Utilities.noString(value)) - this.structure = null; - else { - if (this.structure == null) - this.structure = new UriType(); - this.structure.setValue(value); - } - return this; - } - - /** - * @return {@link #variantId} (Id of the GA4GH call set that matches identity of patient. A CallSet in GA4GH represents an individual.). This is the underlying object with id, value and extensions. The accessor "getVariantId" gives direct access to the value + * @return {@link #variantId} (Id of the variation in this external repository.). This is the underlying object with id, value and extensions. The accessor "getVariantId" gives direct access to the value */ public StringType getVariantIdElement() { if (this.variantId == null) @@ -1196,7 +1434,7 @@ public class Sequence extends DomainResource { } /** - * @param value {@link #variantId} (Id of the GA4GH call set that matches identity of patient. A CallSet in GA4GH represents an individual.). This is the underlying object with id, value and extensions. The accessor "getVariantId" gives direct access to the value + * @param value {@link #variantId} (Id of the variation in this external repository.). This is the underlying object with id, value and extensions. The accessor "getVariantId" gives direct access to the value */ public SequenceRepositoryComponent setVariantIdElement(StringType value) { this.variantId = value; @@ -1204,14 +1442,14 @@ public class Sequence extends DomainResource { } /** - * @return Id of the GA4GH call set that matches identity of patient. A CallSet in GA4GH represents an individual. + * @return Id of the variation in this external repository. */ public String getVariantId() { return this.variantId == null ? null : this.variantId.getValue(); } /** - * @param value Id of the GA4GH call set that matches identity of patient. A CallSet in GA4GH represents an individual. + * @param value Id of the variation in this external repository. */ public SequenceRepositoryComponent setVariantId(String value) { if (Utilities.noString(value)) @@ -1225,61 +1463,60 @@ public class Sequence extends DomainResource { } /** - * @return {@link #readGroupSetId} (Id of the GA4GH read group from which details about the sequence can be found. A read group in GA4GH represents a set of DNA reads processed the same way by the sequencer.). This is the underlying object with id, value and extensions. The accessor "getReadGroupSetId" gives direct access to the value + * @return {@link #readId} (Id of the read in this external repository.). This is the underlying object with id, value and extensions. The accessor "getReadId" gives direct access to the value */ - public StringType getReadGroupSetIdElement() { - if (this.readGroupSetId == null) + public StringType getReadIdElement() { + if (this.readId == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create SequenceRepositoryComponent.readGroupSetId"); + throw new Error("Attempt to auto-create SequenceRepositoryComponent.readId"); else if (Configuration.doAutoCreate()) - this.readGroupSetId = new StringType(); // bb - return this.readGroupSetId; + this.readId = new StringType(); // bb + return this.readId; } - public boolean hasReadGroupSetIdElement() { - return this.readGroupSetId != null && !this.readGroupSetId.isEmpty(); + public boolean hasReadIdElement() { + return this.readId != null && !this.readId.isEmpty(); } - public boolean hasReadGroupSetId() { - return this.readGroupSetId != null && !this.readGroupSetId.isEmpty(); + public boolean hasReadId() { + return this.readId != null && !this.readId.isEmpty(); } /** - * @param value {@link #readGroupSetId} (Id of the GA4GH read group from which details about the sequence can be found. A read group in GA4GH represents a set of DNA reads processed the same way by the sequencer.). This is the underlying object with id, value and extensions. The accessor "getReadGroupSetId" gives direct access to the value + * @param value {@link #readId} (Id of the read in this external repository.). This is the underlying object with id, value and extensions. The accessor "getReadId" gives direct access to the value */ - public SequenceRepositoryComponent setReadGroupSetIdElement(StringType value) { - this.readGroupSetId = value; + public SequenceRepositoryComponent setReadIdElement(StringType value) { + this.readId = value; return this; } /** - * @return Id of the GA4GH read group from which details about the sequence can be found. A read group in GA4GH represents a set of DNA reads processed the same way by the sequencer. + * @return Id of the read in this external repository. */ - public String getReadGroupSetId() { - return this.readGroupSetId == null ? null : this.readGroupSetId.getValue(); + public String getReadId() { + return this.readId == null ? null : this.readId.getValue(); } /** - * @param value Id of the GA4GH read group from which details about the sequence can be found. A read group in GA4GH represents a set of DNA reads processed the same way by the sequencer. + * @param value Id of the read in this external repository. */ - public SequenceRepositoryComponent setReadGroupSetId(String value) { + public SequenceRepositoryComponent setReadId(String value) { if (Utilities.noString(value)) - this.readGroupSetId = null; + this.readId = null; else { - if (this.readGroupSetId == null) - this.readGroupSetId = new StringType(); - this.readGroupSetId.setValue(value); + if (this.readId == null) + this.readId = new StringType(); + this.readId.setValue(value); } return this; } protected void listChildren(List childrenList) { super.listChildren(childrenList); - childrenList.add(new Property("url", "uri", "URI of a GA4GH repository which contains further details about the genetics data.", 0, java.lang.Integer.MAX_VALUE, url)); - childrenList.add(new Property("name", "string", "URI of a GA4GH repository which contains further details about the genetics data.", 0, java.lang.Integer.MAX_VALUE, name)); - childrenList.add(new Property("structure", "uri", "URI of the page containing information about the structure of the repository.", 0, java.lang.Integer.MAX_VALUE, structure)); - childrenList.add(new Property("variantId", "string", "Id of the GA4GH call set that matches identity of patient. A CallSet in GA4GH represents an individual.", 0, java.lang.Integer.MAX_VALUE, variantId)); - childrenList.add(new Property("readGroupSetId", "string", "Id of the GA4GH read group from which details about the sequence can be found. A read group in GA4GH represents a set of DNA reads processed the same way by the sequencer.", 0, java.lang.Integer.MAX_VALUE, readGroupSetId)); + childrenList.add(new Property("url", "uri", "URI of an external repository which contains further details about the genetics data.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("name", "string", "URI of an external repository which contains further details about the genetics data.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("variantId", "string", "Id of the variation in this external repository.", 0, java.lang.Integer.MAX_VALUE, variantId)); + childrenList.add(new Property("readId", "string", "Id of the read in this external repository.", 0, java.lang.Integer.MAX_VALUE, readId)); } @Override @@ -1288,12 +1525,10 @@ public class Sequence extends DomainResource { this.url = castToUri(value); // UriType else if (name.equals("name")) this.name = castToString(value); // StringType - else if (name.equals("structure")) - this.structure = castToUri(value); // UriType else if (name.equals("variantId")) this.variantId = castToString(value); // StringType - else if (name.equals("readGroupSetId")) - this.readGroupSetId = castToString(value); // StringType + else if (name.equals("readId")) + this.readId = castToString(value); // StringType else super.setProperty(name, value); } @@ -1306,14 +1541,11 @@ public class Sequence extends DomainResource { else if (name.equals("name")) { throw new FHIRException("Cannot call addChild on a primitive type Sequence.name"); } - else if (name.equals("structure")) { - throw new FHIRException("Cannot call addChild on a primitive type Sequence.structure"); - } else if (name.equals("variantId")) { throw new FHIRException("Cannot call addChild on a primitive type Sequence.variantId"); } - else if (name.equals("readGroupSetId")) { - throw new FHIRException("Cannot call addChild on a primitive type Sequence.readGroupSetId"); + else if (name.equals("readId")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.readId"); } else return super.addChild(name); @@ -1324,9 +1556,8 @@ public class Sequence extends DomainResource { copyValues(dst); dst.url = url == null ? null : url.copy(); dst.name = name == null ? null : name.copy(); - dst.structure = structure == null ? null : structure.copy(); dst.variantId = variantId == null ? null : variantId.copy(); - dst.readGroupSetId = readGroupSetId == null ? null : readGroupSetId.copy(); + dst.readId = readId == null ? null : readId.copy(); return dst; } @@ -1337,9 +1568,8 @@ public class Sequence extends DomainResource { if (!(other instanceof SequenceRepositoryComponent)) return false; SequenceRepositoryComponent o = (SequenceRepositoryComponent) other; - return compareDeep(url, o.url, true) && compareDeep(name, o.name, true) && compareDeep(structure, o.structure, true) - && compareDeep(variantId, o.variantId, true) && compareDeep(readGroupSetId, o.readGroupSetId, true) - ; + return compareDeep(url, o.url, true) && compareDeep(name, o.name, true) && compareDeep(variantId, o.variantId, true) + && compareDeep(readId, o.readId, true); } @Override @@ -1349,15 +1579,13 @@ public class Sequence extends DomainResource { if (!(other instanceof SequenceRepositoryComponent)) return false; SequenceRepositoryComponent o = (SequenceRepositoryComponent) other; - return compareValues(url, o.url, true) && compareValues(name, o.name, true) && compareValues(structure, o.structure, true) - && compareValues(variantId, o.variantId, true) && compareValues(readGroupSetId, o.readGroupSetId, true) - ; + return compareValues(url, o.url, true) && compareValues(name, o.name, true) && compareValues(variantId, o.variantId, true) + && compareValues(readId, o.readId, true); } public boolean isEmpty() { - return super.isEmpty() && (url == null || url.isEmpty()) && (name == null || name.isEmpty()) - && (structure == null || structure.isEmpty()) && (variantId == null || variantId.isEmpty()) - && (readGroupSetId == null || readGroupSetId.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, name, variantId, readId + ); } public String fhirType() { @@ -1365,6 +1593,719 @@ public class Sequence extends DomainResource { } + } + + @Block() + public static class SequenceStructureVariationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Precision of boundaries. + */ + @Child(name = "precisionOfBoundaries", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Precision of boundaries", formalDefinition="Precision of boundaries." ) + protected StringType precisionOfBoundaries; + + /** + * Structural Variant reported aCGH ratio. + */ + @Child(name = "reportedaCGHRatio", type = {DecimalType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Structural Variant reported aCGH ratio", formalDefinition="Structural Variant reported aCGH ratio." ) + protected DecimalType reportedaCGHRatio; + + /** + * Structural Variant Length. + */ + @Child(name = "length", type = {IntegerType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Structural Variant Length", formalDefinition="Structural Variant Length." ) + protected IntegerType length; + + /** + * Structural variant outer. + */ + @Child(name = "outer", type = {}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="", formalDefinition="Structural variant outer." ) + protected SequenceStructureVariationOuterComponent outer; + + /** + * Structural variant inner. + */ + @Child(name = "inner", type = {}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="", formalDefinition="Structural variant inner." ) + protected SequenceStructureVariationInnerComponent inner; + + private static final long serialVersionUID = -1615654736L; + + /** + * Constructor + */ + public SequenceStructureVariationComponent() { + super(); + } + + /** + * @return {@link #precisionOfBoundaries} (Precision of boundaries.). This is the underlying object with id, value and extensions. The accessor "getPrecisionOfBoundaries" gives direct access to the value + */ + public StringType getPrecisionOfBoundariesElement() { + if (this.precisionOfBoundaries == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariationComponent.precisionOfBoundaries"); + else if (Configuration.doAutoCreate()) + this.precisionOfBoundaries = new StringType(); // bb + return this.precisionOfBoundaries; + } + + public boolean hasPrecisionOfBoundariesElement() { + return this.precisionOfBoundaries != null && !this.precisionOfBoundaries.isEmpty(); + } + + public boolean hasPrecisionOfBoundaries() { + return this.precisionOfBoundaries != null && !this.precisionOfBoundaries.isEmpty(); + } + + /** + * @param value {@link #precisionOfBoundaries} (Precision of boundaries.). This is the underlying object with id, value and extensions. The accessor "getPrecisionOfBoundaries" gives direct access to the value + */ + public SequenceStructureVariationComponent setPrecisionOfBoundariesElement(StringType value) { + this.precisionOfBoundaries = value; + return this; + } + + /** + * @return Precision of boundaries. + */ + public String getPrecisionOfBoundaries() { + return this.precisionOfBoundaries == null ? null : this.precisionOfBoundaries.getValue(); + } + + /** + * @param value Precision of boundaries. + */ + public SequenceStructureVariationComponent setPrecisionOfBoundaries(String value) { + if (Utilities.noString(value)) + this.precisionOfBoundaries = null; + else { + if (this.precisionOfBoundaries == null) + this.precisionOfBoundaries = new StringType(); + this.precisionOfBoundaries.setValue(value); + } + return this; + } + + /** + * @return {@link #reportedaCGHRatio} (Structural Variant reported aCGH ratio.). This is the underlying object with id, value and extensions. The accessor "getReportedaCGHRatio" gives direct access to the value + */ + public DecimalType getReportedaCGHRatioElement() { + if (this.reportedaCGHRatio == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariationComponent.reportedaCGHRatio"); + else if (Configuration.doAutoCreate()) + this.reportedaCGHRatio = new DecimalType(); // bb + return this.reportedaCGHRatio; + } + + public boolean hasReportedaCGHRatioElement() { + return this.reportedaCGHRatio != null && !this.reportedaCGHRatio.isEmpty(); + } + + public boolean hasReportedaCGHRatio() { + return this.reportedaCGHRatio != null && !this.reportedaCGHRatio.isEmpty(); + } + + /** + * @param value {@link #reportedaCGHRatio} (Structural Variant reported aCGH ratio.). This is the underlying object with id, value and extensions. The accessor "getReportedaCGHRatio" gives direct access to the value + */ + public SequenceStructureVariationComponent setReportedaCGHRatioElement(DecimalType value) { + this.reportedaCGHRatio = value; + return this; + } + + /** + * @return Structural Variant reported aCGH ratio. + */ + public BigDecimal getReportedaCGHRatio() { + return this.reportedaCGHRatio == null ? null : this.reportedaCGHRatio.getValue(); + } + + /** + * @param value Structural Variant reported aCGH ratio. + */ + public SequenceStructureVariationComponent setReportedaCGHRatio(BigDecimal value) { + if (value == null) + this.reportedaCGHRatio = null; + else { + if (this.reportedaCGHRatio == null) + this.reportedaCGHRatio = new DecimalType(); + this.reportedaCGHRatio.setValue(value); + } + return this; + } + + /** + * @param value Structural Variant reported aCGH ratio. + */ + public SequenceStructureVariationComponent setReportedaCGHRatio(long value) { + this.reportedaCGHRatio = new DecimalType(); + this.reportedaCGHRatio.setValue(value); + return this; + } + + /** + * @param value Structural Variant reported aCGH ratio. + */ + public SequenceStructureVariationComponent setReportedaCGHRatio(double value) { + this.reportedaCGHRatio = new DecimalType(); + this.reportedaCGHRatio.setValue(value); + return this; + } + + /** + * @return {@link #length} (Structural Variant Length.). This is the underlying object with id, value and extensions. The accessor "getLength" gives direct access to the value + */ + public IntegerType getLengthElement() { + if (this.length == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariationComponent.length"); + else if (Configuration.doAutoCreate()) + this.length = new IntegerType(); // bb + return this.length; + } + + public boolean hasLengthElement() { + return this.length != null && !this.length.isEmpty(); + } + + public boolean hasLength() { + return this.length != null && !this.length.isEmpty(); + } + + /** + * @param value {@link #length} (Structural Variant Length.). This is the underlying object with id, value and extensions. The accessor "getLength" gives direct access to the value + */ + public SequenceStructureVariationComponent setLengthElement(IntegerType value) { + this.length = value; + return this; + } + + /** + * @return Structural Variant Length. + */ + public int getLength() { + return this.length == null || this.length.isEmpty() ? 0 : this.length.getValue(); + } + + /** + * @param value Structural Variant Length. + */ + public SequenceStructureVariationComponent setLength(int value) { + if (this.length == null) + this.length = new IntegerType(); + this.length.setValue(value); + return this; + } + + /** + * @return {@link #outer} (Structural variant outer.) + */ + public SequenceStructureVariationOuterComponent getOuter() { + if (this.outer == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariationComponent.outer"); + else if (Configuration.doAutoCreate()) + this.outer = new SequenceStructureVariationOuterComponent(); // cc + return this.outer; + } + + public boolean hasOuter() { + return this.outer != null && !this.outer.isEmpty(); + } + + /** + * @param value {@link #outer} (Structural variant outer.) + */ + public SequenceStructureVariationComponent setOuter(SequenceStructureVariationOuterComponent value) { + this.outer = value; + return this; + } + + /** + * @return {@link #inner} (Structural variant inner.) + */ + public SequenceStructureVariationInnerComponent getInner() { + if (this.inner == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariationComponent.inner"); + else if (Configuration.doAutoCreate()) + this.inner = new SequenceStructureVariationInnerComponent(); // cc + return this.inner; + } + + public boolean hasInner() { + return this.inner != null && !this.inner.isEmpty(); + } + + /** + * @param value {@link #inner} (Structural variant inner.) + */ + public SequenceStructureVariationComponent setInner(SequenceStructureVariationInnerComponent value) { + this.inner = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("precisionOfBoundaries", "string", "Precision of boundaries.", 0, java.lang.Integer.MAX_VALUE, precisionOfBoundaries)); + childrenList.add(new Property("reportedaCGHRatio", "decimal", "Structural Variant reported aCGH ratio.", 0, java.lang.Integer.MAX_VALUE, reportedaCGHRatio)); + childrenList.add(new Property("length", "integer", "Structural Variant Length.", 0, java.lang.Integer.MAX_VALUE, length)); + childrenList.add(new Property("outer", "", "Structural variant outer.", 0, java.lang.Integer.MAX_VALUE, outer)); + childrenList.add(new Property("inner", "", "Structural variant inner.", 0, java.lang.Integer.MAX_VALUE, inner)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("precisionOfBoundaries")) + this.precisionOfBoundaries = castToString(value); // StringType + else if (name.equals("reportedaCGHRatio")) + this.reportedaCGHRatio = castToDecimal(value); // DecimalType + else if (name.equals("length")) + this.length = castToInteger(value); // IntegerType + else if (name.equals("outer")) + this.outer = (SequenceStructureVariationOuterComponent) value; // SequenceStructureVariationOuterComponent + else if (name.equals("inner")) + this.inner = (SequenceStructureVariationInnerComponent) value; // SequenceStructureVariationInnerComponent + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("precisionOfBoundaries")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.precisionOfBoundaries"); + } + else if (name.equals("reportedaCGHRatio")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.reportedaCGHRatio"); + } + else if (name.equals("length")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.length"); + } + else if (name.equals("outer")) { + this.outer = new SequenceStructureVariationOuterComponent(); + return this.outer; + } + else if (name.equals("inner")) { + this.inner = new SequenceStructureVariationInnerComponent(); + return this.inner; + } + else + return super.addChild(name); + } + + public SequenceStructureVariationComponent copy() { + SequenceStructureVariationComponent dst = new SequenceStructureVariationComponent(); + copyValues(dst); + dst.precisionOfBoundaries = precisionOfBoundaries == null ? null : precisionOfBoundaries.copy(); + dst.reportedaCGHRatio = reportedaCGHRatio == null ? null : reportedaCGHRatio.copy(); + dst.length = length == null ? null : length.copy(); + dst.outer = outer == null ? null : outer.copy(); + dst.inner = inner == null ? null : inner.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SequenceStructureVariationComponent)) + return false; + SequenceStructureVariationComponent o = (SequenceStructureVariationComponent) other; + return compareDeep(precisionOfBoundaries, o.precisionOfBoundaries, true) && compareDeep(reportedaCGHRatio, o.reportedaCGHRatio, true) + && compareDeep(length, o.length, true) && compareDeep(outer, o.outer, true) && compareDeep(inner, o.inner, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SequenceStructureVariationComponent)) + return false; + SequenceStructureVariationComponent o = (SequenceStructureVariationComponent) other; + return compareValues(precisionOfBoundaries, o.precisionOfBoundaries, true) && compareValues(reportedaCGHRatio, o.reportedaCGHRatio, true) + && compareValues(length, o.length, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( precisionOfBoundaries, reportedaCGHRatio + , length, outer, inner); + } + + public String fhirType() { + return "Sequence.structureVariation"; + + } + + } + + @Block() + public static class SequenceStructureVariationOuterComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Structural Variant Outer Start-End. + */ + @Child(name = "start", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Structural Variant Outer Start-End", formalDefinition="Structural Variant Outer Start-End." ) + protected IntegerType start; + + /** + * Structural Variant Outer Start-End. + */ + @Child(name = "end", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Structural Variant Outer Start-End", formalDefinition="Structural Variant Outer Start-End." ) + protected IntegerType end; + + private static final long serialVersionUID = -1798864889L; + + /** + * Constructor + */ + public SequenceStructureVariationOuterComponent() { + super(); + } + + /** + * @return {@link #start} (Structural Variant Outer Start-End.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public IntegerType getStartElement() { + if (this.start == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariationOuterComponent.start"); + else if (Configuration.doAutoCreate()) + this.start = new IntegerType(); // bb + return this.start; + } + + public boolean hasStartElement() { + return this.start != null && !this.start.isEmpty(); + } + + public boolean hasStart() { + return this.start != null && !this.start.isEmpty(); + } + + /** + * @param value {@link #start} (Structural Variant Outer Start-End.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public SequenceStructureVariationOuterComponent setStartElement(IntegerType value) { + this.start = value; + return this; + } + + /** + * @return Structural Variant Outer Start-End. + */ + public int getStart() { + return this.start == null || this.start.isEmpty() ? 0 : this.start.getValue(); + } + + /** + * @param value Structural Variant Outer Start-End. + */ + public SequenceStructureVariationOuterComponent setStart(int value) { + if (this.start == null) + this.start = new IntegerType(); + this.start.setValue(value); + return this; + } + + /** + * @return {@link #end} (Structural Variant Outer Start-End.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public IntegerType getEndElement() { + if (this.end == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariationOuterComponent.end"); + else if (Configuration.doAutoCreate()) + this.end = new IntegerType(); // bb + return this.end; + } + + public boolean hasEndElement() { + return this.end != null && !this.end.isEmpty(); + } + + public boolean hasEnd() { + return this.end != null && !this.end.isEmpty(); + } + + /** + * @param value {@link #end} (Structural Variant Outer Start-End.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public SequenceStructureVariationOuterComponent setEndElement(IntegerType value) { + this.end = value; + return this; + } + + /** + * @return Structural Variant Outer Start-End. + */ + public int getEnd() { + return this.end == null || this.end.isEmpty() ? 0 : this.end.getValue(); + } + + /** + * @param value Structural Variant Outer Start-End. + */ + public SequenceStructureVariationOuterComponent setEnd(int value) { + if (this.end == null) + this.end = new IntegerType(); + this.end.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("start", "integer", "Structural Variant Outer Start-End.", 0, java.lang.Integer.MAX_VALUE, start)); + childrenList.add(new Property("end", "integer", "Structural Variant Outer Start-End.", 0, java.lang.Integer.MAX_VALUE, end)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("start")) + this.start = castToInteger(value); // IntegerType + else if (name.equals("end")) + this.end = castToInteger(value); // IntegerType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("start")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.start"); + } + else if (name.equals("end")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.end"); + } + else + return super.addChild(name); + } + + public SequenceStructureVariationOuterComponent copy() { + SequenceStructureVariationOuterComponent dst = new SequenceStructureVariationOuterComponent(); + copyValues(dst); + dst.start = start == null ? null : start.copy(); + dst.end = end == null ? null : end.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SequenceStructureVariationOuterComponent)) + return false; + SequenceStructureVariationOuterComponent o = (SequenceStructureVariationOuterComponent) other; + return compareDeep(start, o.start, true) && compareDeep(end, o.end, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SequenceStructureVariationOuterComponent)) + return false; + SequenceStructureVariationOuterComponent o = (SequenceStructureVariationOuterComponent) other; + return compareValues(start, o.start, true) && compareValues(end, o.end, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( start, end); + } + + public String fhirType() { + return "Sequence.structureVariation.outer"; + + } + + } + + @Block() + public static class SequenceStructureVariationInnerComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Structural Variant Inner Start-End. + */ + @Child(name = "start", type = {IntegerType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Structural Variant Inner Start-End", formalDefinition="Structural Variant Inner Start-End." ) + protected IntegerType start; + + /** + * Structural Variant Inner Start-End. + */ + @Child(name = "end", type = {IntegerType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Structural Variant Inner Start-End", formalDefinition="Structural Variant Inner Start-End." ) + protected IntegerType end; + + private static final long serialVersionUID = -1798864889L; + + /** + * Constructor + */ + public SequenceStructureVariationInnerComponent() { + super(); + } + + /** + * @return {@link #start} (Structural Variant Inner Start-End.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public IntegerType getStartElement() { + if (this.start == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariationInnerComponent.start"); + else if (Configuration.doAutoCreate()) + this.start = new IntegerType(); // bb + return this.start; + } + + public boolean hasStartElement() { + return this.start != null && !this.start.isEmpty(); + } + + public boolean hasStart() { + return this.start != null && !this.start.isEmpty(); + } + + /** + * @param value {@link #start} (Structural Variant Inner Start-End.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value + */ + public SequenceStructureVariationInnerComponent setStartElement(IntegerType value) { + this.start = value; + return this; + } + + /** + * @return Structural Variant Inner Start-End. + */ + public int getStart() { + return this.start == null || this.start.isEmpty() ? 0 : this.start.getValue(); + } + + /** + * @param value Structural Variant Inner Start-End. + */ + public SequenceStructureVariationInnerComponent setStart(int value) { + if (this.start == null) + this.start = new IntegerType(); + this.start.setValue(value); + return this; + } + + /** + * @return {@link #end} (Structural Variant Inner Start-End.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public IntegerType getEndElement() { + if (this.end == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SequenceStructureVariationInnerComponent.end"); + else if (Configuration.doAutoCreate()) + this.end = new IntegerType(); // bb + return this.end; + } + + public boolean hasEndElement() { + return this.end != null && !this.end.isEmpty(); + } + + public boolean hasEnd() { + return this.end != null && !this.end.isEmpty(); + } + + /** + * @param value {@link #end} (Structural Variant Inner Start-End.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value + */ + public SequenceStructureVariationInnerComponent setEndElement(IntegerType value) { + this.end = value; + return this; + } + + /** + * @return Structural Variant Inner Start-End. + */ + public int getEnd() { + return this.end == null || this.end.isEmpty() ? 0 : this.end.getValue(); + } + + /** + * @param value Structural Variant Inner Start-End. + */ + public SequenceStructureVariationInnerComponent setEnd(int value) { + if (this.end == null) + this.end = new IntegerType(); + this.end.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("start", "integer", "Structural Variant Inner Start-End.", 0, java.lang.Integer.MAX_VALUE, start)); + childrenList.add(new Property("end", "integer", "Structural Variant Inner Start-End.", 0, java.lang.Integer.MAX_VALUE, end)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("start")) + this.start = castToInteger(value); // IntegerType + else if (name.equals("end")) + this.end = castToInteger(value); // IntegerType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("start")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.start"); + } + else if (name.equals("end")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.end"); + } + else + return super.addChild(name); + } + + public SequenceStructureVariationInnerComponent copy() { + SequenceStructureVariationInnerComponent dst = new SequenceStructureVariationInnerComponent(); + copyValues(dst); + dst.start = start == null ? null : start.copy(); + dst.end = end == null ? null : end.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SequenceStructureVariationInnerComponent)) + return false; + SequenceStructureVariationInnerComponent o = (SequenceStructureVariationInnerComponent) other; + return compareDeep(start, o.start, true) && compareDeep(end, o.end, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SequenceStructureVariationInnerComponent)) + return false; + SequenceStructureVariationInnerComponent o = (SequenceStructureVariationInnerComponent) other; + return compareValues(start, o.start, true) && compareValues(end, o.end, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( start, end); + } + + public String fhirType() { + return "Sequence.structureVariation.inner"; + + } + } /** @@ -1375,33 +2316,48 @@ public class Sequence extends DomainResource { protected Enumeration type; /** - * Identifier for variant. If a germline variant, ClinVar or dbSNP identifier should be used. If a somatic variant, COSMIC identifier should be used, unless in ClinVar then either maybe used. Need to provide the code system used (ClinVar, dbSNP, COSMIC). + * The patient, or group of patients whose sequencing results are described by this resource. */ - @Child(name = "variationID", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="Identifier for variant and ClinVar, dbSNP or COSMIC identifier should be used", formalDefinition="Identifier for variant. If a germline variant, ClinVar or dbSNP identifier should be used. If a somatic variant, COSMIC identifier should be used, unless in ClinVar then either maybe used. Need to provide the code system used (ClinVar, dbSNP, COSMIC)." ) - protected List variationID; + @Child(name = "patient", type = {Patient.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Who and/or what this is about", formalDefinition="The patient, or group of patients whose sequencing results are described by this resource." ) + protected Reference patient; /** - * Reference identifier for cDNA transcript/protein, with version, from NCBI's RefSeq or ENSEMBL. This reference sequence identifier must match the type in the Sequence.type field. + * The actual object that is the target of the reference (The patient, or group of patients whose sequencing results are described by this resource.) */ - @Child(name = "referenceSeq", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Reference identifier. It must match the type in the Sequence.type field", formalDefinition="Reference identifier for cDNA transcript/protein, with version, from NCBI's RefSeq or ENSEMBL. This reference sequence identifier must match the type in the Sequence.type field." ) - protected CodeableConcept referenceSeq; + protected Patient patientTarget; + + /** + * Specimen used for sequencing. + */ + @Child(name = "specimen", type = {Specimen.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Specimen used for sequencing", formalDefinition="Specimen used for sequencing." ) + protected Reference specimen; + + /** + * The actual object that is the target of the reference (Specimen used for sequencing.) + */ + protected Specimen specimenTarget; + + /** + * The method for sequencing, for example, chip information. + */ + @Child(name = "device", type = {Device.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The method for sequencing", formalDefinition="The method for sequencing, for example, chip information." ) + protected Reference device; + + /** + * The actual object that is the target of the reference (The method for sequencing, for example, chip information.) + */ + protected Device deviceTarget; /** * Quantity of the sequence. */ - @Child(name = "quantity", type = {Quantity.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "quantity", type = {Quantity.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Quantity of the sequence", formalDefinition="Quantity of the sequence." ) protected Quantity quantity; - /** - * The coordinate of the variant. - */ - @Child(name = "coordinate", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="The coordinate of the variant", formalDefinition="The coordinate of the variant." ) - protected List coordinate; - /** * The organism from which sample of the sequence was extracted. Supporting tests of human, viruses, and bacteria. */ @@ -1410,76 +2366,100 @@ public class Sequence extends DomainResource { protected CodeableConcept species; /** - * Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. + * Reference Sequence. It can be described in two ways. One is provide the unique identifier of reference sequence submitted to NCBI. The start and end position of window on reference sequence should be defined. The other way is using genome build, chromosome number,and also the start, end position of window (this method is specifically for DNA reference sequence) . */ - @Child(name = "observedAllele", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Nucleotide(s)/amino acids from start position of sequence to stop position of observed sequence", formalDefinition="Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand." ) - protected StringType observedAllele; + @Child(name = "referenceSeq", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Reference sequence", formalDefinition="Reference Sequence. It can be described in two ways. One is provide the unique identifier of reference sequence submitted to NCBI. The start and end position of window on reference sequence should be defined. The other way is using genome build, chromosome number,and also the start, end position of window (this method is specifically for DNA reference sequence) ." ) + protected List referenceSeq; /** - * Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. + * Variation info in this sequence. */ - @Child(name = "referenceAllele", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Nucleotide(s)/amino acids from start position of sequence to stop position of reference sequence", formalDefinition="Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand." ) - protected StringType referenceAllele; - - /** - * Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm). - */ - @Child(name = "cigar", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Extended CIGAR string for aligning the sequence with reference bases", formalDefinition="Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm)." ) - protected StringType cigar; + @Child(name = "variation", type = {}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Variation info in this sequence", formalDefinition="Variation info in this sequence." ) + protected SequenceVariationComponent variation; /** * Quality for sequence quality vary by platform reflecting differences in sequencing chemistry and digital processing. */ - @Child(name = "quality", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "quality", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Sequence Quality", formalDefinition="Quality for sequence quality vary by platform reflecting differences in sequencing chemistry and digital processing." ) protected List quality; /** * The level of occurrence of a single DNA Sequence Variation within a set of chromosomes. Heterozygous indicates the DNA Sequence Variation is only present in one of the two genes contained in homologous chromosomes. Homozygous indicates the DNA Sequence Variation is present in both genes contained in homologous chromosomes. Hemizygous indicates the DNA Sequence Variation exists in the only single copy of a gene in a non- homologous chromosome (the male X and Y chromosome are non-homologous). Hemiplasmic indicates that the DNA Sequence Variation is present in some but not all of the copies of mitochondrial DNA. Homoplasmic indicates that the DNA Sequence Variation is present in all of the copies of mitochondrial DNA. */ - @Child(name = "allelicState", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Child(name = "allelicState", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="The level of occurrence of a single DNA Sequence Variation within a set of chromosomes: Heteroplasmic / Homoplasmic / Homozygous / Heterozygous / Hemizygous", formalDefinition="The level of occurrence of a single DNA Sequence Variation within a set of chromosomes. Heterozygous indicates the DNA Sequence Variation is only present in one of the two genes contained in homologous chromosomes. Homozygous indicates the DNA Sequence Variation is present in both genes contained in homologous chromosomes. Hemizygous indicates the DNA Sequence Variation exists in the only single copy of a gene in a non- homologous chromosome (the male X and Y chromosome are non-homologous). Hemiplasmic indicates that the DNA Sequence Variation is present in some but not all of the copies of mitochondrial DNA. Homoplasmic indicates that the DNA Sequence Variation is present in all of the copies of mitochondrial DNA." ) protected CodeableConcept allelicState; /** * Allele frequencies. */ - @Child(name = "allelicFrequency", type = {DecimalType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Child(name = "allelicFrequency", type = {DecimalType.class}, order=10, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Allele frequencies", formalDefinition="Allele frequencies." ) protected DecimalType allelicFrequency; /** * Values: amplificaiton / deletion / LOH. */ - @Child(name = "copyNumberEvent", type = {CodeableConcept.class}, order=12, min=0, max=1, modifier=false, summary=true) + @Child(name = "copyNumberEvent", type = {CodeableConcept.class}, order=11, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Copy Number Event: Values: amplificaiton / deletion / LOH", formalDefinition="Values: amplificaiton / deletion / LOH." ) protected CodeableConcept copyNumberEvent; /** * Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence. */ - @Child(name = "readCoverage", type = {IntegerType.class}, order=13, min=0, max=1, modifier=false, summary=true) + @Child(name = "readCoverage", type = {IntegerType.class}, order=12, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Average number of reads representing a given nucleotide in the reconstructed sequence", formalDefinition="Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence." ) protected IntegerType readCoverage; /** - * Information of chip. + * Configurations of the external repository. */ - @Child(name = "chip", type = {}, order=14, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Information of chip", formalDefinition="Information of chip." ) - protected SequenceChipComponent chip; - - /** - * External repository. - */ - @Child(name = "repository", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) - @Description(shortDefinition="External repository", formalDefinition="External repository." ) + @Child(name = "repository", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="External repository", formalDefinition="Configurations of the external repository." ) protected List repository; - private static final long serialVersionUID = 417569089L; + /** + * Pointer to next atomic sequence which at most contains one variation. + */ + @Child(name = "pointer", type = {Sequence.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Pointer to next atomic sequence", formalDefinition="Pointer to next atomic sequence which at most contains one variation." ) + protected List pointer; + /** + * The actual objects that are the target of the reference (Pointer to next atomic sequence which at most contains one variation.) + */ + protected List pointerTarget; + + + /** + * Observed Sequence. + */ + @Child(name = "observedSeq", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Observed Sequence", formalDefinition="Observed Sequence." ) + protected StringType observedSeq; + + /** + * Analysis of the sequence. + */ + @Child(name = "observation", type = {Observation.class}, order=16, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Observation-genetics", formalDefinition="Analysis of the sequence." ) + protected Reference observation; + + /** + * The actual object that is the target of the reference (Analysis of the sequence.) + */ + protected Observation observationTarget; + + /** + * Structural variant. + */ + @Child(name = "structureVariation", type = {}, order=17, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="", formalDefinition="Structural variant." ) + protected SequenceStructureVariationComponent structureVariation; + + private static final long serialVersionUID = -1153660995L; /** * Constructor @@ -1542,66 +2522,134 @@ public class Sequence extends DomainResource { } /** - * @return {@link #variationID} (Identifier for variant. If a germline variant, ClinVar or dbSNP identifier should be used. If a somatic variant, COSMIC identifier should be used, unless in ClinVar then either maybe used. Need to provide the code system used (ClinVar, dbSNP, COSMIC).) + * @return {@link #patient} (The patient, or group of patients whose sequencing results are described by this resource.) */ - public List getVariationID() { - if (this.variationID == null) - this.variationID = new ArrayList(); - return this.variationID; + public Reference getPatient() { + if (this.patient == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Sequence.patient"); + else if (Configuration.doAutoCreate()) + this.patient = new Reference(); // cc + return this.patient; } - public boolean hasVariationID() { - if (this.variationID == null) - return false; - for (CodeableConcept item : this.variationID) - if (!item.isEmpty()) - return true; - return false; + public boolean hasPatient() { + return this.patient != null && !this.patient.isEmpty(); } /** - * @return {@link #variationID} (Identifier for variant. If a germline variant, ClinVar or dbSNP identifier should be used. If a somatic variant, COSMIC identifier should be used, unless in ClinVar then either maybe used. Need to provide the code system used (ClinVar, dbSNP, COSMIC).) + * @param value {@link #patient} (The patient, or group of patients whose sequencing results are described by this resource.) */ - // syntactic sugar - public CodeableConcept addVariationID() { //3 - CodeableConcept t = new CodeableConcept(); - if (this.variationID == null) - this.variationID = new ArrayList(); - this.variationID.add(t); - return t; - } - - // syntactic sugar - public Sequence addVariationID(CodeableConcept t) { //3 - if (t == null) - return this; - if (this.variationID == null) - this.variationID = new ArrayList(); - this.variationID.add(t); + public Sequence setPatient(Reference value) { + this.patient = value; return this; } /** - * @return {@link #referenceSeq} (Reference identifier for cDNA transcript/protein, with version, from NCBI's RefSeq or ENSEMBL. This reference sequence identifier must match the type in the Sequence.type field.) + * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient, or group of patients whose sequencing results are described by this resource.) */ - public CodeableConcept getReferenceSeq() { - if (this.referenceSeq == null) + public Patient getPatientTarget() { + if (this.patientTarget == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Sequence.referenceSeq"); + throw new Error("Attempt to auto-create Sequence.patient"); else if (Configuration.doAutoCreate()) - this.referenceSeq = new CodeableConcept(); // cc - return this.referenceSeq; - } - - public boolean hasReferenceSeq() { - return this.referenceSeq != null && !this.referenceSeq.isEmpty(); + this.patientTarget = new Patient(); // aa + return this.patientTarget; } /** - * @param value {@link #referenceSeq} (Reference identifier for cDNA transcript/protein, with version, from NCBI's RefSeq or ENSEMBL. This reference sequence identifier must match the type in the Sequence.type field.) + * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient, or group of patients whose sequencing results are described by this resource.) */ - public Sequence setReferenceSeq(CodeableConcept value) { - this.referenceSeq = value; + public Sequence setPatientTarget(Patient value) { + this.patientTarget = value; + return this; + } + + /** + * @return {@link #specimen} (Specimen used for sequencing.) + */ + public Reference getSpecimen() { + if (this.specimen == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Sequence.specimen"); + else if (Configuration.doAutoCreate()) + this.specimen = new Reference(); // cc + return this.specimen; + } + + public boolean hasSpecimen() { + return this.specimen != null && !this.specimen.isEmpty(); + } + + /** + * @param value {@link #specimen} (Specimen used for sequencing.) + */ + public Sequence setSpecimen(Reference value) { + this.specimen = value; + return this; + } + + /** + * @return {@link #specimen} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Specimen used for sequencing.) + */ + public Specimen getSpecimenTarget() { + if (this.specimenTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Sequence.specimen"); + else if (Configuration.doAutoCreate()) + this.specimenTarget = new Specimen(); // aa + return this.specimenTarget; + } + + /** + * @param value {@link #specimen} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Specimen used for sequencing.) + */ + public Sequence setSpecimenTarget(Specimen value) { + this.specimenTarget = value; + return this; + } + + /** + * @return {@link #device} (The method for sequencing, for example, chip information.) + */ + public Reference getDevice() { + if (this.device == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Sequence.device"); + else if (Configuration.doAutoCreate()) + this.device = new Reference(); // cc + return this.device; + } + + public boolean hasDevice() { + return this.device != null && !this.device.isEmpty(); + } + + /** + * @param value {@link #device} (The method for sequencing, for example, chip information.) + */ + public Sequence setDevice(Reference value) { + this.device = value; + return this; + } + + /** + * @return {@link #device} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The method for sequencing, for example, chip information.) + */ + public Device getDeviceTarget() { + if (this.deviceTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Sequence.device"); + else if (Configuration.doAutoCreate()) + this.deviceTarget = new Device(); // aa + return this.deviceTarget; + } + + /** + * @param value {@link #device} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The method for sequencing, for example, chip information.) + */ + public Sequence setDeviceTarget(Device value) { + this.deviceTarget = value; return this; } @@ -1629,46 +2677,6 @@ public class Sequence extends DomainResource { return this; } - /** - * @return {@link #coordinate} (The coordinate of the variant.) - */ - public List getCoordinate() { - if (this.coordinate == null) - this.coordinate = new ArrayList(); - return this.coordinate; - } - - public boolean hasCoordinate() { - if (this.coordinate == null) - return false; - for (SequenceCoordinateComponent item : this.coordinate) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #coordinate} (The coordinate of the variant.) - */ - // syntactic sugar - public SequenceCoordinateComponent addCoordinate() { //3 - SequenceCoordinateComponent t = new SequenceCoordinateComponent(); - if (this.coordinate == null) - this.coordinate = new ArrayList(); - this.coordinate.add(t); - return t; - } - - // syntactic sugar - public Sequence addCoordinate(SequenceCoordinateComponent t) { //3 - if (t == null) - return this; - if (this.coordinate == null) - this.coordinate = new ArrayList(); - this.coordinate.add(t); - return this; - } - /** * @return {@link #species} (The organism from which sample of the sequence was extracted. Supporting tests of human, viruses, and bacteria.) */ @@ -1694,149 +2702,66 @@ public class Sequence extends DomainResource { } /** - * @return {@link #observedAllele} (Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand.). This is the underlying object with id, value and extensions. The accessor "getObservedAllele" gives direct access to the value + * @return {@link #referenceSeq} (Reference Sequence. It can be described in two ways. One is provide the unique identifier of reference sequence submitted to NCBI. The start and end position of window on reference sequence should be defined. The other way is using genome build, chromosome number,and also the start, end position of window (this method is specifically for DNA reference sequence) .) */ - public StringType getObservedAlleleElement() { - if (this.observedAllele == null) + public List getReferenceSeq() { + if (this.referenceSeq == null) + this.referenceSeq = new ArrayList(); + return this.referenceSeq; + } + + public boolean hasReferenceSeq() { + if (this.referenceSeq == null) + return false; + for (SequenceReferenceSeqComponent item : this.referenceSeq) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #referenceSeq} (Reference Sequence. It can be described in two ways. One is provide the unique identifier of reference sequence submitted to NCBI. The start and end position of window on reference sequence should be defined. The other way is using genome build, chromosome number,and also the start, end position of window (this method is specifically for DNA reference sequence) .) + */ + // syntactic sugar + public SequenceReferenceSeqComponent addReferenceSeq() { //3 + SequenceReferenceSeqComponent t = new SequenceReferenceSeqComponent(); + if (this.referenceSeq == null) + this.referenceSeq = new ArrayList(); + this.referenceSeq.add(t); + return t; + } + + // syntactic sugar + public Sequence addReferenceSeq(SequenceReferenceSeqComponent t) { //3 + if (t == null) + return this; + if (this.referenceSeq == null) + this.referenceSeq = new ArrayList(); + this.referenceSeq.add(t); + return this; + } + + /** + * @return {@link #variation} (Variation info in this sequence.) + */ + public SequenceVariationComponent getVariation() { + if (this.variation == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Sequence.observedAllele"); + throw new Error("Attempt to auto-create Sequence.variation"); else if (Configuration.doAutoCreate()) - this.observedAllele = new StringType(); // bb - return this.observedAllele; + this.variation = new SequenceVariationComponent(); // cc + return this.variation; } - public boolean hasObservedAlleleElement() { - return this.observedAllele != null && !this.observedAllele.isEmpty(); - } - - public boolean hasObservedAllele() { - return this.observedAllele != null && !this.observedAllele.isEmpty(); + public boolean hasVariation() { + return this.variation != null && !this.variation.isEmpty(); } /** - * @param value {@link #observedAllele} (Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand.). This is the underlying object with id, value and extensions. The accessor "getObservedAllele" gives direct access to the value + * @param value {@link #variation} (Variation info in this sequence.) */ - public Sequence setObservedAlleleElement(StringType value) { - this.observedAllele = value; - return this; - } - - /** - * @return Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. - */ - public String getObservedAllele() { - return this.observedAllele == null ? null : this.observedAllele.getValue(); - } - - /** - * @param value Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. - */ - public Sequence setObservedAllele(String value) { - if (Utilities.noString(value)) - this.observedAllele = null; - else { - if (this.observedAllele == null) - this.observedAllele = new StringType(); - this.observedAllele.setValue(value); - } - return this; - } - - /** - * @return {@link #referenceAllele} (Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand.). This is the underlying object with id, value and extensions. The accessor "getReferenceAllele" gives direct access to the value - */ - public StringType getReferenceAlleleElement() { - if (this.referenceAllele == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Sequence.referenceAllele"); - else if (Configuration.doAutoCreate()) - this.referenceAllele = new StringType(); // bb - return this.referenceAllele; - } - - public boolean hasReferenceAlleleElement() { - return this.referenceAllele != null && !this.referenceAllele.isEmpty(); - } - - public boolean hasReferenceAllele() { - return this.referenceAllele != null && !this.referenceAllele.isEmpty(); - } - - /** - * @param value {@link #referenceAllele} (Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand.). This is the underlying object with id, value and extensions. The accessor "getReferenceAllele" gives direct access to the value - */ - public Sequence setReferenceAlleleElement(StringType value) { - this.referenceAllele = value; - return this; - } - - /** - * @return Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. - */ - public String getReferenceAllele() { - return this.referenceAllele == null ? null : this.referenceAllele.getValue(); - } - - /** - * @param value Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. - */ - public Sequence setReferenceAllele(String value) { - if (Utilities.noString(value)) - this.referenceAllele = null; - else { - if (this.referenceAllele == null) - this.referenceAllele = new StringType(); - this.referenceAllele.setValue(value); - } - return this; - } - - /** - * @return {@link #cigar} (Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).). This is the underlying object with id, value and extensions. The accessor "getCigar" gives direct access to the value - */ - public StringType getCigarElement() { - if (this.cigar == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Sequence.cigar"); - else if (Configuration.doAutoCreate()) - this.cigar = new StringType(); // bb - return this.cigar; - } - - public boolean hasCigarElement() { - return this.cigar != null && !this.cigar.isEmpty(); - } - - public boolean hasCigar() { - return this.cigar != null && !this.cigar.isEmpty(); - } - - /** - * @param value {@link #cigar} (Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).). This is the underlying object with id, value and extensions. The accessor "getCigar" gives direct access to the value - */ - public Sequence setCigarElement(StringType value) { - this.cigar = value; - return this; - } - - /** - * @return Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm). - */ - public String getCigar() { - return this.cigar == null ? null : this.cigar.getValue(); - } - - /** - * @param value Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm). - */ - public Sequence setCigar(String value) { - if (Utilities.noString(value)) - this.cigar = null; - else { - if (this.cigar == null) - this.cigar = new StringType(); - this.cigar.setValue(value); - } + public Sequence setVariation(SequenceVariationComponent value) { + this.variation = value; return this; } @@ -2041,31 +2966,7 @@ public class Sequence extends DomainResource { } /** - * @return {@link #chip} (Information of chip.) - */ - public SequenceChipComponent getChip() { - if (this.chip == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Sequence.chip"); - else if (Configuration.doAutoCreate()) - this.chip = new SequenceChipComponent(); // cc - return this.chip; - } - - public boolean hasChip() { - return this.chip != null && !this.chip.isEmpty(); - } - - /** - * @param value {@link #chip} (Information of chip.) - */ - public Sequence setChip(SequenceChipComponent value) { - this.chip = value; - return this; - } - - /** - * @return {@link #repository} (External repository.) + * @return {@link #repository} (Configurations of the external repository.) */ public List getRepository() { if (this.repository == null) @@ -2083,7 +2984,7 @@ public class Sequence extends DomainResource { } /** - * @return {@link #repository} (External repository.) + * @return {@link #repository} (Configurations of the external repository.) */ // syntactic sugar public SequenceRepositoryComponent addRepository() { //3 @@ -2104,46 +3005,224 @@ public class Sequence extends DomainResource { return this; } + /** + * @return {@link #pointer} (Pointer to next atomic sequence which at most contains one variation.) + */ + public List getPointer() { + if (this.pointer == null) + this.pointer = new ArrayList(); + return this.pointer; + } + + public boolean hasPointer() { + if (this.pointer == null) + return false; + for (Reference item : this.pointer) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #pointer} (Pointer to next atomic sequence which at most contains one variation.) + */ + // syntactic sugar + public Reference addPointer() { //3 + Reference t = new Reference(); + if (this.pointer == null) + this.pointer = new ArrayList(); + this.pointer.add(t); + return t; + } + + // syntactic sugar + public Sequence addPointer(Reference t) { //3 + if (t == null) + return this; + if (this.pointer == null) + this.pointer = new ArrayList(); + this.pointer.add(t); + return this; + } + + /** + * @return {@link #pointer} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Pointer to next atomic sequence which at most contains one variation.) + */ + public List getPointerTarget() { + if (this.pointerTarget == null) + this.pointerTarget = new ArrayList(); + return this.pointerTarget; + } + + // syntactic sugar + /** + * @return {@link #pointer} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Pointer to next atomic sequence which at most contains one variation.) + */ + public Sequence addPointerTarget() { + Sequence r = new Sequence(); + if (this.pointerTarget == null) + this.pointerTarget = new ArrayList(); + this.pointerTarget.add(r); + return r; + } + + /** + * @return {@link #observedSeq} (Observed Sequence.). This is the underlying object with id, value and extensions. The accessor "getObservedSeq" gives direct access to the value + */ + public StringType getObservedSeqElement() { + if (this.observedSeq == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Sequence.observedSeq"); + else if (Configuration.doAutoCreate()) + this.observedSeq = new StringType(); // bb + return this.observedSeq; + } + + public boolean hasObservedSeqElement() { + return this.observedSeq != null && !this.observedSeq.isEmpty(); + } + + public boolean hasObservedSeq() { + return this.observedSeq != null && !this.observedSeq.isEmpty(); + } + + /** + * @param value {@link #observedSeq} (Observed Sequence.). This is the underlying object with id, value and extensions. The accessor "getObservedSeq" gives direct access to the value + */ + public Sequence setObservedSeqElement(StringType value) { + this.observedSeq = value; + return this; + } + + /** + * @return Observed Sequence. + */ + public String getObservedSeq() { + return this.observedSeq == null ? null : this.observedSeq.getValue(); + } + + /** + * @param value Observed Sequence. + */ + public Sequence setObservedSeq(String value) { + if (Utilities.noString(value)) + this.observedSeq = null; + else { + if (this.observedSeq == null) + this.observedSeq = new StringType(); + this.observedSeq.setValue(value); + } + return this; + } + + /** + * @return {@link #observation} (Analysis of the sequence.) + */ + public Reference getObservation() { + if (this.observation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Sequence.observation"); + else if (Configuration.doAutoCreate()) + this.observation = new Reference(); // cc + return this.observation; + } + + public boolean hasObservation() { + return this.observation != null && !this.observation.isEmpty(); + } + + /** + * @param value {@link #observation} (Analysis of the sequence.) + */ + public Sequence setObservation(Reference value) { + this.observation = value; + return this; + } + + /** + * @return {@link #observation} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Analysis of the sequence.) + */ + public Observation getObservationTarget() { + if (this.observationTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Sequence.observation"); + else if (Configuration.doAutoCreate()) + this.observationTarget = new Observation(); // aa + return this.observationTarget; + } + + /** + * @param value {@link #observation} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Analysis of the sequence.) + */ + public Sequence setObservationTarget(Observation value) { + this.observationTarget = value; + return this; + } + + /** + * @return {@link #structureVariation} (Structural variant.) + */ + public SequenceStructureVariationComponent getStructureVariation() { + if (this.structureVariation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Sequence.structureVariation"); + else if (Configuration.doAutoCreate()) + this.structureVariation = new SequenceStructureVariationComponent(); // cc + return this.structureVariation; + } + + public boolean hasStructureVariation() { + return this.structureVariation != null && !this.structureVariation.isEmpty(); + } + + /** + * @param value {@link #structureVariation} (Structural variant.) + */ + public Sequence setStructureVariation(SequenceStructureVariationComponent value) { + this.structureVariation = value; + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("type", "code", "Amino acid / cDNA transcript / RNA variation.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("variationID", "CodeableConcept", "Identifier for variant. If a germline variant, ClinVar or dbSNP identifier should be used. If a somatic variant, COSMIC identifier should be used, unless in ClinVar then either maybe used. Need to provide the code system used (ClinVar, dbSNP, COSMIC).", 0, java.lang.Integer.MAX_VALUE, variationID)); - childrenList.add(new Property("referenceSeq", "CodeableConcept", "Reference identifier for cDNA transcript/protein, with version, from NCBI's RefSeq or ENSEMBL. This reference sequence identifier must match the type in the Sequence.type field.", 0, java.lang.Integer.MAX_VALUE, referenceSeq)); + childrenList.add(new Property("patient", "Reference(Patient)", "The patient, or group of patients whose sequencing results are described by this resource.", 0, java.lang.Integer.MAX_VALUE, patient)); + childrenList.add(new Property("specimen", "Reference(Specimen)", "Specimen used for sequencing.", 0, java.lang.Integer.MAX_VALUE, specimen)); + childrenList.add(new Property("device", "Reference(Device)", "The method for sequencing, for example, chip information.", 0, java.lang.Integer.MAX_VALUE, device)); childrenList.add(new Property("quantity", "Quantity", "Quantity of the sequence.", 0, java.lang.Integer.MAX_VALUE, quantity)); - childrenList.add(new Property("coordinate", "", "The coordinate of the variant.", 0, java.lang.Integer.MAX_VALUE, coordinate)); childrenList.add(new Property("species", "CodeableConcept", "The organism from which sample of the sequence was extracted. Supporting tests of human, viruses, and bacteria.", 0, java.lang.Integer.MAX_VALUE, species)); - childrenList.add(new Property("observedAllele", "string", "Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand.", 0, java.lang.Integer.MAX_VALUE, observedAllele)); - childrenList.add(new Property("referenceAllele", "string", "Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand.", 0, java.lang.Integer.MAX_VALUE, referenceAllele)); - childrenList.add(new Property("cigar", "string", "Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).", 0, java.lang.Integer.MAX_VALUE, cigar)); + childrenList.add(new Property("referenceSeq", "", "Reference Sequence. It can be described in two ways. One is provide the unique identifier of reference sequence submitted to NCBI. The start and end position of window on reference sequence should be defined. The other way is using genome build, chromosome number,and also the start, end position of window (this method is specifically for DNA reference sequence) .", 0, java.lang.Integer.MAX_VALUE, referenceSeq)); + childrenList.add(new Property("variation", "", "Variation info in this sequence.", 0, java.lang.Integer.MAX_VALUE, variation)); childrenList.add(new Property("quality", "", "Quality for sequence quality vary by platform reflecting differences in sequencing chemistry and digital processing.", 0, java.lang.Integer.MAX_VALUE, quality)); childrenList.add(new Property("allelicState", "CodeableConcept", "The level of occurrence of a single DNA Sequence Variation within a set of chromosomes. Heterozygous indicates the DNA Sequence Variation is only present in one of the two genes contained in homologous chromosomes. Homozygous indicates the DNA Sequence Variation is present in both genes contained in homologous chromosomes. Hemizygous indicates the DNA Sequence Variation exists in the only single copy of a gene in a non- homologous chromosome (the male X and Y chromosome are non-homologous). Hemiplasmic indicates that the DNA Sequence Variation is present in some but not all of the copies of mitochondrial DNA. Homoplasmic indicates that the DNA Sequence Variation is present in all of the copies of mitochondrial DNA.", 0, java.lang.Integer.MAX_VALUE, allelicState)); childrenList.add(new Property("allelicFrequency", "decimal", "Allele frequencies.", 0, java.lang.Integer.MAX_VALUE, allelicFrequency)); childrenList.add(new Property("copyNumberEvent", "CodeableConcept", "Values: amplificaiton / deletion / LOH.", 0, java.lang.Integer.MAX_VALUE, copyNumberEvent)); childrenList.add(new Property("readCoverage", "integer", "Coverage (read depth or depth) is the average number of reads representing a given nucleotide in the reconstructed sequence.", 0, java.lang.Integer.MAX_VALUE, readCoverage)); - childrenList.add(new Property("chip", "", "Information of chip.", 0, java.lang.Integer.MAX_VALUE, chip)); - childrenList.add(new Property("repository", "", "External repository.", 0, java.lang.Integer.MAX_VALUE, repository)); + childrenList.add(new Property("repository", "", "Configurations of the external repository.", 0, java.lang.Integer.MAX_VALUE, repository)); + childrenList.add(new Property("pointer", "Reference(Sequence)", "Pointer to next atomic sequence which at most contains one variation.", 0, java.lang.Integer.MAX_VALUE, pointer)); + childrenList.add(new Property("observedSeq", "string", "Observed Sequence.", 0, java.lang.Integer.MAX_VALUE, observedSeq)); + childrenList.add(new Property("observation", "Reference(Observation)", "Analysis of the sequence.", 0, java.lang.Integer.MAX_VALUE, observation)); + childrenList.add(new Property("structureVariation", "", "Structural variant.", 0, java.lang.Integer.MAX_VALUE, structureVariation)); } @Override public void setProperty(String name, Base value) throws FHIRException { if (name.equals("type")) this.type = new SequenceTypeEnumFactory().fromType(value); // Enumeration - else if (name.equals("variationID")) - this.getVariationID().add(castToCodeableConcept(value)); - else if (name.equals("referenceSeq")) - this.referenceSeq = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("patient")) + this.patient = castToReference(value); // Reference + else if (name.equals("specimen")) + this.specimen = castToReference(value); // Reference + else if (name.equals("device")) + this.device = castToReference(value); // Reference else if (name.equals("quantity")) this.quantity = castToQuantity(value); // Quantity - else if (name.equals("coordinate")) - this.getCoordinate().add((SequenceCoordinateComponent) value); else if (name.equals("species")) this.species = castToCodeableConcept(value); // CodeableConcept - else if (name.equals("observedAllele")) - this.observedAllele = castToString(value); // StringType - else if (name.equals("referenceAllele")) - this.referenceAllele = castToString(value); // StringType - else if (name.equals("cigar")) - this.cigar = castToString(value); // StringType + else if (name.equals("referenceSeq")) + this.getReferenceSeq().add((SequenceReferenceSeqComponent) value); + else if (name.equals("variation")) + this.variation = (SequenceVariationComponent) value; // SequenceVariationComponent else if (name.equals("quality")) this.getQuality().add((SequenceQualityComponent) value); else if (name.equals("allelicState")) @@ -2154,10 +3233,16 @@ public class Sequence extends DomainResource { this.copyNumberEvent = castToCodeableConcept(value); // CodeableConcept else if (name.equals("readCoverage")) this.readCoverage = castToInteger(value); // IntegerType - else if (name.equals("chip")) - this.chip = (SequenceChipComponent) value; // SequenceChipComponent else if (name.equals("repository")) this.getRepository().add((SequenceRepositoryComponent) value); + else if (name.equals("pointer")) + this.getPointer().add(castToReference(value)); + else if (name.equals("observedSeq")) + this.observedSeq = castToString(value); // StringType + else if (name.equals("observation")) + this.observation = castToReference(value); // Reference + else if (name.equals("structureVariation")) + this.structureVariation = (SequenceStructureVariationComponent) value; // SequenceStructureVariationComponent else super.setProperty(name, value); } @@ -2167,32 +3252,32 @@ public class Sequence extends DomainResource { if (name.equals("type")) { throw new FHIRException("Cannot call addChild on a primitive type Sequence.type"); } - else if (name.equals("variationID")) { - return addVariationID(); + else if (name.equals("patient")) { + this.patient = new Reference(); + return this.patient; } - else if (name.equals("referenceSeq")) { - this.referenceSeq = new CodeableConcept(); - return this.referenceSeq; + else if (name.equals("specimen")) { + this.specimen = new Reference(); + return this.specimen; + } + else if (name.equals("device")) { + this.device = new Reference(); + return this.device; } else if (name.equals("quantity")) { this.quantity = new Quantity(); return this.quantity; } - else if (name.equals("coordinate")) { - return addCoordinate(); - } else if (name.equals("species")) { this.species = new CodeableConcept(); return this.species; } - else if (name.equals("observedAllele")) { - throw new FHIRException("Cannot call addChild on a primitive type Sequence.observedAllele"); + else if (name.equals("referenceSeq")) { + return addReferenceSeq(); } - else if (name.equals("referenceAllele")) { - throw new FHIRException("Cannot call addChild on a primitive type Sequence.referenceAllele"); - } - else if (name.equals("cigar")) { - throw new FHIRException("Cannot call addChild on a primitive type Sequence.cigar"); + else if (name.equals("variation")) { + this.variation = new SequenceVariationComponent(); + return this.variation; } else if (name.equals("quality")) { return addQuality(); @@ -2211,13 +3296,23 @@ public class Sequence extends DomainResource { else if (name.equals("readCoverage")) { throw new FHIRException("Cannot call addChild on a primitive type Sequence.readCoverage"); } - else if (name.equals("chip")) { - this.chip = new SequenceChipComponent(); - return this.chip; - } else if (name.equals("repository")) { return addRepository(); } + else if (name.equals("pointer")) { + return addPointer(); + } + else if (name.equals("observedSeq")) { + throw new FHIRException("Cannot call addChild on a primitive type Sequence.observedSeq"); + } + else if (name.equals("observation")) { + this.observation = new Reference(); + return this.observation; + } + else if (name.equals("structureVariation")) { + this.structureVariation = new SequenceStructureVariationComponent(); + return this.structureVariation; + } else return super.addChild(name); } @@ -2231,22 +3326,17 @@ public class Sequence extends DomainResource { Sequence dst = new Sequence(); copyValues(dst); dst.type = type == null ? null : type.copy(); - if (variationID != null) { - dst.variationID = new ArrayList(); - for (CodeableConcept i : variationID) - dst.variationID.add(i.copy()); - }; - dst.referenceSeq = referenceSeq == null ? null : referenceSeq.copy(); + dst.patient = patient == null ? null : patient.copy(); + dst.specimen = specimen == null ? null : specimen.copy(); + dst.device = device == null ? null : device.copy(); dst.quantity = quantity == null ? null : quantity.copy(); - if (coordinate != null) { - dst.coordinate = new ArrayList(); - for (SequenceCoordinateComponent i : coordinate) - dst.coordinate.add(i.copy()); - }; dst.species = species == null ? null : species.copy(); - dst.observedAllele = observedAllele == null ? null : observedAllele.copy(); - dst.referenceAllele = referenceAllele == null ? null : referenceAllele.copy(); - dst.cigar = cigar == null ? null : cigar.copy(); + if (referenceSeq != null) { + dst.referenceSeq = new ArrayList(); + for (SequenceReferenceSeqComponent i : referenceSeq) + dst.referenceSeq.add(i.copy()); + }; + dst.variation = variation == null ? null : variation.copy(); if (quality != null) { dst.quality = new ArrayList(); for (SequenceQualityComponent i : quality) @@ -2256,12 +3346,19 @@ public class Sequence extends DomainResource { dst.allelicFrequency = allelicFrequency == null ? null : allelicFrequency.copy(); dst.copyNumberEvent = copyNumberEvent == null ? null : copyNumberEvent.copy(); dst.readCoverage = readCoverage == null ? null : readCoverage.copy(); - dst.chip = chip == null ? null : chip.copy(); if (repository != null) { dst.repository = new ArrayList(); for (SequenceRepositoryComponent i : repository) dst.repository.add(i.copy()); }; + if (pointer != null) { + dst.pointer = new ArrayList(); + for (Reference i : pointer) + dst.pointer.add(i.copy()); + }; + dst.observedSeq = observedSeq == null ? null : observedSeq.copy(); + dst.observation = observation == null ? null : observation.copy(); + dst.structureVariation = structureVariation == null ? null : structureVariation.copy(); return dst; } @@ -2276,12 +3373,13 @@ public class Sequence extends DomainResource { if (!(other instanceof Sequence)) return false; Sequence o = (Sequence) other; - return compareDeep(type, o.type, true) && compareDeep(variationID, o.variationID, true) && compareDeep(referenceSeq, o.referenceSeq, true) - && compareDeep(quantity, o.quantity, true) && compareDeep(coordinate, o.coordinate, true) && compareDeep(species, o.species, true) - && compareDeep(observedAllele, o.observedAllele, true) && compareDeep(referenceAllele, o.referenceAllele, true) - && compareDeep(cigar, o.cigar, true) && compareDeep(quality, o.quality, true) && compareDeep(allelicState, o.allelicState, true) - && compareDeep(allelicFrequency, o.allelicFrequency, true) && compareDeep(copyNumberEvent, o.copyNumberEvent, true) - && compareDeep(readCoverage, o.readCoverage, true) && compareDeep(chip, o.chip, true) && compareDeep(repository, o.repository, true) + return compareDeep(type, o.type, true) && compareDeep(patient, o.patient, true) && compareDeep(specimen, o.specimen, true) + && compareDeep(device, o.device, true) && compareDeep(quantity, o.quantity, true) && compareDeep(species, o.species, true) + && compareDeep(referenceSeq, o.referenceSeq, true) && compareDeep(variation, o.variation, true) + && compareDeep(quality, o.quality, true) && compareDeep(allelicState, o.allelicState, true) && compareDeep(allelicFrequency, o.allelicFrequency, true) + && compareDeep(copyNumberEvent, o.copyNumberEvent, true) && compareDeep(readCoverage, o.readCoverage, true) + && compareDeep(repository, o.repository, true) && compareDeep(pointer, o.pointer, true) && compareDeep(observedSeq, o.observedSeq, true) + && compareDeep(observation, o.observation, true) && compareDeep(structureVariation, o.structureVariation, true) ; } @@ -2292,20 +3390,16 @@ public class Sequence extends DomainResource { if (!(other instanceof Sequence)) return false; Sequence o = (Sequence) other; - return compareValues(type, o.type, true) && compareValues(observedAllele, o.observedAllele, true) && compareValues(referenceAllele, o.referenceAllele, true) - && compareValues(cigar, o.cigar, true) && compareValues(allelicFrequency, o.allelicFrequency, true) - && compareValues(readCoverage, o.readCoverage, true); + return compareValues(type, o.type, true) && compareValues(allelicFrequency, o.allelicFrequency, true) + && compareValues(readCoverage, o.readCoverage, true) && compareValues(observedSeq, o.observedSeq, true) + ; } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (variationID == null || variationID.isEmpty()) - && (referenceSeq == null || referenceSeq.isEmpty()) && (quantity == null || quantity.isEmpty()) - && (coordinate == null || coordinate.isEmpty()) && (species == null || species.isEmpty()) - && (observedAllele == null || observedAllele.isEmpty()) && (referenceAllele == null || referenceAllele.isEmpty()) - && (cigar == null || cigar.isEmpty()) && (quality == null || quality.isEmpty()) && (allelicState == null || allelicState.isEmpty()) - && (allelicFrequency == null || allelicFrequency.isEmpty()) && (copyNumberEvent == null || copyNumberEvent.isEmpty()) - && (readCoverage == null || readCoverage.isEmpty()) && (chip == null || chip.isEmpty()) && (repository == null || repository.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, patient, specimen, device + , quantity, species, referenceSeq, variation, quality, allelicState, allelicFrequency + , copyNumberEvent, readCoverage, repository, pointer, observedSeq, observation, structureVariation + ); } @Override @@ -2333,26 +3427,6 @@ public class Sequence extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.CompositeClientParam COORDINATE = new ca.uhn.fhir.rest.gclient.CompositeClientParam(SP_COORDINATE); - /** - * Search parameter: variationid - *

- * Description: Identifier for variant
- * Type: token
- * Path: Sequence.variationID
- *

- */ - @SearchParamDefinition(name="variationid", path="Sequence.variationID", description="Identifier for variant", type="token" ) - public static final String SP_VARIATIONID = "variationid"; - /** - * Fluent Client search parameter constant for variationid - *

- * Description: Identifier for variant
- * Type: token
- * Path: Sequence.variationID
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam VARIATIONID = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VARIATIONID); - /** * Search parameter: species *

@@ -2373,22 +3447,48 @@ public class Sequence extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam SPECIES = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SPECIES); + /** + * Search parameter: patient + *

+ * Description: The subject that the observation is about
+ * Type: reference
+ * Path: Sequence.patient
+ *

+ */ + @SearchParamDefinition(name="patient", path="Sequence.patient", description="The subject that the observation is about", type="reference" ) + public static final String SP_PATIENT = "patient"; + /** + * Fluent Client search parameter constant for patient + *

+ * Description: The subject that the observation is about
+ * Type: reference
+ * Path: Sequence.patient
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Sequence:patient". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Sequence:patient").toLocked(); + /** * Search parameter: chromosome *

* Description: Chromosome of the sequence
* Type: token
- * Path: Sequence.coordinate.chromosome
+ * Path: Sequence.referenceSeq.chromosome
*

*/ - @SearchParamDefinition(name="chromosome", path="Sequence.coordinate.chromosome", description="Chromosome of the sequence", type="token" ) + @SearchParamDefinition(name="chromosome", path="Sequence.referenceSeq.chromosome", description="Chromosome of the sequence", type="token" ) public static final String SP_CHROMOSOME = "chromosome"; /** * Fluent Client search parameter constant for chromosome *

* Description: Chromosome of the sequence
* Type: token
- * Path: Sequence.coordinate.chromosome
+ * Path: Sequence.referenceSeq.chromosome
*

*/ public static final ca.uhn.fhir.rest.gclient.TokenClientParam CHROMOSOME = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CHROMOSOME); @@ -2398,17 +3498,17 @@ public class Sequence extends DomainResource { *

* Description: Start position (0-based inclusive) of the sequence
* Type: number
- * Path: Sequence.coordinate.start
+ * Path: Sequence.variation.start
*

*/ - @SearchParamDefinition(name="start", path="Sequence.coordinate.start", description="Start position (0-based inclusive) of the sequence", type="number" ) + @SearchParamDefinition(name="start", path="Sequence.variation.start", description="Start position (0-based inclusive) of the sequence", type="number" ) public static final String SP_START = "start"; /** * Fluent Client search parameter constant for start *

* Description: Start position (0-based inclusive) of the sequence
* Type: number
- * Path: Sequence.coordinate.start
+ * Path: Sequence.variation.start
*

*/ public static final ca.uhn.fhir.rest.gclient.NumberClientParam START = new ca.uhn.fhir.rest.gclient.NumberClientParam(SP_START); @@ -2418,17 +3518,17 @@ public class Sequence extends DomainResource { *

* Description: End position (0-based exclusive) of the sequence
* Type: number
- * Path: Sequence.coordinate.end
+ * Path: Sequence.variation.end
*

*/ - @SearchParamDefinition(name="end", path="Sequence.coordinate.end", description="End position (0-based exclusive) of the sequence", type="number" ) + @SearchParamDefinition(name="end", path="Sequence.variation.end", description="End position (0-based exclusive) of the sequence", type="number" ) public static final String SP_END = "end"; /** * Fluent Client search parameter constant for end *

* Description: End position (0-based exclusive) of the sequence
* Type: number
- * Path: Sequence.coordinate.end
+ * Path: Sequence.variation.end
*

*/ public static final ca.uhn.fhir.rest.gclient.NumberClientParam END = new ca.uhn.fhir.rest.gclient.NumberClientParam(SP_END); diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Signature.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Signature.java index ecf011a9e22..b47fd98c60e 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Signature.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Signature.java @@ -29,20 +29,18 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities. */ @@ -71,17 +69,17 @@ public class Signature extends Type implements ICompositeType { protected Type who; /** - * A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature. + * A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc. */ - @Child(name = "contentType", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="The technical format of the signature", formalDefinition="A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature." ) + @Child(name = "contentType", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The technical format of the signature", formalDefinition="A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc." ) protected CodeType contentType; /** - * The base64 encoding of the Signature content. + * The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty. */ - @Child(name = "blob", type = {Base64BinaryType.class}, order=4, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="The actual signature content (XML DigSig. JWT, picture, etc.)", formalDefinition="The base64 encoding of the Signature content." ) + @Child(name = "blob", type = {Base64BinaryType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="The actual signature content (XML DigSig. JWT, picture, etc.)", formalDefinition="The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty." ) protected Base64BinaryType blob; private static final long serialVersionUID = -452432714L; @@ -96,12 +94,10 @@ public class Signature extends Type implements ICompositeType { /** * Constructor */ - public Signature(InstantType when, Type who, CodeType contentType, Base64BinaryType blob) { + public Signature(InstantType when, Type who) { super(); this.when = when; this.who = who; - this.contentType = contentType; - this.blob = blob; } /** @@ -235,7 +231,7 @@ public class Signature extends Type implements ICompositeType { } /** - * @return {@link #contentType} (A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value + * @return {@link #contentType} (A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value */ public CodeType getContentTypeElement() { if (this.contentType == null) @@ -255,7 +251,7 @@ public class Signature extends Type implements ICompositeType { } /** - * @param value {@link #contentType} (A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value + * @param value {@link #contentType} (A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value */ public Signature setContentTypeElement(CodeType value) { this.contentType = value; @@ -263,24 +259,28 @@ public class Signature extends Type implements ICompositeType { } /** - * @return A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature. + * @return A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc. */ public String getContentType() { return this.contentType == null ? null : this.contentType.getValue(); } /** - * @param value A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature. + * @param value A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc. */ public Signature setContentType(String value) { + if (Utilities.noString(value)) + this.contentType = null; + else { if (this.contentType == null) this.contentType = new CodeType(); this.contentType.setValue(value); + } return this; } /** - * @return {@link #blob} (The base64 encoding of the Signature content.). This is the underlying object with id, value and extensions. The accessor "getBlob" gives direct access to the value + * @return {@link #blob} (The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.). This is the underlying object with id, value and extensions. The accessor "getBlob" gives direct access to the value */ public Base64BinaryType getBlobElement() { if (this.blob == null) @@ -300,7 +300,7 @@ public class Signature extends Type implements ICompositeType { } /** - * @param value {@link #blob} (The base64 encoding of the Signature content.). This is the underlying object with id, value and extensions. The accessor "getBlob" gives direct access to the value + * @param value {@link #blob} (The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.). This is the underlying object with id, value and extensions. The accessor "getBlob" gives direct access to the value */ public Signature setBlobElement(Base64BinaryType value) { this.blob = value; @@ -308,19 +308,23 @@ public class Signature extends Type implements ICompositeType { } /** - * @return The base64 encoding of the Signature content. + * @return The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty. */ public byte[] getBlob() { return this.blob == null ? null : this.blob.getValue(); } /** - * @param value The base64 encoding of the Signature content. + * @param value The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty. */ public Signature setBlob(byte[] value) { + if (value == null) + this.blob = null; + else { if (this.blob == null) this.blob = new Base64BinaryType(); this.blob.setValue(value); + } return this; } @@ -329,8 +333,8 @@ public class Signature extends Type implements ICompositeType { childrenList.add(new Property("type", "Coding", "An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.", 0, java.lang.Integer.MAX_VALUE, type)); childrenList.add(new Property("when", "instant", "When the digital signature was signed.", 0, java.lang.Integer.MAX_VALUE, when)); childrenList.add(new Property("who[x]", "uri|Reference(Practitioner|RelatedPerson|Patient|Device|Organization)", "A reference to an application-usable description of the person that signed the certificate (e.g. the signature used their private key).", 0, java.lang.Integer.MAX_VALUE, who)); - childrenList.add(new Property("contentType", "code", "A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature.", 0, java.lang.Integer.MAX_VALUE, contentType)); - childrenList.add(new Property("blob", "base64Binary", "The base64 encoding of the Signature content.", 0, java.lang.Integer.MAX_VALUE, blob)); + childrenList.add(new Property("contentType", "code", "A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jwt for JWT, and image/* for a graphical image of a signature, etc.", 0, java.lang.Integer.MAX_VALUE, contentType)); + childrenList.add(new Property("blob", "base64Binary", "The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.", 0, java.lang.Integer.MAX_VALUE, blob)); } @Override @@ -422,9 +426,8 @@ public class Signature extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (when == null || when.isEmpty()) - && (who == null || who.isEmpty()) && (contentType == null || contentType.isEmpty()) && (blob == null || blob.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, when, who, contentType + , blob); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SimpleQuantity.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SimpleQuantity.java index f695541e215..fdfae3c2884 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SimpleQuantity.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SimpleQuantity.java @@ -29,13 +29,12 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. */ @@ -82,9 +81,8 @@ public class SimpleQuantity extends Quantity { } public boolean isEmpty() { - return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty()) - && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value, comparator, unit, system + , code); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Slot.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Slot.java index b92fd6929a5..b939b1625f2 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Slot.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Slot.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A slot of time on a schedule that may be available for booking appointments. */ @@ -174,17 +173,38 @@ public class Slot extends DomainResource { @Description(shortDefinition="External Ids for this item", formalDefinition="External Ids for this item." ) protected List identifier; + /** + * A broad categorisation of the service that is to be performed during this appointment. + */ + @Child(name = "serviceCategory", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="A broad categorisation of the service that is to be performed during this appointment", formalDefinition="A broad categorisation of the service that is to be performed during this appointment." ) + protected CodeableConcept serviceCategory; + /** * The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource. */ - @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Child(name = "serviceType", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource", formalDefinition="The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource." ) - protected CodeableConcept type; + protected List serviceType; + + /** + * The specialty of a practitioner that would be required to perform the service requested in this appointment. + */ + @Child(name = "specialty", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="The specialty of a practitioner that would be required to perform the service requested in this appointment", formalDefinition="The specialty of a practitioner that would be required to perform the service requested in this appointment." ) + protected List specialty; + + /** + * The style of appointment or patient that has been booked in the slot (not service type). + */ + @Child(name = "appointmentType", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="The style of appointment or patient that has been booked in the slot (not service type)", formalDefinition="The style of appointment or patient that has been booked in the slot (not service type)." ) + protected CodeableConcept appointmentType; /** * The schedule resource that this slot defines an interval of status information. */ - @Child(name = "schedule", type = {Schedule.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Child(name = "schedule", type = {Schedule.class}, order=5, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="The schedule resource that this slot defines an interval of status information", formalDefinition="The schedule resource that this slot defines an interval of status information." ) protected Reference schedule; @@ -196,39 +216,39 @@ public class Slot extends DomainResource { /** * busy | free | busy-unavailable | busy-tentative. */ - @Child(name = "freeBusyType", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="busy | free | busy-unavailable | busy-tentative", formalDefinition="busy | free | busy-unavailable | busy-tentative." ) - protected Enumeration freeBusyType; + protected Enumeration status; /** * Date/Time that the slot is to begin. */ - @Child(name = "start", type = {InstantType.class}, order=4, min=1, max=1, modifier=false, summary=true) + @Child(name = "start", type = {InstantType.class}, order=7, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Date/Time that the slot is to begin", formalDefinition="Date/Time that the slot is to begin." ) protected InstantType start; /** * Date/Time that the slot is to conclude. */ - @Child(name = "end", type = {InstantType.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Child(name = "end", type = {InstantType.class}, order=8, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Date/Time that the slot is to conclude", formalDefinition="Date/Time that the slot is to conclude." ) protected InstantType end; /** * This slot has already been overbooked, appointments are unlikely to be accepted for this time. */ - @Child(name = "overbooked", type = {BooleanType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Child(name = "overbooked", type = {BooleanType.class}, order=9, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="This slot has already been overbooked, appointments are unlikely to be accepted for this time", formalDefinition="This slot has already been overbooked, appointments are unlikely to be accepted for this time." ) protected BooleanType overbooked; /** * Comments on the slot to describe any extended information. Such as custom constraints on the slot. */ - @Child(name = "comment", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) + @Child(name = "comment", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Comments on the slot to describe any extended information. Such as custom constraints on the slot", formalDefinition="Comments on the slot to describe any extended information. Such as custom constraints on the slot." ) protected StringType comment; - private static final long serialVersionUID = 1984269299L; + private static final long serialVersionUID = 2085594970L; /** * Constructor @@ -240,10 +260,10 @@ public class Slot extends DomainResource { /** * Constructor */ - public Slot(Reference schedule, Enumeration freeBusyType, InstantType start, InstantType end) { + public Slot(Reference schedule, Enumeration status, InstantType start, InstantType end) { super(); this.schedule = schedule; - this.freeBusyType = freeBusyType; + this.status = status; this.start = start; this.end = end; } @@ -289,26 +309,130 @@ public class Slot extends DomainResource { } /** - * @return {@link #type} (The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.) + * @return {@link #serviceCategory} (A broad categorisation of the service that is to be performed during this appointment.) */ - public CodeableConcept getType() { - if (this.type == null) + public CodeableConcept getServiceCategory() { + if (this.serviceCategory == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Slot.type"); + throw new Error("Attempt to auto-create Slot.serviceCategory"); else if (Configuration.doAutoCreate()) - this.type = new CodeableConcept(); // cc - return this.type; + this.serviceCategory = new CodeableConcept(); // cc + return this.serviceCategory; } - public boolean hasType() { - return this.type != null && !this.type.isEmpty(); + public boolean hasServiceCategory() { + return this.serviceCategory != null && !this.serviceCategory.isEmpty(); } /** - * @param value {@link #type} (The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.) + * @param value {@link #serviceCategory} (A broad categorisation of the service that is to be performed during this appointment.) */ - public Slot setType(CodeableConcept value) { - this.type = value; + public Slot setServiceCategory(CodeableConcept value) { + this.serviceCategory = value; + return this; + } + + /** + * @return {@link #serviceType} (The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.) + */ + public List getServiceType() { + if (this.serviceType == null) + this.serviceType = new ArrayList(); + return this.serviceType; + } + + public boolean hasServiceType() { + if (this.serviceType == null) + return false; + for (CodeableConcept item : this.serviceType) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #serviceType} (The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.) + */ + // syntactic sugar + public CodeableConcept addServiceType() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.serviceType == null) + this.serviceType = new ArrayList(); + this.serviceType.add(t); + return t; + } + + // syntactic sugar + public Slot addServiceType(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.serviceType == null) + this.serviceType = new ArrayList(); + this.serviceType.add(t); + return this; + } + + /** + * @return {@link #specialty} (The specialty of a practitioner that would be required to perform the service requested in this appointment.) + */ + public List getSpecialty() { + if (this.specialty == null) + this.specialty = new ArrayList(); + return this.specialty; + } + + public boolean hasSpecialty() { + if (this.specialty == null) + return false; + for (CodeableConcept item : this.specialty) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #specialty} (The specialty of a practitioner that would be required to perform the service requested in this appointment.) + */ + // syntactic sugar + public CodeableConcept addSpecialty() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.specialty == null) + this.specialty = new ArrayList(); + this.specialty.add(t); + return t; + } + + // syntactic sugar + public Slot addSpecialty(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.specialty == null) + this.specialty = new ArrayList(); + this.specialty.add(t); + return this; + } + + /** + * @return {@link #appointmentType} (The style of appointment or patient that has been booked in the slot (not service type).) + */ + public CodeableConcept getAppointmentType() { + if (this.appointmentType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Slot.appointmentType"); + else if (Configuration.doAutoCreate()) + this.appointmentType = new CodeableConcept(); // cc + return this.appointmentType; + } + + public boolean hasAppointmentType() { + return this.appointmentType != null && !this.appointmentType.isEmpty(); + } + + /** + * @param value {@link #appointmentType} (The style of appointment or patient that has been booked in the slot (not service type).) + */ + public Slot setAppointmentType(CodeableConcept value) { + this.appointmentType = value; return this; } @@ -357,47 +481,47 @@ public class Slot extends DomainResource { } /** - * @return {@link #freeBusyType} (busy | free | busy-unavailable | busy-tentative.). This is the underlying object with id, value and extensions. The accessor "getFreeBusyType" gives direct access to the value + * @return {@link #status} (busy | free | busy-unavailable | busy-tentative.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value */ - public Enumeration getFreeBusyTypeElement() { - if (this.freeBusyType == null) + public Enumeration getStatusElement() { + if (this.status == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Slot.freeBusyType"); + throw new Error("Attempt to auto-create Slot.status"); else if (Configuration.doAutoCreate()) - this.freeBusyType = new Enumeration(new SlotStatusEnumFactory()); // bb - return this.freeBusyType; + this.status = new Enumeration(new SlotStatusEnumFactory()); // bb + return this.status; } - public boolean hasFreeBusyTypeElement() { - return this.freeBusyType != null && !this.freeBusyType.isEmpty(); + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); } - public boolean hasFreeBusyType() { - return this.freeBusyType != null && !this.freeBusyType.isEmpty(); + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); } /** - * @param value {@link #freeBusyType} (busy | free | busy-unavailable | busy-tentative.). This is the underlying object with id, value and extensions. The accessor "getFreeBusyType" gives direct access to the value + * @param value {@link #status} (busy | free | busy-unavailable | busy-tentative.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value */ - public Slot setFreeBusyTypeElement(Enumeration value) { - this.freeBusyType = value; + public Slot setStatusElement(Enumeration value) { + this.status = value; return this; } /** * @return busy | free | busy-unavailable | busy-tentative. */ - public SlotStatus getFreeBusyType() { - return this.freeBusyType == null ? null : this.freeBusyType.getValue(); + public SlotStatus getStatus() { + return this.status == null ? null : this.status.getValue(); } /** * @param value busy | free | busy-unavailable | busy-tentative. */ - public Slot setFreeBusyType(SlotStatus value) { - if (this.freeBusyType == null) - this.freeBusyType = new Enumeration(new SlotStatusEnumFactory()); - this.freeBusyType.setValue(value); + public Slot setStatus(SlotStatus value) { + if (this.status == null) + this.status = new Enumeration(new SlotStatusEnumFactory()); + this.status.setValue(value); return this; } @@ -588,9 +712,12 @@ public class Slot extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("identifier", "Identifier", "External Ids for this item.", 0, java.lang.Integer.MAX_VALUE, identifier)); - childrenList.add(new Property("type", "CodeableConcept", "The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("serviceCategory", "CodeableConcept", "A broad categorisation of the service that is to be performed during this appointment.", 0, java.lang.Integer.MAX_VALUE, serviceCategory)); + childrenList.add(new Property("serviceType", "CodeableConcept", "The type of appointments that can be booked into this slot (ideally this would be an identifiable service - which is at a location, rather than the location itself). If provided then this overrides the value provided on the availability resource.", 0, java.lang.Integer.MAX_VALUE, serviceType)); + childrenList.add(new Property("specialty", "CodeableConcept", "The specialty of a practitioner that would be required to perform the service requested in this appointment.", 0, java.lang.Integer.MAX_VALUE, specialty)); + childrenList.add(new Property("appointmentType", "CodeableConcept", "The style of appointment or patient that has been booked in the slot (not service type).", 0, java.lang.Integer.MAX_VALUE, appointmentType)); childrenList.add(new Property("schedule", "Reference(Schedule)", "The schedule resource that this slot defines an interval of status information.", 0, java.lang.Integer.MAX_VALUE, schedule)); - childrenList.add(new Property("freeBusyType", "code", "busy | free | busy-unavailable | busy-tentative.", 0, java.lang.Integer.MAX_VALUE, freeBusyType)); + childrenList.add(new Property("status", "code", "busy | free | busy-unavailable | busy-tentative.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("start", "instant", "Date/Time that the slot is to begin.", 0, java.lang.Integer.MAX_VALUE, start)); childrenList.add(new Property("end", "instant", "Date/Time that the slot is to conclude.", 0, java.lang.Integer.MAX_VALUE, end)); childrenList.add(new Property("overbooked", "boolean", "This slot has already been overbooked, appointments are unlikely to be accepted for this time.", 0, java.lang.Integer.MAX_VALUE, overbooked)); @@ -601,12 +728,18 @@ public class Slot extends DomainResource { public void setProperty(String name, Base value) throws FHIRException { if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); - else if (name.equals("type")) - this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("serviceCategory")) + this.serviceCategory = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("serviceType")) + this.getServiceType().add(castToCodeableConcept(value)); + else if (name.equals("specialty")) + this.getSpecialty().add(castToCodeableConcept(value)); + else if (name.equals("appointmentType")) + this.appointmentType = castToCodeableConcept(value); // CodeableConcept else if (name.equals("schedule")) this.schedule = castToReference(value); // Reference - else if (name.equals("freeBusyType")) - this.freeBusyType = new SlotStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("status")) + this.status = new SlotStatusEnumFactory().fromType(value); // Enumeration else if (name.equals("start")) this.start = castToInstant(value); // InstantType else if (name.equals("end")) @@ -624,16 +757,26 @@ public class Slot extends DomainResource { if (name.equals("identifier")) { return addIdentifier(); } - else if (name.equals("type")) { - this.type = new CodeableConcept(); - return this.type; + else if (name.equals("serviceCategory")) { + this.serviceCategory = new CodeableConcept(); + return this.serviceCategory; + } + else if (name.equals("serviceType")) { + return addServiceType(); + } + else if (name.equals("specialty")) { + return addSpecialty(); + } + else if (name.equals("appointmentType")) { + this.appointmentType = new CodeableConcept(); + return this.appointmentType; } else if (name.equals("schedule")) { this.schedule = new Reference(); return this.schedule; } - else if (name.equals("freeBusyType")) { - throw new FHIRException("Cannot call addChild on a primitive type Slot.freeBusyType"); + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Slot.status"); } else if (name.equals("start")) { throw new FHIRException("Cannot call addChild on a primitive type Slot.start"); @@ -664,9 +807,20 @@ public class Slot extends DomainResource { for (Identifier i : identifier) dst.identifier.add(i.copy()); }; - dst.type = type == null ? null : type.copy(); + dst.serviceCategory = serviceCategory == null ? null : serviceCategory.copy(); + if (serviceType != null) { + dst.serviceType = new ArrayList(); + for (CodeableConcept i : serviceType) + dst.serviceType.add(i.copy()); + }; + if (specialty != null) { + dst.specialty = new ArrayList(); + for (CodeableConcept i : specialty) + dst.specialty.add(i.copy()); + }; + dst.appointmentType = appointmentType == null ? null : appointmentType.copy(); dst.schedule = schedule == null ? null : schedule.copy(); - dst.freeBusyType = freeBusyType == null ? null : freeBusyType.copy(); + dst.status = status == null ? null : status.copy(); dst.start = start == null ? null : start.copy(); dst.end = end == null ? null : end.copy(); dst.overbooked = overbooked == null ? null : overbooked.copy(); @@ -685,9 +839,11 @@ public class Slot extends DomainResource { if (!(other instanceof Slot)) return false; Slot o = (Slot) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(schedule, o.schedule, true) - && compareDeep(freeBusyType, o.freeBusyType, true) && compareDeep(start, o.start, true) && compareDeep(end, o.end, true) - && compareDeep(overbooked, o.overbooked, true) && compareDeep(comment, o.comment, true); + return compareDeep(identifier, o.identifier, true) && compareDeep(serviceCategory, o.serviceCategory, true) + && compareDeep(serviceType, o.serviceType, true) && compareDeep(specialty, o.specialty, true) && compareDeep(appointmentType, o.appointmentType, true) + && compareDeep(schedule, o.schedule, true) && compareDeep(status, o.status, true) && compareDeep(start, o.start, true) + && compareDeep(end, o.end, true) && compareDeep(overbooked, o.overbooked, true) && compareDeep(comment, o.comment, true) + ; } @Override @@ -697,15 +853,13 @@ public class Slot extends DomainResource { if (!(other instanceof Slot)) return false; Slot o = (Slot) other; - return compareValues(freeBusyType, o.freeBusyType, true) && compareValues(start, o.start, true) && compareValues(end, o.end, true) + return compareValues(status, o.status, true) && compareValues(start, o.start, true) && compareValues(end, o.end, true) && compareValues(overbooked, o.overbooked, true) && compareValues(comment, o.comment, true); } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (type == null || type.isEmpty()) - && (schedule == null || schedule.isEmpty()) && (freeBusyType == null || freeBusyType.isEmpty()) - && (start == null || start.isEmpty()) && (end == null || end.isEmpty()) && (overbooked == null || overbooked.isEmpty()) - && (comment == null || comment.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, serviceCategory, serviceType + , specialty, appointmentType, schedule, status, start, end, overbooked, comment); } @Override @@ -784,40 +938,40 @@ public class Slot extends DomainResource { *

* Description: The type of appointments that can be booked into the slot
* Type: token
- * Path: Slot.type
+ * Path: Slot.serviceType
*

*/ - @SearchParamDefinition(name="slot-type", path="Slot.type", description="The type of appointments that can be booked into the slot", type="token" ) + @SearchParamDefinition(name="slot-type", path="Slot.serviceType", description="The type of appointments that can be booked into the slot", type="token" ) public static final String SP_SLOT_TYPE = "slot-type"; /** * Fluent Client search parameter constant for slot-type *

* Description: The type of appointments that can be booked into the slot
* Type: token
- * Path: Slot.type
+ * Path: Slot.serviceType
*

*/ public static final ca.uhn.fhir.rest.gclient.TokenClientParam SLOT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SLOT_TYPE); /** - * Search parameter: fb-type + * Search parameter: status *

* Description: The free/busy status of the appointment
* Type: token
- * Path: Slot.freeBusyType
+ * Path: Slot.status
*

*/ - @SearchParamDefinition(name="fb-type", path="Slot.freeBusyType", description="The free/busy status of the appointment", type="token" ) - public static final String SP_FB_TYPE = "fb-type"; + @SearchParamDefinition(name="status", path="Slot.status", description="The free/busy status of the appointment", type="token" ) + public static final String SP_STATUS = "status"; /** - * Fluent Client search parameter constant for fb-type + * Fluent Client search parameter constant for status *

* Description: The free/busy status of the appointment
* Type: token
- * Path: Slot.freeBusyType
+ * Path: Slot.status
*

*/ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam FB_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FB_TYPE); + public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Specimen.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Specimen.java index c0af7ed3b33..fc21f45e3df 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Specimen.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Specimen.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A sample to be used for analysis. */ @@ -184,9 +183,9 @@ public class Specimen extends DomainResource { /** * To communicate any details or issues encountered during the specimen collection procedure. */ - @Child(name = "comment", type = {StringType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "comment", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Collector comments", formalDefinition="To communicate any details or issues encountered during the specimen collection procedure." ) - protected List comment; + protected StringType comment; /** * Time when specimen was collected from subject - the physiologically relevant time. @@ -216,7 +215,7 @@ public class Specimen extends DomainResource { @Description(shortDefinition="Anatomical collection site", formalDefinition="Anatomical location from which the specimen was collected (if subject is a patient). This is the target site. This element is not used for environmental specimens." ) protected CodeableConcept bodySite; - private static final long serialVersionUID = -1418734687L; + private static final long serialVersionUID = 2083688215L; /** * Constructor @@ -270,57 +269,52 @@ public class Specimen extends DomainResource { } /** - * @return {@link #comment} (To communicate any details or issues encountered during the specimen collection procedure.) + * @return {@link #comment} (To communicate any details or issues encountered during the specimen collection procedure.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value */ - public List getComment() { + public StringType getCommentElement() { if (this.comment == null) - this.comment = new ArrayList(); + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SpecimenCollectionComponent.comment"); + else if (Configuration.doAutoCreate()) + this.comment = new StringType(); // bb return this.comment; } + public boolean hasCommentElement() { + return this.comment != null && !this.comment.isEmpty(); + } + public boolean hasComment() { - if (this.comment == null) - return false; - for (StringType item : this.comment) - if (!item.isEmpty()) - return true; - return false; + return this.comment != null && !this.comment.isEmpty(); } /** - * @return {@link #comment} (To communicate any details or issues encountered during the specimen collection procedure.) + * @param value {@link #comment} (To communicate any details or issues encountered during the specimen collection procedure.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value */ - // syntactic sugar - public StringType addCommentElement() {//2 - StringType t = new StringType(); - if (this.comment == null) - this.comment = new ArrayList(); - this.comment.add(t); - return t; - } - - /** - * @param value {@link #comment} (To communicate any details or issues encountered during the specimen collection procedure.) - */ - public SpecimenCollectionComponent addComment(String value) { //1 - StringType t = new StringType(); - t.setValue(value); - if (this.comment == null) - this.comment = new ArrayList(); - this.comment.add(t); + public SpecimenCollectionComponent setCommentElement(StringType value) { + this.comment = value; return this; } /** - * @param value {@link #comment} (To communicate any details or issues encountered during the specimen collection procedure.) + * @return To communicate any details or issues encountered during the specimen collection procedure. */ - public boolean hasComment(String value) { - if (this.comment == null) - return false; - for (StringType v : this.comment) - if (v.equals(value)) // string - return true; - return false; + public String getComment() { + return this.comment == null ? null : this.comment.getValue(); + } + + /** + * @param value To communicate any details or issues encountered during the specimen collection procedure. + */ + public SpecimenCollectionComponent setComment(String value) { + if (Utilities.noString(value)) + this.comment = null; + else { + if (this.comment == null) + this.comment = new StringType(); + this.comment.setValue(value); + } + return this; } /** @@ -455,7 +449,7 @@ public class Specimen extends DomainResource { if (name.equals("collector")) this.collector = castToReference(value); // Reference else if (name.equals("comment")) - this.getComment().add(castToString(value)); + this.comment = castToString(value); // StringType else if (name.equals("collected[x]")) this.collected = (Type) value; // Type else if (name.equals("quantity")) @@ -505,11 +499,7 @@ public class Specimen extends DomainResource { SpecimenCollectionComponent dst = new SpecimenCollectionComponent(); copyValues(dst); dst.collector = collector == null ? null : collector.copy(); - if (comment != null) { - dst.comment = new ArrayList(); - for (StringType i : comment) - dst.comment.add(i.copy()); - }; + dst.comment = comment == null ? null : comment.copy(); dst.collected = collected == null ? null : collected.copy(); dst.quantity = quantity == null ? null : quantity.copy(); dst.method = method == null ? null : method.copy(); @@ -540,9 +530,8 @@ public class Specimen extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (collector == null || collector.isEmpty()) && (comment == null || comment.isEmpty()) - && (collected == null || collected.isEmpty()) && (quantity == null || quantity.isEmpty()) - && (method == null || method.isEmpty()) && (bodySite == null || bodySite.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( collector, comment, collected + , quantity, method, bodySite); } public String fhirType() { @@ -793,8 +782,8 @@ public class Specimen extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (description == null || description.isEmpty()) && (procedure == null || procedure.isEmpty()) - && (additive == null || additive.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( description, procedure, additive + ); } public String fhirType() { @@ -1162,9 +1151,8 @@ public class Specimen extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (description == null || description.isEmpty()) - && (type == null || type.isEmpty()) && (capacity == null || capacity.isEmpty()) && (specimenQuantity == null || specimenQuantity.isEmpty()) - && (additive == null || additive.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, description, type + , capacity, specimenQuantity, additive); } public String fhirType() { @@ -1181,32 +1169,27 @@ public class Specimen extends DomainResource { @Description(shortDefinition="External Identifier", formalDefinition="Id for specimen." ) protected List identifier; + /** + * The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures. + */ + @Child(name = "accessionIdentifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Identifier assigned by the lab", formalDefinition="The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures." ) + protected Identifier accessionIdentifier; + /** * The availability of the specimen. */ - @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) + @Child(name = "status", type = {CodeType.class}, order=2, min=0, max=1, modifier=true, summary=true) @Description(shortDefinition="available | unavailable | unsatisfactory | entered-in-error", formalDefinition="The availability of the specimen." ) protected Enumeration status; /** * The kind of material that forms the specimen. */ - @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Kind of material that forms the specimen", formalDefinition="The kind of material that forms the specimen." ) protected CodeableConcept type; - /** - * Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen. - */ - @Child(name = "parent", type = {Specimen.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Specimen from which this specimen originated", formalDefinition="Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen." ) - protected List parent; - /** - * The actual objects that are the target of the reference (Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.) - */ - protected List parentTarget; - - /** * Where the specimen came from. This may be from the patient(s) or from the environment or a device. */ @@ -1219,20 +1202,25 @@ public class Specimen extends DomainResource { */ protected Resource subjectTarget; - /** - * The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures. - */ - @Child(name = "accessionIdentifier", type = {Identifier.class}, order=5, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Identifier assigned by the lab", formalDefinition="The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures." ) - protected Identifier accessionIdentifier; - /** * Time when specimen was received for processing or testing. */ - @Child(name = "receivedTime", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "receivedTime", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="The time when specimen was received for processing", formalDefinition="Time when specimen was received for processing or testing." ) protected DateTimeType receivedTime; + /** + * Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen. + */ + @Child(name = "parent", type = {Specimen.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Specimen from which this specimen originated", formalDefinition="Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen." ) + protected List parent; + /** + * The actual objects that are the target of the reference (Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.) + */ + protected List parentTarget; + + /** * Details concerning the specimen collection. */ @@ -1254,7 +1242,7 @@ public class Specimen extends DomainResource { @Description(shortDefinition="Direct container of specimen (tube/slide, etc.)", formalDefinition="The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here." ) protected List container; - private static final long serialVersionUID = 1025605602L; + private static final long serialVersionUID = -374913648L; /** * Constructor @@ -1311,6 +1299,30 @@ public class Specimen extends DomainResource { return this; } + /** + * @return {@link #accessionIdentifier} (The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.) + */ + public Identifier getAccessionIdentifier() { + if (this.accessionIdentifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Specimen.accessionIdentifier"); + else if (Configuration.doAutoCreate()) + this.accessionIdentifier = new Identifier(); // cc + return this.accessionIdentifier; + } + + public boolean hasAccessionIdentifier() { + return this.accessionIdentifier != null && !this.accessionIdentifier.isEmpty(); + } + + /** + * @param value {@link #accessionIdentifier} (The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.) + */ + public Specimen setAccessionIdentifier(Identifier value) { + this.accessionIdentifier = value; + return this; + } + /** * @return {@link #status} (The availability of the specimen.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value */ @@ -1384,6 +1396,94 @@ public class Specimen extends DomainResource { return this; } + /** + * @return {@link #subject} (Where the specimen came from. This may be from the patient(s) or from the environment or a device.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Specimen.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (Where the specimen came from. This may be from the patient(s) or from the environment or a device.) + */ + public Specimen setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Where the specimen came from. This may be from the patient(s) or from the environment or a device.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Where the specimen came from. This may be from the patient(s) or from the environment or a device.) + */ + public Specimen setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #receivedTime} (Time when specimen was received for processing or testing.). This is the underlying object with id, value and extensions. The accessor "getReceivedTime" gives direct access to the value + */ + public DateTimeType getReceivedTimeElement() { + if (this.receivedTime == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Specimen.receivedTime"); + else if (Configuration.doAutoCreate()) + this.receivedTime = new DateTimeType(); // bb + return this.receivedTime; + } + + public boolean hasReceivedTimeElement() { + return this.receivedTime != null && !this.receivedTime.isEmpty(); + } + + public boolean hasReceivedTime() { + return this.receivedTime != null && !this.receivedTime.isEmpty(); + } + + /** + * @param value {@link #receivedTime} (Time when specimen was received for processing or testing.). This is the underlying object with id, value and extensions. The accessor "getReceivedTime" gives direct access to the value + */ + public Specimen setReceivedTimeElement(DateTimeType value) { + this.receivedTime = value; + return this; + } + + /** + * @return Time when specimen was received for processing or testing. + */ + public Date getReceivedTime() { + return this.receivedTime == null ? null : this.receivedTime.getValue(); + } + + /** + * @param value Time when specimen was received for processing or testing. + */ + public Specimen setReceivedTime(Date value) { + if (value == null) + this.receivedTime = null; + else { + if (this.receivedTime == null) + this.receivedTime = new DateTimeType(); + this.receivedTime.setValue(value); + } + return this; + } + /** * @return {@link #parent} (Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.) */ @@ -1445,118 +1545,6 @@ public class Specimen extends DomainResource { return r; } - /** - * @return {@link #subject} (Where the specimen came from. This may be from the patient(s) or from the environment or a device.) - */ - public Reference getSubject() { - if (this.subject == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Specimen.subject"); - else if (Configuration.doAutoCreate()) - this.subject = new Reference(); // cc - return this.subject; - } - - public boolean hasSubject() { - return this.subject != null && !this.subject.isEmpty(); - } - - /** - * @param value {@link #subject} (Where the specimen came from. This may be from the patient(s) or from the environment or a device.) - */ - public Specimen setSubject(Reference value) { - this.subject = value; - return this; - } - - /** - * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Where the specimen came from. This may be from the patient(s) or from the environment or a device.) - */ - public Resource getSubjectTarget() { - return this.subjectTarget; - } - - /** - * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Where the specimen came from. This may be from the patient(s) or from the environment or a device.) - */ - public Specimen setSubjectTarget(Resource value) { - this.subjectTarget = value; - return this; - } - - /** - * @return {@link #accessionIdentifier} (The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.) - */ - public Identifier getAccessionIdentifier() { - if (this.accessionIdentifier == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Specimen.accessionIdentifier"); - else if (Configuration.doAutoCreate()) - this.accessionIdentifier = new Identifier(); // cc - return this.accessionIdentifier; - } - - public boolean hasAccessionIdentifier() { - return this.accessionIdentifier != null && !this.accessionIdentifier.isEmpty(); - } - - /** - * @param value {@link #accessionIdentifier} (The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.) - */ - public Specimen setAccessionIdentifier(Identifier value) { - this.accessionIdentifier = value; - return this; - } - - /** - * @return {@link #receivedTime} (Time when specimen was received for processing or testing.). This is the underlying object with id, value and extensions. The accessor "getReceivedTime" gives direct access to the value - */ - public DateTimeType getReceivedTimeElement() { - if (this.receivedTime == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create Specimen.receivedTime"); - else if (Configuration.doAutoCreate()) - this.receivedTime = new DateTimeType(); // bb - return this.receivedTime; - } - - public boolean hasReceivedTimeElement() { - return this.receivedTime != null && !this.receivedTime.isEmpty(); - } - - public boolean hasReceivedTime() { - return this.receivedTime != null && !this.receivedTime.isEmpty(); - } - - /** - * @param value {@link #receivedTime} (Time when specimen was received for processing or testing.). This is the underlying object with id, value and extensions. The accessor "getReceivedTime" gives direct access to the value - */ - public Specimen setReceivedTimeElement(DateTimeType value) { - this.receivedTime = value; - return this; - } - - /** - * @return Time when specimen was received for processing or testing. - */ - public Date getReceivedTime() { - return this.receivedTime == null ? null : this.receivedTime.getValue(); - } - - /** - * @param value Time when specimen was received for processing or testing. - */ - public Specimen setReceivedTime(Date value) { - if (value == null) - this.receivedTime = null; - else { - if (this.receivedTime == null) - this.receivedTime = new DateTimeType(); - this.receivedTime.setValue(value); - } - return this; - } - /** * @return {@link #collection} (Details concerning the specimen collection.) */ @@ -1664,12 +1652,12 @@ public class Specimen extends DomainResource { protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("identifier", "Identifier", "Id for specimen.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("accessionIdentifier", "Identifier", "The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.", 0, java.lang.Integer.MAX_VALUE, accessionIdentifier)); childrenList.add(new Property("status", "code", "The availability of the specimen.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("type", "CodeableConcept", "The kind of material that forms the specimen.", 0, java.lang.Integer.MAX_VALUE, type)); - childrenList.add(new Property("parent", "Reference(Specimen)", "Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.", 0, java.lang.Integer.MAX_VALUE, parent)); childrenList.add(new Property("subject", "Reference(Patient|Group|Device|Substance)", "Where the specimen came from. This may be from the patient(s) or from the environment or a device.", 0, java.lang.Integer.MAX_VALUE, subject)); - childrenList.add(new Property("accessionIdentifier", "Identifier", "The identifier assigned by the lab when accessioning specimen(s). This is not necessarily the same as the specimen identifier, depending on local lab procedures.", 0, java.lang.Integer.MAX_VALUE, accessionIdentifier)); childrenList.add(new Property("receivedTime", "dateTime", "Time when specimen was received for processing or testing.", 0, java.lang.Integer.MAX_VALUE, receivedTime)); + childrenList.add(new Property("parent", "Reference(Specimen)", "Reference to the parent (source) specimen which is used when the specimen was either derived from or a component of another specimen.", 0, java.lang.Integer.MAX_VALUE, parent)); childrenList.add(new Property("collection", "", "Details concerning the specimen collection.", 0, java.lang.Integer.MAX_VALUE, collection)); childrenList.add(new Property("treatment", "", "Details concerning treatment and processing steps for the specimen.", 0, java.lang.Integer.MAX_VALUE, treatment)); childrenList.add(new Property("container", "", "The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.", 0, java.lang.Integer.MAX_VALUE, container)); @@ -1679,18 +1667,18 @@ public class Specimen extends DomainResource { public void setProperty(String name, Base value) throws FHIRException { if (name.equals("identifier")) this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("accessionIdentifier")) + this.accessionIdentifier = castToIdentifier(value); // Identifier else if (name.equals("status")) this.status = new SpecimenStatusEnumFactory().fromType(value); // Enumeration else if (name.equals("type")) this.type = castToCodeableConcept(value); // CodeableConcept - else if (name.equals("parent")) - this.getParent().add(castToReference(value)); else if (name.equals("subject")) this.subject = castToReference(value); // Reference - else if (name.equals("accessionIdentifier")) - this.accessionIdentifier = castToIdentifier(value); // Identifier else if (name.equals("receivedTime")) this.receivedTime = castToDateTime(value); // DateTimeType + else if (name.equals("parent")) + this.getParent().add(castToReference(value)); else if (name.equals("collection")) this.collection = (SpecimenCollectionComponent) value; // SpecimenCollectionComponent else if (name.equals("treatment")) @@ -1706,6 +1694,10 @@ public class Specimen extends DomainResource { if (name.equals("identifier")) { return addIdentifier(); } + else if (name.equals("accessionIdentifier")) { + this.accessionIdentifier = new Identifier(); + return this.accessionIdentifier; + } else if (name.equals("status")) { throw new FHIRException("Cannot call addChild on a primitive type Specimen.status"); } @@ -1713,20 +1705,16 @@ public class Specimen extends DomainResource { this.type = new CodeableConcept(); return this.type; } - else if (name.equals("parent")) { - return addParent(); - } else if (name.equals("subject")) { this.subject = new Reference(); return this.subject; } - else if (name.equals("accessionIdentifier")) { - this.accessionIdentifier = new Identifier(); - return this.accessionIdentifier; - } else if (name.equals("receivedTime")) { throw new FHIRException("Cannot call addChild on a primitive type Specimen.receivedTime"); } + else if (name.equals("parent")) { + return addParent(); + } else if (name.equals("collection")) { this.collection = new SpecimenCollectionComponent(); return this.collection; @@ -1754,16 +1742,16 @@ public class Specimen extends DomainResource { for (Identifier i : identifier) dst.identifier.add(i.copy()); }; + dst.accessionIdentifier = accessionIdentifier == null ? null : accessionIdentifier.copy(); dst.status = status == null ? null : status.copy(); dst.type = type == null ? null : type.copy(); + dst.subject = subject == null ? null : subject.copy(); + dst.receivedTime = receivedTime == null ? null : receivedTime.copy(); if (parent != null) { dst.parent = new ArrayList(); for (Reference i : parent) dst.parent.add(i.copy()); }; - dst.subject = subject == null ? null : subject.copy(); - dst.accessionIdentifier = accessionIdentifier == null ? null : accessionIdentifier.copy(); - dst.receivedTime = receivedTime == null ? null : receivedTime.copy(); dst.collection = collection == null ? null : collection.copy(); if (treatment != null) { dst.treatment = new ArrayList(); @@ -1789,9 +1777,9 @@ public class Specimen extends DomainResource { if (!(other instanceof Specimen)) return false; Specimen o = (Specimen) other; - return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(type, o.type, true) - && compareDeep(parent, o.parent, true) && compareDeep(subject, o.subject, true) && compareDeep(accessionIdentifier, o.accessionIdentifier, true) - && compareDeep(receivedTime, o.receivedTime, true) && compareDeep(collection, o.collection, true) + return compareDeep(identifier, o.identifier, true) && compareDeep(accessionIdentifier, o.accessionIdentifier, true) + && compareDeep(status, o.status, true) && compareDeep(type, o.type, true) && compareDeep(subject, o.subject, true) + && compareDeep(receivedTime, o.receivedTime, true) && compareDeep(parent, o.parent, true) && compareDeep(collection, o.collection, true) && compareDeep(treatment, o.treatment, true) && compareDeep(container, o.container, true); } @@ -1806,11 +1794,8 @@ public class Specimen extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) - && (type == null || type.isEmpty()) && (parent == null || parent.isEmpty()) && (subject == null || subject.isEmpty()) - && (accessionIdentifier == null || accessionIdentifier.isEmpty()) && (receivedTime == null || receivedTime.isEmpty()) - && (collection == null || collection.isEmpty()) && (treatment == null || treatment.isEmpty()) - && (container == null || container.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, accessionIdentifier + , status, type, subject, receivedTime, parent, collection, treatment, container); } @Override @@ -1932,7 +1917,7 @@ public class Specimen extends DomainResource { * Path: Specimen.subject
*

*/ - @SearchParamDefinition(name="subject", path="Specimen.subject", description="The subject of the specimen", type="reference" ) + @SearchParamDefinition(name="subject", path="Specimen.subject", description="The subject of the specimen", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_SUBJECT = "subject"; /** * Fluent Client search parameter constant for subject @@ -2044,7 +2029,7 @@ public class Specimen extends DomainResource { * Path: Specimen.collection.collector
*

*/ - @SearchParamDefinition(name="collector", path="Specimen.collection.collector", description="Who collected the specimen", type="reference" ) + @SearchParamDefinition(name="collector", path="Specimen.collection.collector", description="Who collected the specimen", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_COLLECTOR = "collector"; /** * Fluent Client search parameter constant for collector diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/StructureDefinition.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/StructureDefinition.java index c6ddb206272..a0692f8b755 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/StructureDefinition.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/StructureDefinition.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions, and constraints on resources and data types. */ @@ -162,10 +160,6 @@ public class StructureDefinition extends DomainResource { * The context is all nodes matching a particular data type element path (root or repeating element) or all elements referencing a particular primitive data type (expressed as the datatype name). */ DATATYPE, - /** - * The context is all nodes whose mapping to a specified reference model corresponds to a particular mapping structure. The context identifies the mapping target. The mapping should clearly identify where such an extension could be used. - */ - MAPPING, /** * The context is a particular extension from a particular profile, a uri that identifies the extension definition. */ @@ -181,8 +175,6 @@ public class StructureDefinition extends DomainResource { return RESOURCE; if ("datatype".equals(codeString)) return DATATYPE; - if ("mapping".equals(codeString)) - return MAPPING; if ("extension".equals(codeString)) return EXTENSION; throw new FHIRException("Unknown ExtensionContext code '"+codeString+"'"); @@ -191,7 +183,6 @@ public class StructureDefinition extends DomainResource { switch (this) { case RESOURCE: return "resource"; case DATATYPE: return "datatype"; - case MAPPING: return "mapping"; case EXTENSION: return "extension"; default: return "?"; } @@ -200,7 +191,6 @@ public class StructureDefinition extends DomainResource { switch (this) { case RESOURCE: return "http://hl7.org/fhir/extension-context"; case DATATYPE: return "http://hl7.org/fhir/extension-context"; - case MAPPING: return "http://hl7.org/fhir/extension-context"; case EXTENSION: return "http://hl7.org/fhir/extension-context"; default: return "?"; } @@ -209,7 +199,6 @@ public class StructureDefinition extends DomainResource { switch (this) { case RESOURCE: return "The context is all elements matching a particular resource element path."; case DATATYPE: return "The context is all nodes matching a particular data type element path (root or repeating element) or all elements referencing a particular primitive data type (expressed as the datatype name)."; - case MAPPING: return "The context is all nodes whose mapping to a specified reference model corresponds to a particular mapping structure. The context identifies the mapping target. The mapping should clearly identify where such an extension could be used."; case EXTENSION: return "The context is a particular extension from a particular profile, a uri that identifies the extension definition."; default: return "?"; } @@ -218,7 +207,6 @@ public class StructureDefinition extends DomainResource { switch (this) { case RESOURCE: return "Resource"; case DATATYPE: return "Datatype"; - case MAPPING: return "Mapping"; case EXTENSION: return "Extension"; default: return "?"; } @@ -234,8 +222,6 @@ public class StructureDefinition extends DomainResource { return ExtensionContext.RESOURCE; if ("datatype".equals(codeString)) return ExtensionContext.DATATYPE; - if ("mapping".equals(codeString)) - return ExtensionContext.MAPPING; if ("extension".equals(codeString)) return ExtensionContext.EXTENSION; throw new IllegalArgumentException("Unknown ExtensionContext code '"+codeString+"'"); @@ -250,8 +236,6 @@ public class StructureDefinition extends DomainResource { return new Enumeration(this, ExtensionContext.RESOURCE); if ("datatype".equals(codeString)) return new Enumeration(this, ExtensionContext.DATATYPE); - if ("mapping".equals(codeString)) - return new Enumeration(this, ExtensionContext.MAPPING); if ("extension".equals(codeString)) return new Enumeration(this, ExtensionContext.EXTENSION); throw new FHIRException("Unknown ExtensionContext code '"+codeString+"'"); @@ -261,8 +245,6 @@ public class StructureDefinition extends DomainResource { return "resource"; if (code == ExtensionContext.DATATYPE) return "datatype"; - if (code == ExtensionContext.MAPPING) - return "mapping"; if (code == ExtensionContext.EXTENSION) return "extension"; return "?"; @@ -272,13 +254,100 @@ public class StructureDefinition extends DomainResource { } } + public enum TypeDerivationRule { + /** + * This definition defines a new type that adds additional elements to the base type + */ + SPECIALIZATION, + /** + * This definition adds additional rules to an existing concrete type + */ + CONSTRAINT, + /** + * added to help the parsers + */ + NULL; + public static TypeDerivationRule fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("specialization".equals(codeString)) + return SPECIALIZATION; + if ("constraint".equals(codeString)) + return CONSTRAINT; + throw new FHIRException("Unknown TypeDerivationRule code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SPECIALIZATION: return "specialization"; + case CONSTRAINT: return "constraint"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case SPECIALIZATION: return "http://hl7.org/fhir/type-derivation-rule"; + case CONSTRAINT: return "http://hl7.org/fhir/type-derivation-rule"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case SPECIALIZATION: return "This definition defines a new type that adds additional elements to the base type"; + case CONSTRAINT: return "This definition adds additional rules to an existing concrete type"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SPECIALIZATION: return "Specialization"; + case CONSTRAINT: return "Constraint"; + default: return "?"; + } + } + } + + public static class TypeDerivationRuleEnumFactory implements EnumFactory { + public TypeDerivationRule fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("specialization".equals(codeString)) + return TypeDerivationRule.SPECIALIZATION; + if ("constraint".equals(codeString)) + return TypeDerivationRule.CONSTRAINT; + throw new IllegalArgumentException("Unknown TypeDerivationRule code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("specialization".equals(codeString)) + return new Enumeration(this, TypeDerivationRule.SPECIALIZATION); + if ("constraint".equals(codeString)) + return new Enumeration(this, TypeDerivationRule.CONSTRAINT); + throw new FHIRException("Unknown TypeDerivationRule code '"+codeString+"'"); + } + public String toCode(TypeDerivationRule code) { + if (code == TypeDerivationRule.SPECIALIZATION) + return "specialization"; + if (code == TypeDerivationRule.CONSTRAINT) + return "constraint"; + return "?"; + } + public String toSystem(TypeDerivationRule code) { + return code.getSystem(); + } + } + @Block() public static class StructureDefinitionContactComponent extends BackboneElement implements IBaseBackboneElement { /** * The name of an individual to contact regarding the structure definition. */ @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the structure definition." ) + @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the structure definition." ) protected StringType name; /** @@ -447,8 +516,7 @@ public class StructureDefinition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); } public String fhirType() { @@ -770,8 +838,8 @@ public class StructureDefinition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identity == null || identity.isEmpty()) && (uri == null || uri.isEmpty()) - && (name == null || name.isEmpty()) && (comments == null || comments.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identity, uri, name, comments + ); } public String fhirType() { @@ -893,7 +961,7 @@ public class StructureDefinition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (element == null || element.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( element); } public String fhirType() { @@ -1015,7 +1083,7 @@ public class StructureDefinition extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (element == null || element.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( element); } public String fhirType() { @@ -1131,10 +1199,10 @@ public class StructureDefinition extends DomainResource { protected List code; /** - * The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.3.0 for this version. + * The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version. */ @Child(name = "fhirVersion", type = {IdType.class}, order=15, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="FHIR Version this StructureDefinition targets", formalDefinition="The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.3.0 for this version." ) + @Description(shortDefinition="FHIR Version this StructureDefinition targets", formalDefinition="The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version." ) protected IdType fhirVersion; /** @@ -1151,56 +1219,63 @@ public class StructureDefinition extends DomainResource { @Description(shortDefinition="datatype | resource | logical", formalDefinition="Defines the kind of structure that this definition is describing." ) protected Enumeration kind; - /** - * The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure. - */ - @Child(name = "constrainedType", type = {CodeType.class}, order=18, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Any datatype or resource, including abstract ones", formalDefinition="The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure." ) - protected CodeType constrainedType; - /** * Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type. */ - @Child(name = "abstract", type = {BooleanType.class}, order=19, min=1, max=1, modifier=false, summary=true) + @Child(name = "abstract", type = {BooleanType.class}, order=18, min=1, max=1, modifier=false, summary=true) @Description(shortDefinition="Whether the structure is abstract", formalDefinition="Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type." ) protected BooleanType abstract_; /** * If this is an extension, Identifies the context within FHIR resources where the extension can be used. */ - @Child(name = "contextType", type = {CodeType.class}, order=20, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="resource | datatype | mapping | extension", formalDefinition="If this is an extension, Identifies the context within FHIR resources where the extension can be used." ) + @Child(name = "contextType", type = {CodeType.class}, order=19, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="resource | datatype | extension", formalDefinition="If this is an extension, Identifies the context within FHIR resources where the extension can be used." ) protected Enumeration contextType; /** * Identifies the types of resource or data type elements to which the extension can be applied. */ - @Child(name = "context", type = {StringType.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Child(name = "context", type = {StringType.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) @Description(shortDefinition="Where the extension can be used in instances", formalDefinition="Identifies the types of resource or data type elements to which the extension can be applied." ) protected List context; /** - * An absolute URI that is the base structure from which this set of constraints is derived. + * The type of type that this structure is derived from - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is deriving from this type. If it is not present, then the structure definition is the definition of a base abstract structure. */ - @Child(name = "base", type = {UriType.class}, order=22, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Structure that this set of constraints applies to", formalDefinition="An absolute URI that is the base structure from which this set of constraints is derived." ) - protected UriType base; + @Child(name = "baseType", type = {CodeType.class}, order=21, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Any datatype or resource, including abstract ones", formalDefinition="The type of type that this structure is derived from - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is deriving from this type. If it is not present, then the structure definition is the definition of a base abstract structure." ) + protected CodeType baseType; + + /** + * An absolute URI that is the base structure from which this type is derived, either by specialization or constraint. + */ + @Child(name = "baseDefinition", type = {UriType.class}, order=22, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Definition that this type is constrained/specialized from", formalDefinition="An absolute URI that is the base structure from which this type is derived, either by specialization or constraint." ) + protected UriType baseDefinition; + + /** + * How the type relates to the baseDefinition. + */ + @Child(name = "derivation", type = {CodeType.class}, order=23, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="specialization | constraint - How relates to base definition", formalDefinition="How the type relates to the baseDefinition." ) + protected Enumeration derivation; /** * A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition. */ - @Child(name = "snapshot", type = {}, order=23, min=0, max=1, modifier=false, summary=false) + @Child(name = "snapshot", type = {}, order=24, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Snapshot view of the structure", formalDefinition="A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition." ) protected StructureDefinitionSnapshotComponent snapshot; /** * A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies. */ - @Child(name = "differential", type = {}, order=24, min=0, max=1, modifier=false, summary=false) + @Child(name = "differential", type = {}, order=25, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Differential view of the structure", formalDefinition="A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies." ) protected StructureDefinitionDifferentialComponent differential; - private static final long serialVersionUID = -580779569L; + private static final long serialVersionUID = -1505153076L; /** * Constructor @@ -1905,7 +1980,7 @@ public class StructureDefinition extends DomainResource { } /** - * @return {@link #fhirVersion} (The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.3.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value + * @return {@link #fhirVersion} (The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value */ public IdType getFhirVersionElement() { if (this.fhirVersion == null) @@ -1925,7 +2000,7 @@ public class StructureDefinition extends DomainResource { } /** - * @param value {@link #fhirVersion} (The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.3.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value + * @param value {@link #fhirVersion} (The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value */ public StructureDefinition setFhirVersionElement(IdType value) { this.fhirVersion = value; @@ -1933,14 +2008,14 @@ public class StructureDefinition extends DomainResource { } /** - * @return The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.3.0 for this version. + * @return The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version. */ public String getFhirVersion() { return this.fhirVersion == null ? null : this.fhirVersion.getValue(); } /** - * @param value The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.3.0 for this version. + * @param value The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version. */ public StructureDefinition setFhirVersion(String value) { if (Utilities.noString(value)) @@ -2038,55 +2113,6 @@ public class StructureDefinition extends DomainResource { return this; } - /** - * @return {@link #constrainedType} (The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure.). This is the underlying object with id, value and extensions. The accessor "getConstrainedType" gives direct access to the value - */ - public CodeType getConstrainedTypeElement() { - if (this.constrainedType == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StructureDefinition.constrainedType"); - else if (Configuration.doAutoCreate()) - this.constrainedType = new CodeType(); // bb - return this.constrainedType; - } - - public boolean hasConstrainedTypeElement() { - return this.constrainedType != null && !this.constrainedType.isEmpty(); - } - - public boolean hasConstrainedType() { - return this.constrainedType != null && !this.constrainedType.isEmpty(); - } - - /** - * @param value {@link #constrainedType} (The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure.). This is the underlying object with id, value and extensions. The accessor "getConstrainedType" gives direct access to the value - */ - public StructureDefinition setConstrainedTypeElement(CodeType value) { - this.constrainedType = value; - return this; - } - - /** - * @return The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure. - */ - public String getConstrainedType() { - return this.constrainedType == null ? null : this.constrainedType.getValue(); - } - - /** - * @param value The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure. - */ - public StructureDefinition setConstrainedType(String value) { - if (Utilities.noString(value)) - this.constrainedType = null; - else { - if (this.constrainedType == null) - this.constrainedType = new CodeType(); - this.constrainedType.setValue(value); - } - return this; - } - /** * @return {@link #abstract_} (Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type.). This is the underlying object with id, value and extensions. The accessor "getAbstract" gives direct access to the value */ @@ -2236,50 +2262,148 @@ public class StructureDefinition extends DomainResource { } /** - * @return {@link #base} (An absolute URI that is the base structure from which this set of constraints is derived.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value + * @return {@link #baseType} (The type of type that this structure is derived from - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is deriving from this type. If it is not present, then the structure definition is the definition of a base abstract structure.). This is the underlying object with id, value and extensions. The accessor "getBaseType" gives direct access to the value */ - public UriType getBaseElement() { - if (this.base == null) + public CodeType getBaseTypeElement() { + if (this.baseType == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create StructureDefinition.base"); + throw new Error("Attempt to auto-create StructureDefinition.baseType"); else if (Configuration.doAutoCreate()) - this.base = new UriType(); // bb - return this.base; + this.baseType = new CodeType(); // bb + return this.baseType; } - public boolean hasBaseElement() { - return this.base != null && !this.base.isEmpty(); + public boolean hasBaseTypeElement() { + return this.baseType != null && !this.baseType.isEmpty(); } - public boolean hasBase() { - return this.base != null && !this.base.isEmpty(); + public boolean hasBaseType() { + return this.baseType != null && !this.baseType.isEmpty(); } /** - * @param value {@link #base} (An absolute URI that is the base structure from which this set of constraints is derived.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value + * @param value {@link #baseType} (The type of type that this structure is derived from - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is deriving from this type. If it is not present, then the structure definition is the definition of a base abstract structure.). This is the underlying object with id, value and extensions. The accessor "getBaseType" gives direct access to the value */ - public StructureDefinition setBaseElement(UriType value) { - this.base = value; + public StructureDefinition setBaseTypeElement(CodeType value) { + this.baseType = value; return this; } /** - * @return An absolute URI that is the base structure from which this set of constraints is derived. + * @return The type of type that this structure is derived from - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is deriving from this type. If it is not present, then the structure definition is the definition of a base abstract structure. */ - public String getBase() { - return this.base == null ? null : this.base.getValue(); + public String getBaseType() { + return this.baseType == null ? null : this.baseType.getValue(); } /** - * @param value An absolute URI that is the base structure from which this set of constraints is derived. + * @param value The type of type that this structure is derived from - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is deriving from this type. If it is not present, then the structure definition is the definition of a base abstract structure. */ - public StructureDefinition setBase(String value) { + public StructureDefinition setBaseType(String value) { if (Utilities.noString(value)) - this.base = null; + this.baseType = null; else { - if (this.base == null) - this.base = new UriType(); - this.base.setValue(value); + if (this.baseType == null) + this.baseType = new CodeType(); + this.baseType.setValue(value); + } + return this; + } + + /** + * @return {@link #baseDefinition} (An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.). This is the underlying object with id, value and extensions. The accessor "getBaseDefinition" gives direct access to the value + */ + public UriType getBaseDefinitionElement() { + if (this.baseDefinition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.baseDefinition"); + else if (Configuration.doAutoCreate()) + this.baseDefinition = new UriType(); // bb + return this.baseDefinition; + } + + public boolean hasBaseDefinitionElement() { + return this.baseDefinition != null && !this.baseDefinition.isEmpty(); + } + + public boolean hasBaseDefinition() { + return this.baseDefinition != null && !this.baseDefinition.isEmpty(); + } + + /** + * @param value {@link #baseDefinition} (An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.). This is the underlying object with id, value and extensions. The accessor "getBaseDefinition" gives direct access to the value + */ + public StructureDefinition setBaseDefinitionElement(UriType value) { + this.baseDefinition = value; + return this; + } + + /** + * @return An absolute URI that is the base structure from which this type is derived, either by specialization or constraint. + */ + public String getBaseDefinition() { + return this.baseDefinition == null ? null : this.baseDefinition.getValue(); + } + + /** + * @param value An absolute URI that is the base structure from which this type is derived, either by specialization or constraint. + */ + public StructureDefinition setBaseDefinition(String value) { + if (Utilities.noString(value)) + this.baseDefinition = null; + else { + if (this.baseDefinition == null) + this.baseDefinition = new UriType(); + this.baseDefinition.setValue(value); + } + return this; + } + + /** + * @return {@link #derivation} (How the type relates to the baseDefinition.). This is the underlying object with id, value and extensions. The accessor "getDerivation" gives direct access to the value + */ + public Enumeration getDerivationElement() { + if (this.derivation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureDefinition.derivation"); + else if (Configuration.doAutoCreate()) + this.derivation = new Enumeration(new TypeDerivationRuleEnumFactory()); // bb + return this.derivation; + } + + public boolean hasDerivationElement() { + return this.derivation != null && !this.derivation.isEmpty(); + } + + public boolean hasDerivation() { + return this.derivation != null && !this.derivation.isEmpty(); + } + + /** + * @param value {@link #derivation} (How the type relates to the baseDefinition.). This is the underlying object with id, value and extensions. The accessor "getDerivation" gives direct access to the value + */ + public StructureDefinition setDerivationElement(Enumeration value) { + this.derivation = value; + return this; + } + + /** + * @return How the type relates to the baseDefinition. + */ + public TypeDerivationRule getDerivation() { + return this.derivation == null ? null : this.derivation.getValue(); + } + + /** + * @param value How the type relates to the baseDefinition. + */ + public StructureDefinition setDerivation(TypeDerivationRule value) { + if (value == null) + this.derivation = null; + else { + if (this.derivation == null) + this.derivation = new Enumeration(new TypeDerivationRuleEnumFactory()); + this.derivation.setValue(value); } return this; } @@ -2349,14 +2473,15 @@ public class StructureDefinition extends DomainResource { childrenList.add(new Property("requirements", "string", "Explains why this structure definition is needed and why it's been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); childrenList.add(new Property("copyright", "string", "A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.", 0, java.lang.Integer.MAX_VALUE, copyright)); childrenList.add(new Property("code", "Coding", "A set of terms from external terminologies that may be used to assist with indexing and searching of templates.", 0, java.lang.Integer.MAX_VALUE, code)); - childrenList.add(new Property("fhirVersion", "id", "The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.3.0 for this version.", 0, java.lang.Integer.MAX_VALUE, fhirVersion)); + childrenList.add(new Property("fhirVersion", "id", "The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version.", 0, java.lang.Integer.MAX_VALUE, fhirVersion)); childrenList.add(new Property("mapping", "", "An external specification that the content is mapped to.", 0, java.lang.Integer.MAX_VALUE, mapping)); childrenList.add(new Property("kind", "code", "Defines the kind of structure that this definition is describing.", 0, java.lang.Integer.MAX_VALUE, kind)); - childrenList.add(new Property("constrainedType", "code", "The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure.", 0, java.lang.Integer.MAX_VALUE, constrainedType)); childrenList.add(new Property("abstract", "boolean", "Whether structure this definition describes is abstract or not - that is, whether an actual exchanged item can ever be of this type.", 0, java.lang.Integer.MAX_VALUE, abstract_)); childrenList.add(new Property("contextType", "code", "If this is an extension, Identifies the context within FHIR resources where the extension can be used.", 0, java.lang.Integer.MAX_VALUE, contextType)); childrenList.add(new Property("context", "string", "Identifies the types of resource or data type elements to which the extension can be applied.", 0, java.lang.Integer.MAX_VALUE, context)); - childrenList.add(new Property("base", "uri", "An absolute URI that is the base structure from which this set of constraints is derived.", 0, java.lang.Integer.MAX_VALUE, base)); + childrenList.add(new Property("baseType", "code", "The type of type that this structure is derived from - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is deriving from this type. If it is not present, then the structure definition is the definition of a base abstract structure.", 0, java.lang.Integer.MAX_VALUE, baseType)); + childrenList.add(new Property("baseDefinition", "uri", "An absolute URI that is the base structure from which this type is derived, either by specialization or constraint.", 0, java.lang.Integer.MAX_VALUE, baseDefinition)); + childrenList.add(new Property("derivation", "code", "How the type relates to the baseDefinition.", 0, java.lang.Integer.MAX_VALUE, derivation)); childrenList.add(new Property("snapshot", "", "A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition.", 0, java.lang.Integer.MAX_VALUE, snapshot)); childrenList.add(new Property("differential", "", "A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies.", 0, java.lang.Integer.MAX_VALUE, differential)); } @@ -2399,16 +2524,18 @@ public class StructureDefinition extends DomainResource { this.getMapping().add((StructureDefinitionMappingComponent) value); else if (name.equals("kind")) this.kind = new StructureDefinitionKindEnumFactory().fromType(value); // Enumeration - else if (name.equals("constrainedType")) - this.constrainedType = castToCode(value); // CodeType else if (name.equals("abstract")) this.abstract_ = castToBoolean(value); // BooleanType else if (name.equals("contextType")) this.contextType = new ExtensionContextEnumFactory().fromType(value); // Enumeration else if (name.equals("context")) this.getContext().add(castToString(value)); - else if (name.equals("base")) - this.base = castToUri(value); // UriType + else if (name.equals("baseType")) + this.baseType = castToCode(value); // CodeType + else if (name.equals("baseDefinition")) + this.baseDefinition = castToUri(value); // UriType + else if (name.equals("derivation")) + this.derivation = new TypeDerivationRuleEnumFactory().fromType(value); // Enumeration else if (name.equals("snapshot")) this.snapshot = (StructureDefinitionSnapshotComponent) value; // StructureDefinitionSnapshotComponent else if (name.equals("differential")) @@ -2473,9 +2600,6 @@ public class StructureDefinition extends DomainResource { else if (name.equals("kind")) { throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.kind"); } - else if (name.equals("constrainedType")) { - throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.constrainedType"); - } else if (name.equals("abstract")) { throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.abstract"); } @@ -2485,8 +2609,14 @@ public class StructureDefinition extends DomainResource { else if (name.equals("context")) { throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.context"); } - else if (name.equals("base")) { - throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.base"); + else if (name.equals("baseType")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.baseType"); + } + else if (name.equals("baseDefinition")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.baseDefinition"); + } + else if (name.equals("derivation")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureDefinition.derivation"); } else if (name.equals("snapshot")) { this.snapshot = new StructureDefinitionSnapshotComponent(); @@ -2546,7 +2676,6 @@ public class StructureDefinition extends DomainResource { dst.mapping.add(i.copy()); }; dst.kind = kind == null ? null : kind.copy(); - dst.constrainedType = constrainedType == null ? null : constrainedType.copy(); dst.abstract_ = abstract_ == null ? null : abstract_.copy(); dst.contextType = contextType == null ? null : contextType.copy(); if (context != null) { @@ -2554,7 +2683,9 @@ public class StructureDefinition extends DomainResource { for (StringType i : context) dst.context.add(i.copy()); }; - dst.base = base == null ? null : base.copy(); + dst.baseType = baseType == null ? null : baseType.copy(); + dst.baseDefinition = baseDefinition == null ? null : baseDefinition.copy(); + dst.derivation = derivation == null ? null : derivation.copy(); dst.snapshot = snapshot == null ? null : snapshot.copy(); dst.differential = differential == null ? null : differential.copy(); return dst; @@ -2577,10 +2708,10 @@ public class StructureDefinition extends DomainResource { && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) && compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true) && compareDeep(requirements, o.requirements, true) && compareDeep(copyright, o.copyright, true) && compareDeep(code, o.code, true) && compareDeep(fhirVersion, o.fhirVersion, true) - && compareDeep(mapping, o.mapping, true) && compareDeep(kind, o.kind, true) && compareDeep(constrainedType, o.constrainedType, true) - && compareDeep(abstract_, o.abstract_, true) && compareDeep(contextType, o.contextType, true) && compareDeep(context, o.context, true) - && compareDeep(base, o.base, true) && compareDeep(snapshot, o.snapshot, true) && compareDeep(differential, o.differential, true) - ; + && compareDeep(mapping, o.mapping, true) && compareDeep(kind, o.kind, true) && compareDeep(abstract_, o.abstract_, true) + && compareDeep(contextType, o.contextType, true) && compareDeep(context, o.context, true) && compareDeep(baseType, o.baseType, true) + && compareDeep(baseDefinition, o.baseDefinition, true) && compareDeep(derivation, o.derivation, true) + && compareDeep(snapshot, o.snapshot, true) && compareDeep(differential, o.differential, true); } @Override @@ -2594,23 +2725,17 @@ public class StructureDefinition extends DomainResource { && compareValues(display, o.display, true) && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) && compareValues(date, o.date, true) && compareValues(description, o.description, true) && compareValues(requirements, o.requirements, true) && compareValues(copyright, o.copyright, true) - && compareValues(fhirVersion, o.fhirVersion, true) && compareValues(kind, o.kind, true) && compareValues(constrainedType, o.constrainedType, true) - && compareValues(abstract_, o.abstract_, true) && compareValues(contextType, o.contextType, true) && compareValues(context, o.context, true) - && compareValues(base, o.base, true); + && compareValues(fhirVersion, o.fhirVersion, true) && compareValues(kind, o.kind, true) && compareValues(abstract_, o.abstract_, true) + && compareValues(contextType, o.contextType, true) && compareValues(context, o.context, true) && compareValues(baseType, o.baseType, true) + && compareValues(baseDefinition, o.baseDefinition, true) && compareValues(derivation, o.derivation, true) + ; } public boolean isEmpty() { - return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (display == null || display.isEmpty()) - && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty()) - && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) - && (description == null || description.isEmpty()) && (useContext == null || useContext.isEmpty()) - && (requirements == null || requirements.isEmpty()) && (copyright == null || copyright.isEmpty()) - && (code == null || code.isEmpty()) && (fhirVersion == null || fhirVersion.isEmpty()) && (mapping == null || mapping.isEmpty()) - && (kind == null || kind.isEmpty()) && (constrainedType == null || constrainedType.isEmpty()) - && (abstract_ == null || abstract_.isEmpty()) && (contextType == null || contextType.isEmpty()) - && (context == null || context.isEmpty()) && (base == null || base.isEmpty()) && (snapshot == null || snapshot.isEmpty()) - && (differential == null || differential.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, identifier, version, name + , display, status, experimental, publisher, contact, date, description, useContext, requirements + , copyright, code, fhirVersion, mapping, kind, abstract_, contextType, context, baseType + , baseDefinition, derivation, snapshot, differential); } @Override @@ -2787,17 +2912,17 @@ public class StructureDefinition extends DomainResource { /** * Search parameter: context-type *

- * Description: resource | datatype | mapping | extension
+ * Description: resource | datatype | extension
* Type: token
* Path: StructureDefinition.contextType
*

*/ - @SearchParamDefinition(name="context-type", path="StructureDefinition.contextType", description="resource | datatype | mapping | extension", type="token" ) + @SearchParamDefinition(name="context-type", path="StructureDefinition.contextType", description="resource | datatype | extension", type="token" ) public static final String SP_CONTEXT_TYPE = "context-type"; /** * Fluent Client search parameter constant for context-type *

- * Description: resource | datatype | mapping | extension
+ * Description: resource | datatype | extension
* Type: token
* Path: StructureDefinition.contextType
*

@@ -2829,17 +2954,17 @@ public class StructureDefinition extends DomainResource { *

* Description: Any datatype or resource, including abstract ones
* Type: token
- * Path: StructureDefinition.constrainedType
+ * Path: StructureDefinition.baseType
*

*/ - @SearchParamDefinition(name="type", path="StructureDefinition.constrainedType", description="Any datatype or resource, including abstract ones", type="token" ) + @SearchParamDefinition(name="type", path="StructureDefinition.baseType", description="Any datatype or resource, including abstract ones", type="token" ) public static final String SP_TYPE = "type"; /** * Fluent Client search parameter constant for type *

* Description: Any datatype or resource, including abstract ones
* Type: token
- * Path: StructureDefinition.constrainedType
+ * Path: StructureDefinition.baseType
*

*/ public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); @@ -3004,6 +3129,26 @@ public class StructureDefinition extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); + /** + * Search parameter: derivation + *

+ * Description: specialization | constraint - How relates to base definition
+ * Type: token
+ * Path: StructureDefinition.derivation
+ *

+ */ + @SearchParamDefinition(name="derivation", path="StructureDefinition.derivation", description="specialization | constraint - How relates to base definition", type="token" ) + public static final String SP_DERIVATION = "derivation"; + /** + * Fluent Client search parameter constant for derivation + *

+ * Description: specialization | constraint - How relates to base definition
+ * Type: token
+ * Path: StructureDefinition.derivation
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam DERIVATION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DERIVATION); + /** * Search parameter: status *

@@ -3027,19 +3172,19 @@ public class StructureDefinition extends DomainResource { /** * Search parameter: base *

- * Description: Structure that this set of constraints applies to
+ * Description: Definition that this type is constrained/specialized from
* Type: uri
- * Path: StructureDefinition.base
+ * Path: StructureDefinition.baseDefinition
*

*/ - @SearchParamDefinition(name="base", path="StructureDefinition.base", description="Structure that this set of constraints applies to", type="uri" ) + @SearchParamDefinition(name="base", path="StructureDefinition.baseDefinition", description="Definition that this type is constrained/specialized from", type="uri" ) public static final String SP_BASE = "base"; /** * Fluent Client search parameter constant for base *

- * Description: Structure that this set of constraints applies to
+ * Description: Definition that this type is constrained/specialized from
* Type: uri
- * Path: StructureDefinition.base
+ * Path: StructureDefinition.baseDefinition
*

*/ public static final ca.uhn.fhir.rest.gclient.UriClientParam BASE = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_BASE); diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/StructureMap.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/StructureMap.java new file mode 100644 index 00000000000..b8529942114 --- /dev/null +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/StructureMap.java @@ -0,0 +1,5003 @@ +package org.hl7.fhir.dstu3.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import org.hl7.fhir.dstu3.model.Enumerations.*; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; +/** + * A Map of relationships between 2 structures that can be used to transform data. + */ +@ResourceDef(name="StructureMap", profile="http://hl7.org/fhir/Profile/StructureMap") +public class StructureMap extends DomainResource { + + public enum StructureMapModelMode { + /** + * This structure describes an instance passed to the mapping engine that is used a source of data + */ + SOURCE, + /** + * This structure describes an instance that the mapping engine may ask for that is used a source of data + */ + QUERIED, + /** + * This structure describes an instance passed to the mapping engine that is used a target of data + */ + TARGET, + /** + * This structure describes an instance that the mapping engine may ask to create that is used a target of data + */ + PRODUCED, + /** + * added to help the parsers + */ + NULL; + public static StructureMapModelMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("source".equals(codeString)) + return SOURCE; + if ("queried".equals(codeString)) + return QUERIED; + if ("target".equals(codeString)) + return TARGET; + if ("produced".equals(codeString)) + return PRODUCED; + throw new FHIRException("Unknown StructureMapModelMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SOURCE: return "source"; + case QUERIED: return "queried"; + case TARGET: return "target"; + case PRODUCED: return "produced"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case SOURCE: return "http://hl7.org/fhir/map-model-mode"; + case QUERIED: return "http://hl7.org/fhir/map-model-mode"; + case TARGET: return "http://hl7.org/fhir/map-model-mode"; + case PRODUCED: return "http://hl7.org/fhir/map-model-mode"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case SOURCE: return "This structure describes an instance passed to the mapping engine that is used a source of data"; + case QUERIED: return "This structure describes an instance that the mapping engine may ask for that is used a source of data"; + case TARGET: return "This structure describes an instance passed to the mapping engine that is used a target of data"; + case PRODUCED: return "This structure describes an instance that the mapping engine may ask to create that is used a target of data"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SOURCE: return "Source Structure Definition"; + case QUERIED: return "Queried Structure Definition"; + case TARGET: return "Target Structure Definition"; + case PRODUCED: return "Produced Structure Definition"; + default: return "?"; + } + } + } + + public static class StructureMapModelModeEnumFactory implements EnumFactory { + public StructureMapModelMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("source".equals(codeString)) + return StructureMapModelMode.SOURCE; + if ("queried".equals(codeString)) + return StructureMapModelMode.QUERIED; + if ("target".equals(codeString)) + return StructureMapModelMode.TARGET; + if ("produced".equals(codeString)) + return StructureMapModelMode.PRODUCED; + throw new IllegalArgumentException("Unknown StructureMapModelMode code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("source".equals(codeString)) + return new Enumeration(this, StructureMapModelMode.SOURCE); + if ("queried".equals(codeString)) + return new Enumeration(this, StructureMapModelMode.QUERIED); + if ("target".equals(codeString)) + return new Enumeration(this, StructureMapModelMode.TARGET); + if ("produced".equals(codeString)) + return new Enumeration(this, StructureMapModelMode.PRODUCED); + throw new FHIRException("Unknown StructureMapModelMode code '"+codeString+"'"); + } + public String toCode(StructureMapModelMode code) { + if (code == StructureMapModelMode.SOURCE) + return "source"; + if (code == StructureMapModelMode.QUERIED) + return "queried"; + if (code == StructureMapModelMode.TARGET) + return "target"; + if (code == StructureMapModelMode.PRODUCED) + return "produced"; + return "?"; + } + public String toSystem(StructureMapModelMode code) { + return code.getSystem(); + } + } + + public enum StructureMapInputMode { + /** + * Names an input instance used a source for mapping + */ + SOURCE, + /** + * Names an instance that is being populated + */ + TARGET, + /** + * added to help the parsers + */ + NULL; + public static StructureMapInputMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("source".equals(codeString)) + return SOURCE; + if ("target".equals(codeString)) + return TARGET; + throw new FHIRException("Unknown StructureMapInputMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case SOURCE: return "source"; + case TARGET: return "target"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case SOURCE: return "http://hl7.org/fhir/map-input-mode"; + case TARGET: return "http://hl7.org/fhir/map-input-mode"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case SOURCE: return "Names an input instance used a source for mapping"; + case TARGET: return "Names an instance that is being populated"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case SOURCE: return "Source Instance"; + case TARGET: return "Target Instance"; + default: return "?"; + } + } + } + + public static class StructureMapInputModeEnumFactory implements EnumFactory { + public StructureMapInputMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("source".equals(codeString)) + return StructureMapInputMode.SOURCE; + if ("target".equals(codeString)) + return StructureMapInputMode.TARGET; + throw new IllegalArgumentException("Unknown StructureMapInputMode code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("source".equals(codeString)) + return new Enumeration(this, StructureMapInputMode.SOURCE); + if ("target".equals(codeString)) + return new Enumeration(this, StructureMapInputMode.TARGET); + throw new FHIRException("Unknown StructureMapInputMode code '"+codeString+"'"); + } + public String toCode(StructureMapInputMode code) { + if (code == StructureMapInputMode.SOURCE) + return "source"; + if (code == StructureMapInputMode.TARGET) + return "target"; + return "?"; + } + public String toSystem(StructureMapInputMode code) { + return code.getSystem(); + } + } + + public enum StructureMapContextType { + /** + * The context specifies a type + */ + TYPE, + /** + * The context specifies a variable + */ + VARIABLE, + /** + * added to help the parsers + */ + NULL; + public static StructureMapContextType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("type".equals(codeString)) + return TYPE; + if ("variable".equals(codeString)) + return VARIABLE; + throw new FHIRException("Unknown StructureMapContextType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case TYPE: return "type"; + case VARIABLE: return "variable"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case TYPE: return "http://hl7.org/fhir/map-context-type"; + case VARIABLE: return "http://hl7.org/fhir/map-context-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case TYPE: return "The context specifies a type"; + case VARIABLE: return "The context specifies a variable"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case TYPE: return "Type"; + case VARIABLE: return "Variable"; + default: return "?"; + } + } + } + + public static class StructureMapContextTypeEnumFactory implements EnumFactory { + public StructureMapContextType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("type".equals(codeString)) + return StructureMapContextType.TYPE; + if ("variable".equals(codeString)) + return StructureMapContextType.VARIABLE; + throw new IllegalArgumentException("Unknown StructureMapContextType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("type".equals(codeString)) + return new Enumeration(this, StructureMapContextType.TYPE); + if ("variable".equals(codeString)) + return new Enumeration(this, StructureMapContextType.VARIABLE); + throw new FHIRException("Unknown StructureMapContextType code '"+codeString+"'"); + } + public String toCode(StructureMapContextType code) { + if (code == StructureMapContextType.TYPE) + return "type"; + if (code == StructureMapContextType.VARIABLE) + return "variable"; + return "?"; + } + public String toSystem(StructureMapContextType code) { + return code.getSystem(); + } + } + + public enum StructureMapListMode { + /** + * when the target list is being assembled, the items for this rule go first. If more that one rule defines a first item (for a given instance of mapping) then this is an error + */ + FIRST, + /** + * the target instance is shared with the target instances generated by another rule (up to the first common n items, then create new ones) + */ + SHARE, + /** + * when the target list is being assembled, the items for this rule go last. If more that one rule defines a last item (for a given instance of mapping) then this is an error + */ + LAST, + /** + * added to help the parsers + */ + NULL; + public static StructureMapListMode fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("first".equals(codeString)) + return FIRST; + if ("share".equals(codeString)) + return SHARE; + if ("last".equals(codeString)) + return LAST; + throw new FHIRException("Unknown StructureMapListMode code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case FIRST: return "first"; + case SHARE: return "share"; + case LAST: return "last"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case FIRST: return "http://hl7.org/fhir/map-list-mode"; + case SHARE: return "http://hl7.org/fhir/map-list-mode"; + case LAST: return "http://hl7.org/fhir/map-list-mode"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case FIRST: return "when the target list is being assembled, the items for this rule go first. If more that one rule defines a first item (for a given instance of mapping) then this is an error"; + case SHARE: return "the target instance is shared with the target instances generated by another rule (up to the first common n items, then create new ones)"; + case LAST: return "when the target list is being assembled, the items for this rule go last. If more that one rule defines a last item (for a given instance of mapping) then this is an error"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case FIRST: return "First"; + case SHARE: return "Share"; + case LAST: return "Last"; + default: return "?"; + } + } + } + + public static class StructureMapListModeEnumFactory implements EnumFactory { + public StructureMapListMode fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("first".equals(codeString)) + return StructureMapListMode.FIRST; + if ("share".equals(codeString)) + return StructureMapListMode.SHARE; + if ("last".equals(codeString)) + return StructureMapListMode.LAST; + throw new IllegalArgumentException("Unknown StructureMapListMode code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("first".equals(codeString)) + return new Enumeration(this, StructureMapListMode.FIRST); + if ("share".equals(codeString)) + return new Enumeration(this, StructureMapListMode.SHARE); + if ("last".equals(codeString)) + return new Enumeration(this, StructureMapListMode.LAST); + throw new FHIRException("Unknown StructureMapListMode code '"+codeString+"'"); + } + public String toCode(StructureMapListMode code) { + if (code == StructureMapListMode.FIRST) + return "first"; + if (code == StructureMapListMode.SHARE) + return "share"; + if (code == StructureMapListMode.LAST) + return "last"; + return "?"; + } + public String toSystem(StructureMapListMode code) { + return code.getSystem(); + } + } + + public enum StructureMapTransform { + /** + * create(type : string) - type is passed through to the application on the standard API, and must be known by it + */ + CREATE, + /** + * copy(source) + */ + COPY, + /** + * truncate(source, length) - source must be stringy type + */ + TRUNCATE, + /** + * escape(source, fmt1, fmt2) - change source from one kind of escaping to another (plain, java, xml, json). note that this is for when the string itself is escaped + */ + ESCAPE, + /** + * cast(source, type?) - case source from one type to another. target type can be left as implicit if there is one and only one target type known + */ + CAST, + /** + * append(source...) - source is element or string + */ + APPEND, + /** + * translate(source, uri_of_map) - use the translate operation + */ + TRANSLATE, + /** + * reference(source : object) - return a string that references the provided tree properly + */ + REFERENCE, + /** + * added to help the parsers + */ + NULL; + public static StructureMapTransform fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return CREATE; + if ("copy".equals(codeString)) + return COPY; + if ("truncate".equals(codeString)) + return TRUNCATE; + if ("escape".equals(codeString)) + return ESCAPE; + if ("cast".equals(codeString)) + return CAST; + if ("append".equals(codeString)) + return APPEND; + if ("translate".equals(codeString)) + return TRANSLATE; + if ("reference".equals(codeString)) + return REFERENCE; + throw new FHIRException("Unknown StructureMapTransform code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case CREATE: return "create"; + case COPY: return "copy"; + case TRUNCATE: return "truncate"; + case ESCAPE: return "escape"; + case CAST: return "cast"; + case APPEND: return "append"; + case TRANSLATE: return "translate"; + case REFERENCE: return "reference"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case CREATE: return "http://hl7.org/fhir/map-transform"; + case COPY: return "http://hl7.org/fhir/map-transform"; + case TRUNCATE: return "http://hl7.org/fhir/map-transform"; + case ESCAPE: return "http://hl7.org/fhir/map-transform"; + case CAST: return "http://hl7.org/fhir/map-transform"; + case APPEND: return "http://hl7.org/fhir/map-transform"; + case TRANSLATE: return "http://hl7.org/fhir/map-transform"; + case REFERENCE: return "http://hl7.org/fhir/map-transform"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case CREATE: return "create(type : string) - type is passed through to the application on the standard API, and must be known by it"; + case COPY: return "copy(source)"; + case TRUNCATE: return "truncate(source, length) - source must be stringy type"; + case ESCAPE: return "escape(source, fmt1, fmt2) - change source from one kind of escaping to another (plain, java, xml, json). note that this is for when the string itself is escaped"; + case CAST: return "cast(source, type?) - case source from one type to another. target type can be left as implicit if there is one and only one target type known"; + case APPEND: return "append(source...) - source is element or string"; + case TRANSLATE: return "translate(source, uri_of_map) - use the translate operation"; + case REFERENCE: return "reference(source : object) - return a string that references the provided tree properly"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case CREATE: return "create"; + case COPY: return "copy"; + case TRUNCATE: return "truncate"; + case ESCAPE: return "escape"; + case CAST: return "cast"; + case APPEND: return "append"; + case TRANSLATE: return "translate"; + case REFERENCE: return "reference"; + default: return "?"; + } + } + } + + public static class StructureMapTransformEnumFactory implements EnumFactory { + public StructureMapTransform fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return StructureMapTransform.CREATE; + if ("copy".equals(codeString)) + return StructureMapTransform.COPY; + if ("truncate".equals(codeString)) + return StructureMapTransform.TRUNCATE; + if ("escape".equals(codeString)) + return StructureMapTransform.ESCAPE; + if ("cast".equals(codeString)) + return StructureMapTransform.CAST; + if ("append".equals(codeString)) + return StructureMapTransform.APPEND; + if ("translate".equals(codeString)) + return StructureMapTransform.TRANSLATE; + if ("reference".equals(codeString)) + return StructureMapTransform.REFERENCE; + throw new IllegalArgumentException("Unknown StructureMapTransform code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("create".equals(codeString)) + return new Enumeration(this, StructureMapTransform.CREATE); + if ("copy".equals(codeString)) + return new Enumeration(this, StructureMapTransform.COPY); + if ("truncate".equals(codeString)) + return new Enumeration(this, StructureMapTransform.TRUNCATE); + if ("escape".equals(codeString)) + return new Enumeration(this, StructureMapTransform.ESCAPE); + if ("cast".equals(codeString)) + return new Enumeration(this, StructureMapTransform.CAST); + if ("append".equals(codeString)) + return new Enumeration(this, StructureMapTransform.APPEND); + if ("translate".equals(codeString)) + return new Enumeration(this, StructureMapTransform.TRANSLATE); + if ("reference".equals(codeString)) + return new Enumeration(this, StructureMapTransform.REFERENCE); + throw new FHIRException("Unknown StructureMapTransform code '"+codeString+"'"); + } + public String toCode(StructureMapTransform code) { + if (code == StructureMapTransform.CREATE) + return "create"; + if (code == StructureMapTransform.COPY) + return "copy"; + if (code == StructureMapTransform.TRUNCATE) + return "truncate"; + if (code == StructureMapTransform.ESCAPE) + return "escape"; + if (code == StructureMapTransform.CAST) + return "cast"; + if (code == StructureMapTransform.APPEND) + return "append"; + if (code == StructureMapTransform.TRANSLATE) + return "translate"; + if (code == StructureMapTransform.REFERENCE) + return "reference"; + return "?"; + } + public String toSystem(StructureMapTransform code) { + return code.getSystem(); + } + } + + @Block() + public static class StructureMapContactComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of an individual to contact regarding the structure map. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the structure map." ) + protected StringType name; + + /** + * Contact details for individual (if a name was provided) or the publisher. + */ + @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) + protected List telecom; + + private static final long serialVersionUID = -1179697803L; + + /** + * Constructor + */ + public StructureMapContactComponent() { + super(); + } + + /** + * @return {@link #name} (The name of an individual to contact regarding the structure map.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapContactComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of an individual to contact regarding the structure map.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StructureMapContactComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of an individual to contact regarding the structure map. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of an individual to contact regarding the structure map. + */ + public StructureMapContactComponent setName(String value) { + if (Utilities.noString(value)) + this.name = null; + else { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + } + return this; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + public List getTelecom() { + if (this.telecom == null) + this.telecom = new ArrayList(); + return this.telecom; + } + + public boolean hasTelecom() { + if (this.telecom == null) + return false; + for (ContactPoint item : this.telecom) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) + */ + // syntactic sugar + public ContactPoint addTelecom() { //3 + ContactPoint t = new ContactPoint(); + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return t; + } + + // syntactic sugar + public StructureMapContactComponent addTelecom(ContactPoint t) { //3 + if (t == null) + return this; + if (this.telecom == null) + this.telecom = new ArrayList(); + this.telecom.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the structure map.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("telecom")) + this.getTelecom().add(castToContactPoint(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.name"); + } + else if (name.equals("telecom")) { + return addTelecom(); + } + else + return super.addChild(name); + } + + public StructureMapContactComponent copy() { + StructureMapContactComponent dst = new StructureMapContactComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (telecom != null) { + dst.telecom = new ArrayList(); + for (ContactPoint i : telecom) + dst.telecom.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StructureMapContactComponent)) + return false; + StructureMapContactComponent o = (StructureMapContactComponent) other; + return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StructureMapContactComponent)) + return false; + StructureMapContactComponent o = (StructureMapContactComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); + } + + public String fhirType() { + return "StructureMap.contact"; + + } + + } + + @Block() + public static class StructureMapStructureComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The canonical URL that identifies the structure. + */ + @Child(name = "url", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Canonical URL for structure definition", formalDefinition="The canonical URL that identifies the structure." ) + protected UriType url; + + /** + * How the referenced structure is used in this mapping. + */ + @Child(name = "mode", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="source | queried | target | produced", formalDefinition="How the referenced structure is used in this mapping." ) + protected Enumeration mode; + + /** + * Documentation that describes how the structure is used in the mapping. + */ + @Child(name = "documentation", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Documentation on use of structure", formalDefinition="Documentation that describes how the structure is used in the mapping." ) + protected StringType documentation; + + private static final long serialVersionUID = -451631915L; + + /** + * Constructor + */ + public StructureMapStructureComponent() { + super(); + } + + /** + * Constructor + */ + public StructureMapStructureComponent(UriType url, Enumeration mode) { + super(); + this.url = url; + this.mode = mode; + } + + /** + * @return {@link #url} (The canonical URL that identifies the structure.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapStructureComponent.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (The canonical URL that identifies the structure.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public StructureMapStructureComponent setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return The canonical URL that identifies the structure. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value The canonical URL that identifies the structure. + */ + public StructureMapStructureComponent setUrl(String value) { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + return this; + } + + /** + * @return {@link #mode} (How the referenced structure is used in this mapping.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public Enumeration getModeElement() { + if (this.mode == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapStructureComponent.mode"); + else if (Configuration.doAutoCreate()) + this.mode = new Enumeration(new StructureMapModelModeEnumFactory()); // bb + return this.mode; + } + + public boolean hasModeElement() { + return this.mode != null && !this.mode.isEmpty(); + } + + public boolean hasMode() { + return this.mode != null && !this.mode.isEmpty(); + } + + /** + * @param value {@link #mode} (How the referenced structure is used in this mapping.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public StructureMapStructureComponent setModeElement(Enumeration value) { + this.mode = value; + return this; + } + + /** + * @return How the referenced structure is used in this mapping. + */ + public StructureMapModelMode getMode() { + return this.mode == null ? null : this.mode.getValue(); + } + + /** + * @param value How the referenced structure is used in this mapping. + */ + public StructureMapStructureComponent setMode(StructureMapModelMode value) { + if (this.mode == null) + this.mode = new Enumeration(new StructureMapModelModeEnumFactory()); + this.mode.setValue(value); + return this; + } + + /** + * @return {@link #documentation} (Documentation that describes how the structure is used in the mapping.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StringType getDocumentationElement() { + if (this.documentation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapStructureComponent.documentation"); + else if (Configuration.doAutoCreate()) + this.documentation = new StringType(); // bb + return this.documentation; + } + + public boolean hasDocumentationElement() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + public boolean hasDocumentation() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + /** + * @param value {@link #documentation} (Documentation that describes how the structure is used in the mapping.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StructureMapStructureComponent setDocumentationElement(StringType value) { + this.documentation = value; + return this; + } + + /** + * @return Documentation that describes how the structure is used in the mapping. + */ + public String getDocumentation() { + return this.documentation == null ? null : this.documentation.getValue(); + } + + /** + * @param value Documentation that describes how the structure is used in the mapping. + */ + public StructureMapStructureComponent setDocumentation(String value) { + if (Utilities.noString(value)) + this.documentation = null; + else { + if (this.documentation == null) + this.documentation = new StringType(); + this.documentation.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("url", "uri", "The canonical URL that identifies the structure.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("mode", "code", "How the referenced structure is used in this mapping.", 0, java.lang.Integer.MAX_VALUE, mode)); + childrenList.add(new Property("documentation", "string", "Documentation that describes how the structure is used in the mapping.", 0, java.lang.Integer.MAX_VALUE, documentation)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("mode")) + this.mode = new StructureMapModelModeEnumFactory().fromType(value); // Enumeration + else if (name.equals("documentation")) + this.documentation = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.url"); + } + else if (name.equals("mode")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.mode"); + } + else if (name.equals("documentation")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.documentation"); + } + else + return super.addChild(name); + } + + public StructureMapStructureComponent copy() { + StructureMapStructureComponent dst = new StructureMapStructureComponent(); + copyValues(dst); + dst.url = url == null ? null : url.copy(); + dst.mode = mode == null ? null : mode.copy(); + dst.documentation = documentation == null ? null : documentation.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StructureMapStructureComponent)) + return false; + StructureMapStructureComponent o = (StructureMapStructureComponent) other; + return compareDeep(url, o.url, true) && compareDeep(mode, o.mode, true) && compareDeep(documentation, o.documentation, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StructureMapStructureComponent)) + return false; + StructureMapStructureComponent o = (StructureMapStructureComponent) other; + return compareValues(url, o.url, true) && compareValues(mode, o.mode, true) && compareValues(documentation, o.documentation, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, mode, documentation); + } + + public String fhirType() { + return "StructureMap.structure"; + + } + + } + + @Block() + public static class StructureMapGroupComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Descriptive name for a user. + */ + @Child(name = "name", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Descriptive name for a user", formalDefinition="Descriptive name for a user." ) + protected IdType name; + + /** + * Another group that this group adds rules to. + */ + @Child(name = "extends", type = {IdType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Another group that this group adds rules to", formalDefinition="Another group that this group adds rules to." ) + protected IdType extends_; + + /** + * Documentation for this group. + */ + @Child(name = "documentation", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Documentation for this group", formalDefinition="Documentation for this group." ) + protected StringType documentation; + + /** + * A name assigned to an instance of data. The instance must be provided when the mapping is invoked. + */ + @Child(name = "input", type = {}, order=4, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Named instance provided when invoking the map", formalDefinition="A name assigned to an instance of data. The instance must be provided when the mapping is invoked." ) + protected List input; + + /** + * Transform Rule from source to target. + */ + @Child(name = "rule", type = {}, order=5, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Transform Rule from source to target", formalDefinition="Transform Rule from source to target." ) + protected List rule; + + private static final long serialVersionUID = -1311232924L; + + /** + * Constructor + */ + public StructureMapGroupComponent() { + super(); + } + + /** + * Constructor + */ + public StructureMapGroupComponent(IdType name) { + super(); + this.name = name; + } + + /** + * @return {@link #name} (Descriptive name for a user.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public IdType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new IdType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Descriptive name for a user.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StructureMapGroupComponent setNameElement(IdType value) { + this.name = value; + return this; + } + + /** + * @return Descriptive name for a user. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Descriptive name for a user. + */ + public StructureMapGroupComponent setName(String value) { + if (this.name == null) + this.name = new IdType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #extends_} (Another group that this group adds rules to.). This is the underlying object with id, value and extensions. The accessor "getExtends" gives direct access to the value + */ + public IdType getExtendsElement() { + if (this.extends_ == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupComponent.extends_"); + else if (Configuration.doAutoCreate()) + this.extends_ = new IdType(); // bb + return this.extends_; + } + + public boolean hasExtendsElement() { + return this.extends_ != null && !this.extends_.isEmpty(); + } + + public boolean hasExtends() { + return this.extends_ != null && !this.extends_.isEmpty(); + } + + /** + * @param value {@link #extends_} (Another group that this group adds rules to.). This is the underlying object with id, value and extensions. The accessor "getExtends" gives direct access to the value + */ + public StructureMapGroupComponent setExtendsElement(IdType value) { + this.extends_ = value; + return this; + } + + /** + * @return Another group that this group adds rules to. + */ + public String getExtends() { + return this.extends_ == null ? null : this.extends_.getValue(); + } + + /** + * @param value Another group that this group adds rules to. + */ + public StructureMapGroupComponent setExtends(String value) { + if (Utilities.noString(value)) + this.extends_ = null; + else { + if (this.extends_ == null) + this.extends_ = new IdType(); + this.extends_.setValue(value); + } + return this; + } + + /** + * @return {@link #documentation} (Documentation for this group.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StringType getDocumentationElement() { + if (this.documentation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupComponent.documentation"); + else if (Configuration.doAutoCreate()) + this.documentation = new StringType(); // bb + return this.documentation; + } + + public boolean hasDocumentationElement() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + public boolean hasDocumentation() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + /** + * @param value {@link #documentation} (Documentation for this group.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StructureMapGroupComponent setDocumentationElement(StringType value) { + this.documentation = value; + return this; + } + + /** + * @return Documentation for this group. + */ + public String getDocumentation() { + return this.documentation == null ? null : this.documentation.getValue(); + } + + /** + * @param value Documentation for this group. + */ + public StructureMapGroupComponent setDocumentation(String value) { + if (Utilities.noString(value)) + this.documentation = null; + else { + if (this.documentation == null) + this.documentation = new StringType(); + this.documentation.setValue(value); + } + return this; + } + + /** + * @return {@link #input} (A name assigned to an instance of data. The instance must be provided when the mapping is invoked.) + */ + public List getInput() { + if (this.input == null) + this.input = new ArrayList(); + return this.input; + } + + public boolean hasInput() { + if (this.input == null) + return false; + for (StructureMapGroupInputComponent item : this.input) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #input} (A name assigned to an instance of data. The instance must be provided when the mapping is invoked.) + */ + // syntactic sugar + public StructureMapGroupInputComponent addInput() { //3 + StructureMapGroupInputComponent t = new StructureMapGroupInputComponent(); + if (this.input == null) + this.input = new ArrayList(); + this.input.add(t); + return t; + } + + // syntactic sugar + public StructureMapGroupComponent addInput(StructureMapGroupInputComponent t) { //3 + if (t == null) + return this; + if (this.input == null) + this.input = new ArrayList(); + this.input.add(t); + return this; + } + + /** + * @return {@link #rule} (Transform Rule from source to target.) + */ + public List getRule() { + if (this.rule == null) + this.rule = new ArrayList(); + return this.rule; + } + + public boolean hasRule() { + if (this.rule == null) + return false; + for (StructureMapGroupRuleComponent item : this.rule) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #rule} (Transform Rule from source to target.) + */ + // syntactic sugar + public StructureMapGroupRuleComponent addRule() { //3 + StructureMapGroupRuleComponent t = new StructureMapGroupRuleComponent(); + if (this.rule == null) + this.rule = new ArrayList(); + this.rule.add(t); + return t; + } + + // syntactic sugar + public StructureMapGroupComponent addRule(StructureMapGroupRuleComponent t) { //3 + if (t == null) + return this; + if (this.rule == null) + this.rule = new ArrayList(); + this.rule.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "id", "Descriptive name for a user.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("extends", "id", "Another group that this group adds rules to.", 0, java.lang.Integer.MAX_VALUE, extends_)); + childrenList.add(new Property("documentation", "string", "Documentation for this group.", 0, java.lang.Integer.MAX_VALUE, documentation)); + childrenList.add(new Property("input", "", "A name assigned to an instance of data. The instance must be provided when the mapping is invoked.", 0, java.lang.Integer.MAX_VALUE, input)); + childrenList.add(new Property("rule", "", "Transform Rule from source to target.", 0, java.lang.Integer.MAX_VALUE, rule)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToId(value); // IdType + else if (name.equals("extends")) + this.extends_ = castToId(value); // IdType + else if (name.equals("documentation")) + this.documentation = castToString(value); // StringType + else if (name.equals("input")) + this.getInput().add((StructureMapGroupInputComponent) value); + else if (name.equals("rule")) + this.getRule().add((StructureMapGroupRuleComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.name"); + } + else if (name.equals("extends")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.extends"); + } + else if (name.equals("documentation")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.documentation"); + } + else if (name.equals("input")) { + return addInput(); + } + else if (name.equals("rule")) { + return addRule(); + } + else + return super.addChild(name); + } + + public StructureMapGroupComponent copy() { + StructureMapGroupComponent dst = new StructureMapGroupComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.extends_ = extends_ == null ? null : extends_.copy(); + dst.documentation = documentation == null ? null : documentation.copy(); + if (input != null) { + dst.input = new ArrayList(); + for (StructureMapGroupInputComponent i : input) + dst.input.add(i.copy()); + }; + if (rule != null) { + dst.rule = new ArrayList(); + for (StructureMapGroupRuleComponent i : rule) + dst.rule.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StructureMapGroupComponent)) + return false; + StructureMapGroupComponent o = (StructureMapGroupComponent) other; + return compareDeep(name, o.name, true) && compareDeep(extends_, o.extends_, true) && compareDeep(documentation, o.documentation, true) + && compareDeep(input, o.input, true) && compareDeep(rule, o.rule, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StructureMapGroupComponent)) + return false; + StructureMapGroupComponent o = (StructureMapGroupComponent) other; + return compareValues(name, o.name, true) && compareValues(extends_, o.extends_, true) && compareValues(documentation, o.documentation, true) + ; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, extends_, documentation + , input, rule); + } + + public String fhirType() { + return "StructureMap.group"; + + } + + } + + @Block() + public static class StructureMapGroupInputComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Name for this instance of data. + */ + @Child(name = "name", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name for this instance of data", formalDefinition="Name for this instance of data." ) + protected IdType name; + + /** + * Type for this instance of data. + */ + @Child(name = "type", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type for this instance of data", formalDefinition="Type for this instance of data." ) + protected StringType type; + + /** + * Mode for this instance of data. + */ + @Child(name = "mode", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="source | target", formalDefinition="Mode for this instance of data." ) + protected Enumeration mode; + + /** + * Documentation for this instance of data. + */ + @Child(name = "documentation", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Documentation for this instance of data", formalDefinition="Documentation for this instance of data." ) + protected StringType documentation; + + private static final long serialVersionUID = -25050724L; + + /** + * Constructor + */ + public StructureMapGroupInputComponent() { + super(); + } + + /** + * Constructor + */ + public StructureMapGroupInputComponent(IdType name, Enumeration mode) { + super(); + this.name = name; + this.mode = mode; + } + + /** + * @return {@link #name} (Name for this instance of data.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public IdType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupInputComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new IdType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Name for this instance of data.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StructureMapGroupInputComponent setNameElement(IdType value) { + this.name = value; + return this; + } + + /** + * @return Name for this instance of data. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Name for this instance of data. + */ + public StructureMapGroupInputComponent setName(String value) { + if (this.name == null) + this.name = new IdType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #type} (Type for this instance of data.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public StringType getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupInputComponent.type"); + else if (Configuration.doAutoCreate()) + this.type = new StringType(); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (Type for this instance of data.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public StructureMapGroupInputComponent setTypeElement(StringType value) { + this.type = value; + return this; + } + + /** + * @return Type for this instance of data. + */ + public String getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value Type for this instance of data. + */ + public StructureMapGroupInputComponent setType(String value) { + if (Utilities.noString(value)) + this.type = null; + else { + if (this.type == null) + this.type = new StringType(); + this.type.setValue(value); + } + return this; + } + + /** + * @return {@link #mode} (Mode for this instance of data.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public Enumeration getModeElement() { + if (this.mode == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupInputComponent.mode"); + else if (Configuration.doAutoCreate()) + this.mode = new Enumeration(new StructureMapInputModeEnumFactory()); // bb + return this.mode; + } + + public boolean hasModeElement() { + return this.mode != null && !this.mode.isEmpty(); + } + + public boolean hasMode() { + return this.mode != null && !this.mode.isEmpty(); + } + + /** + * @param value {@link #mode} (Mode for this instance of data.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value + */ + public StructureMapGroupInputComponent setModeElement(Enumeration value) { + this.mode = value; + return this; + } + + /** + * @return Mode for this instance of data. + */ + public StructureMapInputMode getMode() { + return this.mode == null ? null : this.mode.getValue(); + } + + /** + * @param value Mode for this instance of data. + */ + public StructureMapGroupInputComponent setMode(StructureMapInputMode value) { + if (this.mode == null) + this.mode = new Enumeration(new StructureMapInputModeEnumFactory()); + this.mode.setValue(value); + return this; + } + + /** + * @return {@link #documentation} (Documentation for this instance of data.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StringType getDocumentationElement() { + if (this.documentation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupInputComponent.documentation"); + else if (Configuration.doAutoCreate()) + this.documentation = new StringType(); // bb + return this.documentation; + } + + public boolean hasDocumentationElement() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + public boolean hasDocumentation() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + /** + * @param value {@link #documentation} (Documentation for this instance of data.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StructureMapGroupInputComponent setDocumentationElement(StringType value) { + this.documentation = value; + return this; + } + + /** + * @return Documentation for this instance of data. + */ + public String getDocumentation() { + return this.documentation == null ? null : this.documentation.getValue(); + } + + /** + * @param value Documentation for this instance of data. + */ + public StructureMapGroupInputComponent setDocumentation(String value) { + if (Utilities.noString(value)) + this.documentation = null; + else { + if (this.documentation == null) + this.documentation = new StringType(); + this.documentation.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "id", "Name for this instance of data.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("type", "string", "Type for this instance of data.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("mode", "code", "Mode for this instance of data.", 0, java.lang.Integer.MAX_VALUE, mode)); + childrenList.add(new Property("documentation", "string", "Documentation for this instance of data.", 0, java.lang.Integer.MAX_VALUE, documentation)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToId(value); // IdType + else if (name.equals("type")) + this.type = castToString(value); // StringType + else if (name.equals("mode")) + this.mode = new StructureMapInputModeEnumFactory().fromType(value); // Enumeration + else if (name.equals("documentation")) + this.documentation = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.name"); + } + else if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.type"); + } + else if (name.equals("mode")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.mode"); + } + else if (name.equals("documentation")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.documentation"); + } + else + return super.addChild(name); + } + + public StructureMapGroupInputComponent copy() { + StructureMapGroupInputComponent dst = new StructureMapGroupInputComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.type = type == null ? null : type.copy(); + dst.mode = mode == null ? null : mode.copy(); + dst.documentation = documentation == null ? null : documentation.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StructureMapGroupInputComponent)) + return false; + StructureMapGroupInputComponent o = (StructureMapGroupInputComponent) other; + return compareDeep(name, o.name, true) && compareDeep(type, o.type, true) && compareDeep(mode, o.mode, true) + && compareDeep(documentation, o.documentation, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StructureMapGroupInputComponent)) + return false; + StructureMapGroupInputComponent o = (StructureMapGroupInputComponent) other; + return compareValues(name, o.name, true) && compareValues(type, o.type, true) && compareValues(mode, o.mode, true) + && compareValues(documentation, o.documentation, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, type, mode, documentation + ); + } + + public String fhirType() { + return "StructureMap.group.input"; + + } + + } + + @Block() + public static class StructureMapGroupRuleComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Name of the rule for internal references. + */ + @Child(name = "name", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the rule for internal references", formalDefinition="Name of the rule for internal references." ) + protected IdType name; + + /** + * Source inputs to the mapping. + */ + @Child(name = "source", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Source inputs to the mapping", formalDefinition="Source inputs to the mapping." ) + protected List source; + + /** + * Content to create because of this mapping rule. + */ + @Child(name = "target", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Content to create because of this mapping rule", formalDefinition="Content to create because of this mapping rule." ) + protected List target; + + /** + * Rules contained in this rule. + */ + @Child(name = "rule", type = {StructureMapGroupRuleComponent.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Rules contained in this rule", formalDefinition="Rules contained in this rule." ) + protected List rule; + + /** + * Which other rules to apply in the context of this rule. + */ + @Child(name = "dependent", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Which other rules to apply in the context of this rule", formalDefinition="Which other rules to apply in the context of this rule." ) + protected List dependent; + + /** + * Documentation for this instance of data. + */ + @Child(name = "documentation", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Documentation for this instance of data", formalDefinition="Documentation for this instance of data." ) + protected StringType documentation; + + private static final long serialVersionUID = 773925517L; + + /** + * Constructor + */ + public StructureMapGroupRuleComponent() { + super(); + } + + /** + * Constructor + */ + public StructureMapGroupRuleComponent(IdType name) { + super(); + this.name = name; + } + + /** + * @return {@link #name} (Name of the rule for internal references.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public IdType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupRuleComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new IdType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Name of the rule for internal references.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StructureMapGroupRuleComponent setNameElement(IdType value) { + this.name = value; + return this; + } + + /** + * @return Name of the rule for internal references. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Name of the rule for internal references. + */ + public StructureMapGroupRuleComponent setName(String value) { + if (this.name == null) + this.name = new IdType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #source} (Source inputs to the mapping.) + */ + public List getSource() { + if (this.source == null) + this.source = new ArrayList(); + return this.source; + } + + public boolean hasSource() { + if (this.source == null) + return false; + for (StructureMapGroupRuleSourceComponent item : this.source) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #source} (Source inputs to the mapping.) + */ + // syntactic sugar + public StructureMapGroupRuleSourceComponent addSource() { //3 + StructureMapGroupRuleSourceComponent t = new StructureMapGroupRuleSourceComponent(); + if (this.source == null) + this.source = new ArrayList(); + this.source.add(t); + return t; + } + + // syntactic sugar + public StructureMapGroupRuleComponent addSource(StructureMapGroupRuleSourceComponent t) { //3 + if (t == null) + return this; + if (this.source == null) + this.source = new ArrayList(); + this.source.add(t); + return this; + } + + /** + * @return {@link #target} (Content to create because of this mapping rule.) + */ + public List getTarget() { + if (this.target == null) + this.target = new ArrayList(); + return this.target; + } + + public boolean hasTarget() { + if (this.target == null) + return false; + for (StructureMapGroupRuleTargetComponent item : this.target) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #target} (Content to create because of this mapping rule.) + */ + // syntactic sugar + public StructureMapGroupRuleTargetComponent addTarget() { //3 + StructureMapGroupRuleTargetComponent t = new StructureMapGroupRuleTargetComponent(); + if (this.target == null) + this.target = new ArrayList(); + this.target.add(t); + return t; + } + + // syntactic sugar + public StructureMapGroupRuleComponent addTarget(StructureMapGroupRuleTargetComponent t) { //3 + if (t == null) + return this; + if (this.target == null) + this.target = new ArrayList(); + this.target.add(t); + return this; + } + + /** + * @return {@link #rule} (Rules contained in this rule.) + */ + public List getRule() { + if (this.rule == null) + this.rule = new ArrayList(); + return this.rule; + } + + public boolean hasRule() { + if (this.rule == null) + return false; + for (StructureMapGroupRuleComponent item : this.rule) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #rule} (Rules contained in this rule.) + */ + // syntactic sugar + public StructureMapGroupRuleComponent addRule() { //3 + StructureMapGroupRuleComponent t = new StructureMapGroupRuleComponent(); + if (this.rule == null) + this.rule = new ArrayList(); + this.rule.add(t); + return t; + } + + // syntactic sugar + public StructureMapGroupRuleComponent addRule(StructureMapGroupRuleComponent t) { //3 + if (t == null) + return this; + if (this.rule == null) + this.rule = new ArrayList(); + this.rule.add(t); + return this; + } + + /** + * @return {@link #dependent} (Which other rules to apply in the context of this rule.) + */ + public List getDependent() { + if (this.dependent == null) + this.dependent = new ArrayList(); + return this.dependent; + } + + public boolean hasDependent() { + if (this.dependent == null) + return false; + for (StructureMapGroupRuleDependentComponent item : this.dependent) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #dependent} (Which other rules to apply in the context of this rule.) + */ + // syntactic sugar + public StructureMapGroupRuleDependentComponent addDependent() { //3 + StructureMapGroupRuleDependentComponent t = new StructureMapGroupRuleDependentComponent(); + if (this.dependent == null) + this.dependent = new ArrayList(); + this.dependent.add(t); + return t; + } + + // syntactic sugar + public StructureMapGroupRuleComponent addDependent(StructureMapGroupRuleDependentComponent t) { //3 + if (t == null) + return this; + if (this.dependent == null) + this.dependent = new ArrayList(); + this.dependent.add(t); + return this; + } + + /** + * @return {@link #documentation} (Documentation for this instance of data.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StringType getDocumentationElement() { + if (this.documentation == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupRuleComponent.documentation"); + else if (Configuration.doAutoCreate()) + this.documentation = new StringType(); // bb + return this.documentation; + } + + public boolean hasDocumentationElement() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + public boolean hasDocumentation() { + return this.documentation != null && !this.documentation.isEmpty(); + } + + /** + * @param value {@link #documentation} (Documentation for this instance of data.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value + */ + public StructureMapGroupRuleComponent setDocumentationElement(StringType value) { + this.documentation = value; + return this; + } + + /** + * @return Documentation for this instance of data. + */ + public String getDocumentation() { + return this.documentation == null ? null : this.documentation.getValue(); + } + + /** + * @param value Documentation for this instance of data. + */ + public StructureMapGroupRuleComponent setDocumentation(String value) { + if (Utilities.noString(value)) + this.documentation = null; + else { + if (this.documentation == null) + this.documentation = new StringType(); + this.documentation.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "id", "Name of the rule for internal references.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("source", "", "Source inputs to the mapping.", 0, java.lang.Integer.MAX_VALUE, source)); + childrenList.add(new Property("target", "", "Content to create because of this mapping rule.", 0, java.lang.Integer.MAX_VALUE, target)); + childrenList.add(new Property("rule", "@StructureMap.group.rule", "Rules contained in this rule.", 0, java.lang.Integer.MAX_VALUE, rule)); + childrenList.add(new Property("dependent", "", "Which other rules to apply in the context of this rule.", 0, java.lang.Integer.MAX_VALUE, dependent)); + childrenList.add(new Property("documentation", "string", "Documentation for this instance of data.", 0, java.lang.Integer.MAX_VALUE, documentation)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToId(value); // IdType + else if (name.equals("source")) + this.getSource().add((StructureMapGroupRuleSourceComponent) value); + else if (name.equals("target")) + this.getTarget().add((StructureMapGroupRuleTargetComponent) value); + else if (name.equals("rule")) + this.getRule().add((StructureMapGroupRuleComponent) value); + else if (name.equals("dependent")) + this.getDependent().add((StructureMapGroupRuleDependentComponent) value); + else if (name.equals("documentation")) + this.documentation = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.name"); + } + else if (name.equals("source")) { + return addSource(); + } + else if (name.equals("target")) { + return addTarget(); + } + else if (name.equals("rule")) { + return addRule(); + } + else if (name.equals("dependent")) { + return addDependent(); + } + else if (name.equals("documentation")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.documentation"); + } + else + return super.addChild(name); + } + + public StructureMapGroupRuleComponent copy() { + StructureMapGroupRuleComponent dst = new StructureMapGroupRuleComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (source != null) { + dst.source = new ArrayList(); + for (StructureMapGroupRuleSourceComponent i : source) + dst.source.add(i.copy()); + }; + if (target != null) { + dst.target = new ArrayList(); + for (StructureMapGroupRuleTargetComponent i : target) + dst.target.add(i.copy()); + }; + if (rule != null) { + dst.rule = new ArrayList(); + for (StructureMapGroupRuleComponent i : rule) + dst.rule.add(i.copy()); + }; + if (dependent != null) { + dst.dependent = new ArrayList(); + for (StructureMapGroupRuleDependentComponent i : dependent) + dst.dependent.add(i.copy()); + }; + dst.documentation = documentation == null ? null : documentation.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StructureMapGroupRuleComponent)) + return false; + StructureMapGroupRuleComponent o = (StructureMapGroupRuleComponent) other; + return compareDeep(name, o.name, true) && compareDeep(source, o.source, true) && compareDeep(target, o.target, true) + && compareDeep(rule, o.rule, true) && compareDeep(dependent, o.dependent, true) && compareDeep(documentation, o.documentation, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StructureMapGroupRuleComponent)) + return false; + StructureMapGroupRuleComponent o = (StructureMapGroupRuleComponent) other; + return compareValues(name, o.name, true) && compareValues(documentation, o.documentation, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, source, target, rule, dependent + , documentation); + } + + public String fhirType() { + return "StructureMap.group.rule"; + + } + + } + + @Block() + public static class StructureMapGroupRuleSourceComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Whether this rule applies if the source isn't found. + */ + @Child(name = "required", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Whether this rule applies if the source isn't found", formalDefinition="Whether this rule applies if the source isn't found." ) + protected BooleanType required; + + /** + * Type or variable this rule applies to. + */ + @Child(name = "context", type = {IdType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type or variable this rule applies to", formalDefinition="Type or variable this rule applies to." ) + protected IdType context; + + /** + * How to interpret the context. + */ + @Child(name = "contextType", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="type | variable", formalDefinition="How to interpret the context." ) + protected Enumeration contextType; + + /** + * Optional field for this source. + */ + @Child(name = "element", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Optional field for this source", formalDefinition="Optional field for this source." ) + protected StringType element; + + /** + * How to handle the list mode for this element. + */ + @Child(name = "listMode", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="first | share | last", formalDefinition="How to handle the list mode for this element." ) + protected Enumeration listMode; + + /** + * Named context for field, if a field is specified. + */ + @Child(name = "variable", type = {IdType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Named context for field, if a field is specified", formalDefinition="Named context for field, if a field is specified." ) + protected IdType variable; + + /** + * FluentPath expression - must be true or the rule does not apply. + */ + @Child(name = "condition", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="FluentPath expression - must be true or the rule does not apply", formalDefinition="FluentPath expression - must be true or the rule does not apply." ) + protected StringType condition; + + /** + * FluentPath expression - must be true or the mapping engine throws an error instead of completing. + */ + @Child(name = "check", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="FluentPath expression - must be true or the mapping engine throws an error instead of completing", formalDefinition="FluentPath expression - must be true or the mapping engine throws an error instead of completing." ) + protected StringType check; + + private static final long serialVersionUID = -1039728628L; + + /** + * Constructor + */ + public StructureMapGroupRuleSourceComponent() { + super(); + } + + /** + * Constructor + */ + public StructureMapGroupRuleSourceComponent(BooleanType required, IdType context, Enumeration contextType) { + super(); + this.required = required; + this.context = context; + this.contextType = contextType; + } + + /** + * @return {@link #required} (Whether this rule applies if the source isn't found.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value + */ + public BooleanType getRequiredElement() { + if (this.required == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupRuleSourceComponent.required"); + else if (Configuration.doAutoCreate()) + this.required = new BooleanType(); // bb + return this.required; + } + + public boolean hasRequiredElement() { + return this.required != null && !this.required.isEmpty(); + } + + public boolean hasRequired() { + return this.required != null && !this.required.isEmpty(); + } + + /** + * @param value {@link #required} (Whether this rule applies if the source isn't found.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value + */ + public StructureMapGroupRuleSourceComponent setRequiredElement(BooleanType value) { + this.required = value; + return this; + } + + /** + * @return Whether this rule applies if the source isn't found. + */ + public boolean getRequired() { + return this.required == null || this.required.isEmpty() ? false : this.required.getValue(); + } + + /** + * @param value Whether this rule applies if the source isn't found. + */ + public StructureMapGroupRuleSourceComponent setRequired(boolean value) { + if (this.required == null) + this.required = new BooleanType(); + this.required.setValue(value); + return this; + } + + /** + * @return {@link #context} (Type or variable this rule applies to.). This is the underlying object with id, value and extensions. The accessor "getContext" gives direct access to the value + */ + public IdType getContextElement() { + if (this.context == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupRuleSourceComponent.context"); + else if (Configuration.doAutoCreate()) + this.context = new IdType(); // bb + return this.context; + } + + public boolean hasContextElement() { + return this.context != null && !this.context.isEmpty(); + } + + public boolean hasContext() { + return this.context != null && !this.context.isEmpty(); + } + + /** + * @param value {@link #context} (Type or variable this rule applies to.). This is the underlying object with id, value and extensions. The accessor "getContext" gives direct access to the value + */ + public StructureMapGroupRuleSourceComponent setContextElement(IdType value) { + this.context = value; + return this; + } + + /** + * @return Type or variable this rule applies to. + */ + public String getContext() { + return this.context == null ? null : this.context.getValue(); + } + + /** + * @param value Type or variable this rule applies to. + */ + public StructureMapGroupRuleSourceComponent setContext(String value) { + if (this.context == null) + this.context = new IdType(); + this.context.setValue(value); + return this; + } + + /** + * @return {@link #contextType} (How to interpret the context.). This is the underlying object with id, value and extensions. The accessor "getContextType" gives direct access to the value + */ + public Enumeration getContextTypeElement() { + if (this.contextType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupRuleSourceComponent.contextType"); + else if (Configuration.doAutoCreate()) + this.contextType = new Enumeration(new StructureMapContextTypeEnumFactory()); // bb + return this.contextType; + } + + public boolean hasContextTypeElement() { + return this.contextType != null && !this.contextType.isEmpty(); + } + + public boolean hasContextType() { + return this.contextType != null && !this.contextType.isEmpty(); + } + + /** + * @param value {@link #contextType} (How to interpret the context.). This is the underlying object with id, value and extensions. The accessor "getContextType" gives direct access to the value + */ + public StructureMapGroupRuleSourceComponent setContextTypeElement(Enumeration value) { + this.contextType = value; + return this; + } + + /** + * @return How to interpret the context. + */ + public StructureMapContextType getContextType() { + return this.contextType == null ? null : this.contextType.getValue(); + } + + /** + * @param value How to interpret the context. + */ + public StructureMapGroupRuleSourceComponent setContextType(StructureMapContextType value) { + if (this.contextType == null) + this.contextType = new Enumeration(new StructureMapContextTypeEnumFactory()); + this.contextType.setValue(value); + return this; + } + + /** + * @return {@link #element} (Optional field for this source.). This is the underlying object with id, value and extensions. The accessor "getElement" gives direct access to the value + */ + public StringType getElementElement() { + if (this.element == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupRuleSourceComponent.element"); + else if (Configuration.doAutoCreate()) + this.element = new StringType(); // bb + return this.element; + } + + public boolean hasElementElement() { + return this.element != null && !this.element.isEmpty(); + } + + public boolean hasElement() { + return this.element != null && !this.element.isEmpty(); + } + + /** + * @param value {@link #element} (Optional field for this source.). This is the underlying object with id, value and extensions. The accessor "getElement" gives direct access to the value + */ + public StructureMapGroupRuleSourceComponent setElementElement(StringType value) { + this.element = value; + return this; + } + + /** + * @return Optional field for this source. + */ + public String getElement() { + return this.element == null ? null : this.element.getValue(); + } + + /** + * @param value Optional field for this source. + */ + public StructureMapGroupRuleSourceComponent setElement(String value) { + if (Utilities.noString(value)) + this.element = null; + else { + if (this.element == null) + this.element = new StringType(); + this.element.setValue(value); + } + return this; + } + + /** + * @return {@link #listMode} (How to handle the list mode for this element.). This is the underlying object with id, value and extensions. The accessor "getListMode" gives direct access to the value + */ + public Enumeration getListModeElement() { + if (this.listMode == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupRuleSourceComponent.listMode"); + else if (Configuration.doAutoCreate()) + this.listMode = new Enumeration(new StructureMapListModeEnumFactory()); // bb + return this.listMode; + } + + public boolean hasListModeElement() { + return this.listMode != null && !this.listMode.isEmpty(); + } + + public boolean hasListMode() { + return this.listMode != null && !this.listMode.isEmpty(); + } + + /** + * @param value {@link #listMode} (How to handle the list mode for this element.). This is the underlying object with id, value and extensions. The accessor "getListMode" gives direct access to the value + */ + public StructureMapGroupRuleSourceComponent setListModeElement(Enumeration value) { + this.listMode = value; + return this; + } + + /** + * @return How to handle the list mode for this element. + */ + public StructureMapListMode getListMode() { + return this.listMode == null ? null : this.listMode.getValue(); + } + + /** + * @param value How to handle the list mode for this element. + */ + public StructureMapGroupRuleSourceComponent setListMode(StructureMapListMode value) { + if (value == null) + this.listMode = null; + else { + if (this.listMode == null) + this.listMode = new Enumeration(new StructureMapListModeEnumFactory()); + this.listMode.setValue(value); + } + return this; + } + + /** + * @return {@link #variable} (Named context for field, if a field is specified.). This is the underlying object with id, value and extensions. The accessor "getVariable" gives direct access to the value + */ + public IdType getVariableElement() { + if (this.variable == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupRuleSourceComponent.variable"); + else if (Configuration.doAutoCreate()) + this.variable = new IdType(); // bb + return this.variable; + } + + public boolean hasVariableElement() { + return this.variable != null && !this.variable.isEmpty(); + } + + public boolean hasVariable() { + return this.variable != null && !this.variable.isEmpty(); + } + + /** + * @param value {@link #variable} (Named context for field, if a field is specified.). This is the underlying object with id, value and extensions. The accessor "getVariable" gives direct access to the value + */ + public StructureMapGroupRuleSourceComponent setVariableElement(IdType value) { + this.variable = value; + return this; + } + + /** + * @return Named context for field, if a field is specified. + */ + public String getVariable() { + return this.variable == null ? null : this.variable.getValue(); + } + + /** + * @param value Named context for field, if a field is specified. + */ + public StructureMapGroupRuleSourceComponent setVariable(String value) { + if (Utilities.noString(value)) + this.variable = null; + else { + if (this.variable == null) + this.variable = new IdType(); + this.variable.setValue(value); + } + return this; + } + + /** + * @return {@link #condition} (FluentPath expression - must be true or the rule does not apply.). This is the underlying object with id, value and extensions. The accessor "getCondition" gives direct access to the value + */ + public StringType getConditionElement() { + if (this.condition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupRuleSourceComponent.condition"); + else if (Configuration.doAutoCreate()) + this.condition = new StringType(); // bb + return this.condition; + } + + public boolean hasConditionElement() { + return this.condition != null && !this.condition.isEmpty(); + } + + public boolean hasCondition() { + return this.condition != null && !this.condition.isEmpty(); + } + + /** + * @param value {@link #condition} (FluentPath expression - must be true or the rule does not apply.). This is the underlying object with id, value and extensions. The accessor "getCondition" gives direct access to the value + */ + public StructureMapGroupRuleSourceComponent setConditionElement(StringType value) { + this.condition = value; + return this; + } + + /** + * @return FluentPath expression - must be true or the rule does not apply. + */ + public String getCondition() { + return this.condition == null ? null : this.condition.getValue(); + } + + /** + * @param value FluentPath expression - must be true or the rule does not apply. + */ + public StructureMapGroupRuleSourceComponent setCondition(String value) { + if (Utilities.noString(value)) + this.condition = null; + else { + if (this.condition == null) + this.condition = new StringType(); + this.condition.setValue(value); + } + return this; + } + + /** + * @return {@link #check} (FluentPath expression - must be true or the mapping engine throws an error instead of completing.). This is the underlying object with id, value and extensions. The accessor "getCheck" gives direct access to the value + */ + public StringType getCheckElement() { + if (this.check == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupRuleSourceComponent.check"); + else if (Configuration.doAutoCreate()) + this.check = new StringType(); // bb + return this.check; + } + + public boolean hasCheckElement() { + return this.check != null && !this.check.isEmpty(); + } + + public boolean hasCheck() { + return this.check != null && !this.check.isEmpty(); + } + + /** + * @param value {@link #check} (FluentPath expression - must be true or the mapping engine throws an error instead of completing.). This is the underlying object with id, value and extensions. The accessor "getCheck" gives direct access to the value + */ + public StructureMapGroupRuleSourceComponent setCheckElement(StringType value) { + this.check = value; + return this; + } + + /** + * @return FluentPath expression - must be true or the mapping engine throws an error instead of completing. + */ + public String getCheck() { + return this.check == null ? null : this.check.getValue(); + } + + /** + * @param value FluentPath expression - must be true or the mapping engine throws an error instead of completing. + */ + public StructureMapGroupRuleSourceComponent setCheck(String value) { + if (Utilities.noString(value)) + this.check = null; + else { + if (this.check == null) + this.check = new StringType(); + this.check.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("required", "boolean", "Whether this rule applies if the source isn't found.", 0, java.lang.Integer.MAX_VALUE, required)); + childrenList.add(new Property("context", "id", "Type or variable this rule applies to.", 0, java.lang.Integer.MAX_VALUE, context)); + childrenList.add(new Property("contextType", "code", "How to interpret the context.", 0, java.lang.Integer.MAX_VALUE, contextType)); + childrenList.add(new Property("element", "string", "Optional field for this source.", 0, java.lang.Integer.MAX_VALUE, element)); + childrenList.add(new Property("listMode", "code", "How to handle the list mode for this element.", 0, java.lang.Integer.MAX_VALUE, listMode)); + childrenList.add(new Property("variable", "id", "Named context for field, if a field is specified.", 0, java.lang.Integer.MAX_VALUE, variable)); + childrenList.add(new Property("condition", "string", "FluentPath expression - must be true or the rule does not apply.", 0, java.lang.Integer.MAX_VALUE, condition)); + childrenList.add(new Property("check", "string", "FluentPath expression - must be true or the mapping engine throws an error instead of completing.", 0, java.lang.Integer.MAX_VALUE, check)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("required")) + this.required = castToBoolean(value); // BooleanType + else if (name.equals("context")) + this.context = castToId(value); // IdType + else if (name.equals("contextType")) + this.contextType = new StructureMapContextTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("element")) + this.element = castToString(value); // StringType + else if (name.equals("listMode")) + this.listMode = new StructureMapListModeEnumFactory().fromType(value); // Enumeration + else if (name.equals("variable")) + this.variable = castToId(value); // IdType + else if (name.equals("condition")) + this.condition = castToString(value); // StringType + else if (name.equals("check")) + this.check = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("required")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.required"); + } + else if (name.equals("context")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.context"); + } + else if (name.equals("contextType")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.contextType"); + } + else if (name.equals("element")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.element"); + } + else if (name.equals("listMode")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.listMode"); + } + else if (name.equals("variable")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.variable"); + } + else if (name.equals("condition")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.condition"); + } + else if (name.equals("check")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.check"); + } + else + return super.addChild(name); + } + + public StructureMapGroupRuleSourceComponent copy() { + StructureMapGroupRuleSourceComponent dst = new StructureMapGroupRuleSourceComponent(); + copyValues(dst); + dst.required = required == null ? null : required.copy(); + dst.context = context == null ? null : context.copy(); + dst.contextType = contextType == null ? null : contextType.copy(); + dst.element = element == null ? null : element.copy(); + dst.listMode = listMode == null ? null : listMode.copy(); + dst.variable = variable == null ? null : variable.copy(); + dst.condition = condition == null ? null : condition.copy(); + dst.check = check == null ? null : check.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StructureMapGroupRuleSourceComponent)) + return false; + StructureMapGroupRuleSourceComponent o = (StructureMapGroupRuleSourceComponent) other; + return compareDeep(required, o.required, true) && compareDeep(context, o.context, true) && compareDeep(contextType, o.contextType, true) + && compareDeep(element, o.element, true) && compareDeep(listMode, o.listMode, true) && compareDeep(variable, o.variable, true) + && compareDeep(condition, o.condition, true) && compareDeep(check, o.check, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StructureMapGroupRuleSourceComponent)) + return false; + StructureMapGroupRuleSourceComponent o = (StructureMapGroupRuleSourceComponent) other; + return compareValues(required, o.required, true) && compareValues(context, o.context, true) && compareValues(contextType, o.contextType, true) + && compareValues(element, o.element, true) && compareValues(listMode, o.listMode, true) && compareValues(variable, o.variable, true) + && compareValues(condition, o.condition, true) && compareValues(check, o.check, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( required, context, contextType + , element, listMode, variable, condition, check); + } + + public String fhirType() { + return "StructureMap.group.rule.source"; + + } + + } + + @Block() + public static class StructureMapGroupRuleTargetComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Type or variable this rule applies to. + */ + @Child(name = "context", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Type or variable this rule applies to", formalDefinition="Type or variable this rule applies to." ) + protected IdType context; + + /** + * How to interpret the context. + */ + @Child(name = "contextType", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="type | variable", formalDefinition="How to interpret the context." ) + protected Enumeration contextType; + + /** + * Field to create in the context. + */ + @Child(name = "element", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Field to create in the context", formalDefinition="Field to create in the context." ) + protected StringType element; + + /** + * Named context for field, if desired, and a field is specified. + */ + @Child(name = "variable", type = {IdType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Named context for field, if desired, and a field is specified", formalDefinition="Named context for field, if desired, and a field is specified." ) + protected IdType variable; + + /** + * If field is a list, how to manage the list. + */ + @Child(name = "listMode", type = {CodeType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="first | share | last", formalDefinition="If field is a list, how to manage the list." ) + protected List> listMode; + + /** + * Internal rule reference for shared list items. + */ + @Child(name = "listRuleId", type = {IdType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Internal rule reference for shared list items", formalDefinition="Internal rule reference for shared list items." ) + protected IdType listRuleId; + + /** + * How the data is copied / created. + */ + @Child(name = "transform", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="create | copy +", formalDefinition="How the data is copied / created." ) + protected Enumeration transform; + + /** + * Parameters to the transform. + */ + @Child(name = "parameter", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Parameters to the transform", formalDefinition="Parameters to the transform." ) + protected List parameter; + + private static final long serialVersionUID = 775400884L; + + /** + * Constructor + */ + public StructureMapGroupRuleTargetComponent() { + super(); + } + + /** + * Constructor + */ + public StructureMapGroupRuleTargetComponent(IdType context, Enumeration contextType) { + super(); + this.context = context; + this.contextType = contextType; + } + + /** + * @return {@link #context} (Type or variable this rule applies to.). This is the underlying object with id, value and extensions. The accessor "getContext" gives direct access to the value + */ + public IdType getContextElement() { + if (this.context == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupRuleTargetComponent.context"); + else if (Configuration.doAutoCreate()) + this.context = new IdType(); // bb + return this.context; + } + + public boolean hasContextElement() { + return this.context != null && !this.context.isEmpty(); + } + + public boolean hasContext() { + return this.context != null && !this.context.isEmpty(); + } + + /** + * @param value {@link #context} (Type or variable this rule applies to.). This is the underlying object with id, value and extensions. The accessor "getContext" gives direct access to the value + */ + public StructureMapGroupRuleTargetComponent setContextElement(IdType value) { + this.context = value; + return this; + } + + /** + * @return Type or variable this rule applies to. + */ + public String getContext() { + return this.context == null ? null : this.context.getValue(); + } + + /** + * @param value Type or variable this rule applies to. + */ + public StructureMapGroupRuleTargetComponent setContext(String value) { + if (this.context == null) + this.context = new IdType(); + this.context.setValue(value); + return this; + } + + /** + * @return {@link #contextType} (How to interpret the context.). This is the underlying object with id, value and extensions. The accessor "getContextType" gives direct access to the value + */ + public Enumeration getContextTypeElement() { + if (this.contextType == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupRuleTargetComponent.contextType"); + else if (Configuration.doAutoCreate()) + this.contextType = new Enumeration(new StructureMapContextTypeEnumFactory()); // bb + return this.contextType; + } + + public boolean hasContextTypeElement() { + return this.contextType != null && !this.contextType.isEmpty(); + } + + public boolean hasContextType() { + return this.contextType != null && !this.contextType.isEmpty(); + } + + /** + * @param value {@link #contextType} (How to interpret the context.). This is the underlying object with id, value and extensions. The accessor "getContextType" gives direct access to the value + */ + public StructureMapGroupRuleTargetComponent setContextTypeElement(Enumeration value) { + this.contextType = value; + return this; + } + + /** + * @return How to interpret the context. + */ + public StructureMapContextType getContextType() { + return this.contextType == null ? null : this.contextType.getValue(); + } + + /** + * @param value How to interpret the context. + */ + public StructureMapGroupRuleTargetComponent setContextType(StructureMapContextType value) { + if (this.contextType == null) + this.contextType = new Enumeration(new StructureMapContextTypeEnumFactory()); + this.contextType.setValue(value); + return this; + } + + /** + * @return {@link #element} (Field to create in the context.). This is the underlying object with id, value and extensions. The accessor "getElement" gives direct access to the value + */ + public StringType getElementElement() { + if (this.element == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupRuleTargetComponent.element"); + else if (Configuration.doAutoCreate()) + this.element = new StringType(); // bb + return this.element; + } + + public boolean hasElementElement() { + return this.element != null && !this.element.isEmpty(); + } + + public boolean hasElement() { + return this.element != null && !this.element.isEmpty(); + } + + /** + * @param value {@link #element} (Field to create in the context.). This is the underlying object with id, value and extensions. The accessor "getElement" gives direct access to the value + */ + public StructureMapGroupRuleTargetComponent setElementElement(StringType value) { + this.element = value; + return this; + } + + /** + * @return Field to create in the context. + */ + public String getElement() { + return this.element == null ? null : this.element.getValue(); + } + + /** + * @param value Field to create in the context. + */ + public StructureMapGroupRuleTargetComponent setElement(String value) { + if (Utilities.noString(value)) + this.element = null; + else { + if (this.element == null) + this.element = new StringType(); + this.element.setValue(value); + } + return this; + } + + /** + * @return {@link #variable} (Named context for field, if desired, and a field is specified.). This is the underlying object with id, value and extensions. The accessor "getVariable" gives direct access to the value + */ + public IdType getVariableElement() { + if (this.variable == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupRuleTargetComponent.variable"); + else if (Configuration.doAutoCreate()) + this.variable = new IdType(); // bb + return this.variable; + } + + public boolean hasVariableElement() { + return this.variable != null && !this.variable.isEmpty(); + } + + public boolean hasVariable() { + return this.variable != null && !this.variable.isEmpty(); + } + + /** + * @param value {@link #variable} (Named context for field, if desired, and a field is specified.). This is the underlying object with id, value and extensions. The accessor "getVariable" gives direct access to the value + */ + public StructureMapGroupRuleTargetComponent setVariableElement(IdType value) { + this.variable = value; + return this; + } + + /** + * @return Named context for field, if desired, and a field is specified. + */ + public String getVariable() { + return this.variable == null ? null : this.variable.getValue(); + } + + /** + * @param value Named context for field, if desired, and a field is specified. + */ + public StructureMapGroupRuleTargetComponent setVariable(String value) { + if (Utilities.noString(value)) + this.variable = null; + else { + if (this.variable == null) + this.variable = new IdType(); + this.variable.setValue(value); + } + return this; + } + + /** + * @return {@link #listMode} (If field is a list, how to manage the list.) + */ + public List> getListMode() { + if (this.listMode == null) + this.listMode = new ArrayList>(); + return this.listMode; + } + + public boolean hasListMode() { + if (this.listMode == null) + return false; + for (Enumeration item : this.listMode) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #listMode} (If field is a list, how to manage the list.) + */ + // syntactic sugar + public Enumeration addListModeElement() {//2 + Enumeration t = new Enumeration(new StructureMapListModeEnumFactory()); + if (this.listMode == null) + this.listMode = new ArrayList>(); + this.listMode.add(t); + return t; + } + + /** + * @param value {@link #listMode} (If field is a list, how to manage the list.) + */ + public StructureMapGroupRuleTargetComponent addListMode(StructureMapListMode value) { //1 + Enumeration t = new Enumeration(new StructureMapListModeEnumFactory()); + t.setValue(value); + if (this.listMode == null) + this.listMode = new ArrayList>(); + this.listMode.add(t); + return this; + } + + /** + * @param value {@link #listMode} (If field is a list, how to manage the list.) + */ + public boolean hasListMode(StructureMapListMode value) { + if (this.listMode == null) + return false; + for (Enumeration v : this.listMode) + if (v.equals(value)) // code + return true; + return false; + } + + /** + * @return {@link #listRuleId} (Internal rule reference for shared list items.). This is the underlying object with id, value and extensions. The accessor "getListRuleId" gives direct access to the value + */ + public IdType getListRuleIdElement() { + if (this.listRuleId == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupRuleTargetComponent.listRuleId"); + else if (Configuration.doAutoCreate()) + this.listRuleId = new IdType(); // bb + return this.listRuleId; + } + + public boolean hasListRuleIdElement() { + return this.listRuleId != null && !this.listRuleId.isEmpty(); + } + + public boolean hasListRuleId() { + return this.listRuleId != null && !this.listRuleId.isEmpty(); + } + + /** + * @param value {@link #listRuleId} (Internal rule reference for shared list items.). This is the underlying object with id, value and extensions. The accessor "getListRuleId" gives direct access to the value + */ + public StructureMapGroupRuleTargetComponent setListRuleIdElement(IdType value) { + this.listRuleId = value; + return this; + } + + /** + * @return Internal rule reference for shared list items. + */ + public String getListRuleId() { + return this.listRuleId == null ? null : this.listRuleId.getValue(); + } + + /** + * @param value Internal rule reference for shared list items. + */ + public StructureMapGroupRuleTargetComponent setListRuleId(String value) { + if (Utilities.noString(value)) + this.listRuleId = null; + else { + if (this.listRuleId == null) + this.listRuleId = new IdType(); + this.listRuleId.setValue(value); + } + return this; + } + + /** + * @return {@link #transform} (How the data is copied / created.). This is the underlying object with id, value and extensions. The accessor "getTransform" gives direct access to the value + */ + public Enumeration getTransformElement() { + if (this.transform == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupRuleTargetComponent.transform"); + else if (Configuration.doAutoCreate()) + this.transform = new Enumeration(new StructureMapTransformEnumFactory()); // bb + return this.transform; + } + + public boolean hasTransformElement() { + return this.transform != null && !this.transform.isEmpty(); + } + + public boolean hasTransform() { + return this.transform != null && !this.transform.isEmpty(); + } + + /** + * @param value {@link #transform} (How the data is copied / created.). This is the underlying object with id, value and extensions. The accessor "getTransform" gives direct access to the value + */ + public StructureMapGroupRuleTargetComponent setTransformElement(Enumeration value) { + this.transform = value; + return this; + } + + /** + * @return How the data is copied / created. + */ + public StructureMapTransform getTransform() { + return this.transform == null ? null : this.transform.getValue(); + } + + /** + * @param value How the data is copied / created. + */ + public StructureMapGroupRuleTargetComponent setTransform(StructureMapTransform value) { + if (value == null) + this.transform = null; + else { + if (this.transform == null) + this.transform = new Enumeration(new StructureMapTransformEnumFactory()); + this.transform.setValue(value); + } + return this; + } + + /** + * @return {@link #parameter} (Parameters to the transform.) + */ + public List getParameter() { + if (this.parameter == null) + this.parameter = new ArrayList(); + return this.parameter; + } + + public boolean hasParameter() { + if (this.parameter == null) + return false; + for (StructureMapGroupRuleTargetParameterComponent item : this.parameter) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #parameter} (Parameters to the transform.) + */ + // syntactic sugar + public StructureMapGroupRuleTargetParameterComponent addParameter() { //3 + StructureMapGroupRuleTargetParameterComponent t = new StructureMapGroupRuleTargetParameterComponent(); + if (this.parameter == null) + this.parameter = new ArrayList(); + this.parameter.add(t); + return t; + } + + // syntactic sugar + public StructureMapGroupRuleTargetComponent addParameter(StructureMapGroupRuleTargetParameterComponent t) { //3 + if (t == null) + return this; + if (this.parameter == null) + this.parameter = new ArrayList(); + this.parameter.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("context", "id", "Type or variable this rule applies to.", 0, java.lang.Integer.MAX_VALUE, context)); + childrenList.add(new Property("contextType", "code", "How to interpret the context.", 0, java.lang.Integer.MAX_VALUE, contextType)); + childrenList.add(new Property("element", "string", "Field to create in the context.", 0, java.lang.Integer.MAX_VALUE, element)); + childrenList.add(new Property("variable", "id", "Named context for field, if desired, and a field is specified.", 0, java.lang.Integer.MAX_VALUE, variable)); + childrenList.add(new Property("listMode", "code", "If field is a list, how to manage the list.", 0, java.lang.Integer.MAX_VALUE, listMode)); + childrenList.add(new Property("listRuleId", "id", "Internal rule reference for shared list items.", 0, java.lang.Integer.MAX_VALUE, listRuleId)); + childrenList.add(new Property("transform", "code", "How the data is copied / created.", 0, java.lang.Integer.MAX_VALUE, transform)); + childrenList.add(new Property("parameter", "", "Parameters to the transform.", 0, java.lang.Integer.MAX_VALUE, parameter)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("context")) + this.context = castToId(value); // IdType + else if (name.equals("contextType")) + this.contextType = new StructureMapContextTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("element")) + this.element = castToString(value); // StringType + else if (name.equals("variable")) + this.variable = castToId(value); // IdType + else if (name.equals("listMode")) + this.getListMode().add(new StructureMapListModeEnumFactory().fromType(value)); + else if (name.equals("listRuleId")) + this.listRuleId = castToId(value); // IdType + else if (name.equals("transform")) + this.transform = new StructureMapTransformEnumFactory().fromType(value); // Enumeration + else if (name.equals("parameter")) + this.getParameter().add((StructureMapGroupRuleTargetParameterComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("context")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.context"); + } + else if (name.equals("contextType")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.contextType"); + } + else if (name.equals("element")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.element"); + } + else if (name.equals("variable")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.variable"); + } + else if (name.equals("listMode")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.listMode"); + } + else if (name.equals("listRuleId")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.listRuleId"); + } + else if (name.equals("transform")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.transform"); + } + else if (name.equals("parameter")) { + return addParameter(); + } + else + return super.addChild(name); + } + + public StructureMapGroupRuleTargetComponent copy() { + StructureMapGroupRuleTargetComponent dst = new StructureMapGroupRuleTargetComponent(); + copyValues(dst); + dst.context = context == null ? null : context.copy(); + dst.contextType = contextType == null ? null : contextType.copy(); + dst.element = element == null ? null : element.copy(); + dst.variable = variable == null ? null : variable.copy(); + if (listMode != null) { + dst.listMode = new ArrayList>(); + for (Enumeration i : listMode) + dst.listMode.add(i.copy()); + }; + dst.listRuleId = listRuleId == null ? null : listRuleId.copy(); + dst.transform = transform == null ? null : transform.copy(); + if (parameter != null) { + dst.parameter = new ArrayList(); + for (StructureMapGroupRuleTargetParameterComponent i : parameter) + dst.parameter.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StructureMapGroupRuleTargetComponent)) + return false; + StructureMapGroupRuleTargetComponent o = (StructureMapGroupRuleTargetComponent) other; + return compareDeep(context, o.context, true) && compareDeep(contextType, o.contextType, true) && compareDeep(element, o.element, true) + && compareDeep(variable, o.variable, true) && compareDeep(listMode, o.listMode, true) && compareDeep(listRuleId, o.listRuleId, true) + && compareDeep(transform, o.transform, true) && compareDeep(parameter, o.parameter, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StructureMapGroupRuleTargetComponent)) + return false; + StructureMapGroupRuleTargetComponent o = (StructureMapGroupRuleTargetComponent) other; + return compareValues(context, o.context, true) && compareValues(contextType, o.contextType, true) && compareValues(element, o.element, true) + && compareValues(variable, o.variable, true) && compareValues(listMode, o.listMode, true) && compareValues(listRuleId, o.listRuleId, true) + && compareValues(transform, o.transform, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( context, contextType, element + , variable, listMode, listRuleId, transform, parameter); + } + + public String fhirType() { + return "StructureMap.group.rule.target"; + + } + + } + + @Block() + public static class StructureMapGroupRuleTargetParameterComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Parameter value - variable or literal. + */ + @Child(name = "value", type = {IdType.class, StringType.class, BooleanType.class, IntegerType.class, DecimalType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Parameter value - variable or literal", formalDefinition="Parameter value - variable or literal." ) + protected Type value; + + private static final long serialVersionUID = -732981989L; + + /** + * Constructor + */ + public StructureMapGroupRuleTargetParameterComponent() { + super(); + } + + /** + * Constructor + */ + public StructureMapGroupRuleTargetParameterComponent(Type value) { + super(); + this.value = value; + } + + /** + * @return {@link #value} (Parameter value - variable or literal.) + */ + public Type getValue() { + return this.value; + } + + /** + * @return {@link #value} (Parameter value - variable or literal.) + */ + public IdType getValueIdType() throws FHIRException { + if (!(this.value instanceof IdType)) + throw new FHIRException("Type mismatch: the type IdType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (IdType) this.value; + } + + public boolean hasValueIdType() { + return this.value instanceof IdType; + } + + /** + * @return {@link #value} (Parameter value - variable or literal.) + */ + public StringType getValueStringType() throws FHIRException { + if (!(this.value instanceof StringType)) + throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (StringType) this.value; + } + + public boolean hasValueStringType() { + return this.value instanceof StringType; + } + + /** + * @return {@link #value} (Parameter value - variable or literal.) + */ + public BooleanType getValueBooleanType() throws FHIRException { + if (!(this.value instanceof BooleanType)) + throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (BooleanType) this.value; + } + + public boolean hasValueBooleanType() { + return this.value instanceof BooleanType; + } + + /** + * @return {@link #value} (Parameter value - variable or literal.) + */ + public IntegerType getValueIntegerType() throws FHIRException { + if (!(this.value instanceof IntegerType)) + throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (IntegerType) this.value; + } + + public boolean hasValueIntegerType() { + return this.value instanceof IntegerType; + } + + /** + * @return {@link #value} (Parameter value - variable or literal.) + */ + public DecimalType getValueDecimalType() throws FHIRException { + if (!(this.value instanceof DecimalType)) + throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered"); + return (DecimalType) this.value; + } + + public boolean hasValueDecimalType() { + return this.value instanceof DecimalType; + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (Parameter value - variable or literal.) + */ + public StructureMapGroupRuleTargetParameterComponent setValue(Type value) { + this.value = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("value[x]", "id|string|boolean|integer|decimal", "Parameter value - variable or literal.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("value[x]")) + this.value = (Type) value; // Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("valueId")) { + this.value = new IdType(); + return this.value; + } + else if (name.equals("valueString")) { + this.value = new StringType(); + return this.value; + } + else if (name.equals("valueBoolean")) { + this.value = new BooleanType(); + return this.value; + } + else if (name.equals("valueInteger")) { + this.value = new IntegerType(); + return this.value; + } + else if (name.equals("valueDecimal")) { + this.value = new DecimalType(); + return this.value; + } + else + return super.addChild(name); + } + + public StructureMapGroupRuleTargetParameterComponent copy() { + StructureMapGroupRuleTargetParameterComponent dst = new StructureMapGroupRuleTargetParameterComponent(); + copyValues(dst); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StructureMapGroupRuleTargetParameterComponent)) + return false; + StructureMapGroupRuleTargetParameterComponent o = (StructureMapGroupRuleTargetParameterComponent) other; + return compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StructureMapGroupRuleTargetParameterComponent)) + return false; + StructureMapGroupRuleTargetParameterComponent o = (StructureMapGroupRuleTargetParameterComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value); + } + + public String fhirType() { + return "StructureMap.group.rule.target.parameter"; + + } + + } + + @Block() + public static class StructureMapGroupRuleDependentComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Name of a rule or group to apply. + */ + @Child(name = "name", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of a rule or group to apply", formalDefinition="Name of a rule or group to apply." ) + protected IdType name; + + /** + * Names of variables to pass to the rule or group. + */ + @Child(name = "variable", type = {StringType.class}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Names of variables to pass to the rule or group", formalDefinition="Names of variables to pass to the rule or group." ) + protected List variable; + + private static final long serialVersionUID = 1021661591L; + + /** + * Constructor + */ + public StructureMapGroupRuleDependentComponent() { + super(); + } + + /** + * Constructor + */ + public StructureMapGroupRuleDependentComponent(IdType name) { + super(); + this.name = name; + } + + /** + * @return {@link #name} (Name of a rule or group to apply.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public IdType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMapGroupRuleDependentComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new IdType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Name of a rule or group to apply.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StructureMapGroupRuleDependentComponent setNameElement(IdType value) { + this.name = value; + return this; + } + + /** + * @return Name of a rule or group to apply. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Name of a rule or group to apply. + */ + public StructureMapGroupRuleDependentComponent setName(String value) { + if (this.name == null) + this.name = new IdType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #variable} (Names of variables to pass to the rule or group.) + */ + public List getVariable() { + if (this.variable == null) + this.variable = new ArrayList(); + return this.variable; + } + + public boolean hasVariable() { + if (this.variable == null) + return false; + for (StringType item : this.variable) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #variable} (Names of variables to pass to the rule or group.) + */ + // syntactic sugar + public StringType addVariableElement() {//2 + StringType t = new StringType(); + if (this.variable == null) + this.variable = new ArrayList(); + this.variable.add(t); + return t; + } + + /** + * @param value {@link #variable} (Names of variables to pass to the rule or group.) + */ + public StructureMapGroupRuleDependentComponent addVariable(String value) { //1 + StringType t = new StringType(); + t.setValue(value); + if (this.variable == null) + this.variable = new ArrayList(); + this.variable.add(t); + return this; + } + + /** + * @param value {@link #variable} (Names of variables to pass to the rule or group.) + */ + public boolean hasVariable(String value) { + if (this.variable == null) + return false; + for (StringType v : this.variable) + if (v.equals(value)) // string + return true; + return false; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "id", "Name of a rule or group to apply.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("variable", "string", "Names of variables to pass to the rule or group.", 0, java.lang.Integer.MAX_VALUE, variable)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToId(value); // IdType + else if (name.equals("variable")) + this.getVariable().add(castToString(value)); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.name"); + } + else if (name.equals("variable")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.variable"); + } + else + return super.addChild(name); + } + + public StructureMapGroupRuleDependentComponent copy() { + StructureMapGroupRuleDependentComponent dst = new StructureMapGroupRuleDependentComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + if (variable != null) { + dst.variable = new ArrayList(); + for (StringType i : variable) + dst.variable.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StructureMapGroupRuleDependentComponent)) + return false; + StructureMapGroupRuleDependentComponent o = (StructureMapGroupRuleDependentComponent) other; + return compareDeep(name, o.name, true) && compareDeep(variable, o.variable, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StructureMapGroupRuleDependentComponent)) + return false; + StructureMapGroupRuleDependentComponent o = (StructureMapGroupRuleDependentComponent) other; + return compareValues(name, o.name, true) && compareValues(variable, o.variable, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, variable); + } + + public String fhirType() { + return "StructureMap.group.rule.dependent"; + + } + + } + + /** + * An absolute URL that is used to identify this structure map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure map is (or will be) published. + */ + @Child(name = "url", type = {UriType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Absolute URL used to reference this StructureMap", formalDefinition="An absolute URL that is used to identify this structure map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure map is (or will be) published." ) + protected UriType url; + + /** + * Formal identifier that is used to identify this StructureMap when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI). + */ + @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Other identifiers for the StructureMap", formalDefinition="Formal identifier that is used to identify this StructureMap when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)." ) + protected List identifier; + + /** + * The identifier that is used to identify this version of the StructureMap when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureMap author manually. + */ + @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Logical id for this version of the StructureMap", formalDefinition="The identifier that is used to identify this version of the StructureMap when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureMap author manually." ) + protected StringType version; + + /** + * A free text natural language name identifying the StructureMap. + */ + @Child(name = "name", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Informal name for this StructureMap", formalDefinition="A free text natural language name identifying the StructureMap." ) + protected StringType name; + + /** + * The status of the StructureMap. + */ + @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true) + @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the StructureMap." ) + protected Enumeration status; + + /** + * This StructureMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + @Child(name = "experimental", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This StructureMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) + protected BooleanType experimental; + + /** + * The name of the individual or organization that published the structure map. + */ + @Child(name = "publisher", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the structure map." ) + protected StringType publisher; + + /** + * Contacts to assist a user in finding and communicating with the publisher. + */ + @Child(name = "contact", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) + protected List contact; + + /** + * The date this version of the structure map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes. + */ + @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Date for this version of the StructureMap", formalDefinition="The date this version of the structure map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes." ) + protected DateTimeType date; + + /** + * A free text natural language description of the StructureMap and its use. + */ + @Child(name = "description", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Natural language description of the StructureMap", formalDefinition="A free text natural language description of the StructureMap and its use." ) + protected StringType description; + + /** + * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure maps. + */ + @Child(name = "useContext", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Content intends to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure maps." ) + protected List useContext; + + /** + * Explains why this structure map is needed and why it's been designed as it has. + */ + @Child(name = "requirements", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Scope and Usage this structure map is for", formalDefinition="Explains why this structure map is needed and why it's been designed as it has." ) + protected StringType requirements; + + /** + * A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. + */ + @Child(name = "copyright", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings." ) + protected StringType copyright; + + /** + * A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced. + */ + @Child(name = "structure", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Structure Definition used by this map", formalDefinition="A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced." ) + protected List structure; + + /** + * Other maps used by this map (canonical URLs). + */ + @Child(name = "import", type = {UriType.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Other maps used by this map (canonical URLs)", formalDefinition="Other maps used by this map (canonical URLs)." ) + protected List import_; + + /** + * Named sections for reader convenience. + */ + @Child(name = "group", type = {}, order=15, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) + @Description(shortDefinition="Named sections for reader convenience", formalDefinition="Named sections for reader convenience." ) + protected List group; + + private static final long serialVersionUID = 710892955L; + + /** + * Constructor + */ + public StructureMap() { + super(); + } + + /** + * Constructor + */ + public StructureMap(UriType url, StringType name, Enumeration status) { + super(); + this.url = url; + this.name = name; + this.status = status; + } + + /** + * @return {@link #url} (An absolute URL that is used to identify this structure map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure map is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public UriType getUrlElement() { + if (this.url == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMap.url"); + else if (Configuration.doAutoCreate()) + this.url = new UriType(); // bb + return this.url; + } + + public boolean hasUrlElement() { + return this.url != null && !this.url.isEmpty(); + } + + public boolean hasUrl() { + return this.url != null && !this.url.isEmpty(); + } + + /** + * @param value {@link #url} (An absolute URL that is used to identify this structure map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure map is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value + */ + public StructureMap setUrlElement(UriType value) { + this.url = value; + return this; + } + + /** + * @return An absolute URL that is used to identify this structure map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure map is (or will be) published. + */ + public String getUrl() { + return this.url == null ? null : this.url.getValue(); + } + + /** + * @param value An absolute URL that is used to identify this structure map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure map is (or will be) published. + */ + public StructureMap setUrl(String value) { + if (this.url == null) + this.url = new UriType(); + this.url.setValue(value); + return this; + } + + /** + * @return {@link #identifier} (Formal identifier that is used to identify this StructureMap when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).) + */ + public List getIdentifier() { + if (this.identifier == null) + this.identifier = new ArrayList(); + return this.identifier; + } + + public boolean hasIdentifier() { + if (this.identifier == null) + return false; + for (Identifier item : this.identifier) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #identifier} (Formal identifier that is used to identify this StructureMap when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).) + */ + // syntactic sugar + public Identifier addIdentifier() { //3 + Identifier t = new Identifier(); + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return t; + } + + // syntactic sugar + public StructureMap addIdentifier(Identifier t) { //3 + if (t == null) + return this; + if (this.identifier == null) + this.identifier = new ArrayList(); + this.identifier.add(t); + return this; + } + + /** + * @return {@link #version} (The identifier that is used to identify this version of the StructureMap when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureMap author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StringType getVersionElement() { + if (this.version == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMap.version"); + else if (Configuration.doAutoCreate()) + this.version = new StringType(); // bb + return this.version; + } + + public boolean hasVersionElement() { + return this.version != null && !this.version.isEmpty(); + } + + public boolean hasVersion() { + return this.version != null && !this.version.isEmpty(); + } + + /** + * @param value {@link #version} (The identifier that is used to identify this version of the StructureMap when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureMap author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value + */ + public StructureMap setVersionElement(StringType value) { + this.version = value; + return this; + } + + /** + * @return The identifier that is used to identify this version of the StructureMap when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureMap author manually. + */ + public String getVersion() { + return this.version == null ? null : this.version.getValue(); + } + + /** + * @param value The identifier that is used to identify this version of the StructureMap when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureMap author manually. + */ + public StructureMap setVersion(String value) { + if (Utilities.noString(value)) + this.version = null; + else { + if (this.version == null) + this.version = new StringType(); + this.version.setValue(value); + } + return this; + } + + /** + * @return {@link #name} (A free text natural language name identifying the StructureMap.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMap.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (A free text natural language name identifying the StructureMap.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StructureMap setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return A free text natural language name identifying the StructureMap. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value A free text natural language name identifying the StructureMap. + */ + public StructureMap setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #status} (The status of the StructureMap.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMap.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The status of the StructureMap.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public StructureMap setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The status of the StructureMap. + */ + public ConformanceResourceStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The status of the StructureMap. + */ + public StructureMap setStatus(ConformanceResourceStatus value) { + if (this.status == null) + this.status = new Enumeration(new ConformanceResourceStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #experimental} (This StructureMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public BooleanType getExperimentalElement() { + if (this.experimental == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMap.experimental"); + else if (Configuration.doAutoCreate()) + this.experimental = new BooleanType(); // bb + return this.experimental; + } + + public boolean hasExperimentalElement() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + public boolean hasExperimental() { + return this.experimental != null && !this.experimental.isEmpty(); + } + + /** + * @param value {@link #experimental} (This StructureMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value + */ + public StructureMap setExperimentalElement(BooleanType value) { + this.experimental = value; + return this; + } + + /** + * @return This StructureMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public boolean getExperimental() { + return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); + } + + /** + * @param value This StructureMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. + */ + public StructureMap setExperimental(boolean value) { + if (this.experimental == null) + this.experimental = new BooleanType(); + this.experimental.setValue(value); + return this; + } + + /** + * @return {@link #publisher} (The name of the individual or organization that published the structure map.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public StringType getPublisherElement() { + if (this.publisher == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMap.publisher"); + else if (Configuration.doAutoCreate()) + this.publisher = new StringType(); // bb + return this.publisher; + } + + public boolean hasPublisherElement() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + public boolean hasPublisher() { + return this.publisher != null && !this.publisher.isEmpty(); + } + + /** + * @param value {@link #publisher} (The name of the individual or organization that published the structure map.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value + */ + public StructureMap setPublisherElement(StringType value) { + this.publisher = value; + return this; + } + + /** + * @return The name of the individual or organization that published the structure map. + */ + public String getPublisher() { + return this.publisher == null ? null : this.publisher.getValue(); + } + + /** + * @param value The name of the individual or organization that published the structure map. + */ + public StructureMap setPublisher(String value) { + if (Utilities.noString(value)) + this.publisher = null; + else { + if (this.publisher == null) + this.publisher = new StringType(); + this.publisher.setValue(value); + } + return this; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + public List getContact() { + if (this.contact == null) + this.contact = new ArrayList(); + return this.contact; + } + + public boolean hasContact() { + if (this.contact == null) + return false; + for (StructureMapContactComponent item : this.contact) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) + */ + // syntactic sugar + public StructureMapContactComponent addContact() { //3 + StructureMapContactComponent t = new StructureMapContactComponent(); + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return t; + } + + // syntactic sugar + public StructureMap addContact(StructureMapContactComponent t) { //3 + if (t == null) + return this; + if (this.contact == null) + this.contact = new ArrayList(); + this.contact.add(t); + return this; + } + + /** + * @return {@link #date} (The date this version of the structure map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public DateTimeType getDateElement() { + if (this.date == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMap.date"); + else if (Configuration.doAutoCreate()) + this.date = new DateTimeType(); // bb + return this.date; + } + + public boolean hasDateElement() { + return this.date != null && !this.date.isEmpty(); + } + + public boolean hasDate() { + return this.date != null && !this.date.isEmpty(); + } + + /** + * @param value {@link #date} (The date this version of the structure map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value + */ + public StructureMap setDateElement(DateTimeType value) { + this.date = value; + return this; + } + + /** + * @return The date this version of the structure map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes. + */ + public Date getDate() { + return this.date == null ? null : this.date.getValue(); + } + + /** + * @param value The date this version of the structure map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes. + */ + public StructureMap setDate(Date value) { + if (value == null) + this.date = null; + else { + if (this.date == null) + this.date = new DateTimeType(); + this.date.setValue(value); + } + return this; + } + + /** + * @return {@link #description} (A free text natural language description of the StructureMap and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMap.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A free text natural language description of the StructureMap and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StructureMap setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A free text natural language description of the StructureMap and its use. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A free text natural language description of the StructureMap and its use. + */ + public StructureMap setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure maps.) + */ + public List getUseContext() { + if (this.useContext == null) + this.useContext = new ArrayList(); + return this.useContext; + } + + public boolean hasUseContext() { + if (this.useContext == null) + return false; + for (CodeableConcept item : this.useContext) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure maps.) + */ + // syntactic sugar + public CodeableConcept addUseContext() { //3 + CodeableConcept t = new CodeableConcept(); + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return t; + } + + // syntactic sugar + public StructureMap addUseContext(CodeableConcept t) { //3 + if (t == null) + return this; + if (this.useContext == null) + this.useContext = new ArrayList(); + this.useContext.add(t); + return this; + } + + /** + * @return {@link #requirements} (Explains why this structure map is needed and why it's been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public StringType getRequirementsElement() { + if (this.requirements == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMap.requirements"); + else if (Configuration.doAutoCreate()) + this.requirements = new StringType(); // bb + return this.requirements; + } + + public boolean hasRequirementsElement() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + public boolean hasRequirements() { + return this.requirements != null && !this.requirements.isEmpty(); + } + + /** + * @param value {@link #requirements} (Explains why this structure map is needed and why it's been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value + */ + public StructureMap setRequirementsElement(StringType value) { + this.requirements = value; + return this; + } + + /** + * @return Explains why this structure map is needed and why it's been designed as it has. + */ + public String getRequirements() { + return this.requirements == null ? null : this.requirements.getValue(); + } + + /** + * @param value Explains why this structure map is needed and why it's been designed as it has. + */ + public StructureMap setRequirements(String value) { + if (Utilities.noString(value)) + this.requirements = null; + else { + if (this.requirements == null) + this.requirements = new StringType(); + this.requirements.setValue(value); + } + return this; + } + + /** + * @return {@link #copyright} (A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public StringType getCopyrightElement() { + if (this.copyright == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create StructureMap.copyright"); + else if (Configuration.doAutoCreate()) + this.copyright = new StringType(); // bb + return this.copyright; + } + + public boolean hasCopyrightElement() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + public boolean hasCopyright() { + return this.copyright != null && !this.copyright.isEmpty(); + } + + /** + * @param value {@link #copyright} (A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value + */ + public StructureMap setCopyrightElement(StringType value) { + this.copyright = value; + return this; + } + + /** + * @return A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. + */ + public String getCopyright() { + return this.copyright == null ? null : this.copyright.getValue(); + } + + /** + * @param value A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. + */ + public StructureMap setCopyright(String value) { + if (Utilities.noString(value)) + this.copyright = null; + else { + if (this.copyright == null) + this.copyright = new StringType(); + this.copyright.setValue(value); + } + return this; + } + + /** + * @return {@link #structure} (A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced.) + */ + public List getStructure() { + if (this.structure == null) + this.structure = new ArrayList(); + return this.structure; + } + + public boolean hasStructure() { + if (this.structure == null) + return false; + for (StructureMapStructureComponent item : this.structure) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #structure} (A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced.) + */ + // syntactic sugar + public StructureMapStructureComponent addStructure() { //3 + StructureMapStructureComponent t = new StructureMapStructureComponent(); + if (this.structure == null) + this.structure = new ArrayList(); + this.structure.add(t); + return t; + } + + // syntactic sugar + public StructureMap addStructure(StructureMapStructureComponent t) { //3 + if (t == null) + return this; + if (this.structure == null) + this.structure = new ArrayList(); + this.structure.add(t); + return this; + } + + /** + * @return {@link #import_} (Other maps used by this map (canonical URLs).) + */ + public List getImport() { + if (this.import_ == null) + this.import_ = new ArrayList(); + return this.import_; + } + + public boolean hasImport() { + if (this.import_ == null) + return false; + for (UriType item : this.import_) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #import_} (Other maps used by this map (canonical URLs).) + */ + // syntactic sugar + public UriType addImportElement() {//2 + UriType t = new UriType(); + if (this.import_ == null) + this.import_ = new ArrayList(); + this.import_.add(t); + return t; + } + + /** + * @param value {@link #import_} (Other maps used by this map (canonical URLs).) + */ + public StructureMap addImport(String value) { //1 + UriType t = new UriType(); + t.setValue(value); + if (this.import_ == null) + this.import_ = new ArrayList(); + this.import_.add(t); + return this; + } + + /** + * @param value {@link #import_} (Other maps used by this map (canonical URLs).) + */ + public boolean hasImport(String value) { + if (this.import_ == null) + return false; + for (UriType v : this.import_) + if (v.equals(value)) // uri + return true; + return false; + } + + /** + * @return {@link #group} (Named sections for reader convenience.) + */ + public List getGroup() { + if (this.group == null) + this.group = new ArrayList(); + return this.group; + } + + public boolean hasGroup() { + if (this.group == null) + return false; + for (StructureMapGroupComponent item : this.group) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #group} (Named sections for reader convenience.) + */ + // syntactic sugar + public StructureMapGroupComponent addGroup() { //3 + StructureMapGroupComponent t = new StructureMapGroupComponent(); + if (this.group == null) + this.group = new ArrayList(); + this.group.add(t); + return t; + } + + // syntactic sugar + public StructureMap addGroup(StructureMapGroupComponent t) { //3 + if (t == null) + return this; + if (this.group == null) + this.group = new ArrayList(); + this.group.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this structure map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure map is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); + childrenList.add(new Property("identifier", "Identifier", "Formal identifier that is used to identify this StructureMap when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI).", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the StructureMap when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureMap author manually.", 0, java.lang.Integer.MAX_VALUE, version)); + childrenList.add(new Property("name", "string", "A free text natural language name identifying the StructureMap.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("status", "code", "The status of the StructureMap.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("experimental", "boolean", "This StructureMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); + childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the structure map.", 0, java.lang.Integer.MAX_VALUE, publisher)); + childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); + childrenList.add(new Property("date", "dateTime", "The date this version of the structure map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changes.", 0, java.lang.Integer.MAX_VALUE, date)); + childrenList.add(new Property("description", "string", "A free text natural language description of the StructureMap and its use.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure maps.", 0, java.lang.Integer.MAX_VALUE, useContext)); + childrenList.add(new Property("requirements", "string", "Explains why this structure map is needed and why it's been designed as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); + childrenList.add(new Property("copyright", "string", "A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.", 0, java.lang.Integer.MAX_VALUE, copyright)); + childrenList.add(new Property("structure", "", "A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced.", 0, java.lang.Integer.MAX_VALUE, structure)); + childrenList.add(new Property("import", "uri", "Other maps used by this map (canonical URLs).", 0, java.lang.Integer.MAX_VALUE, import_)); + childrenList.add(new Property("group", "", "Named sections for reader convenience.", 0, java.lang.Integer.MAX_VALUE, group)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("url")) + this.url = castToUri(value); // UriType + else if (name.equals("identifier")) + this.getIdentifier().add(castToIdentifier(value)); + else if (name.equals("version")) + this.version = castToString(value); // StringType + else if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("status")) + this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("experimental")) + this.experimental = castToBoolean(value); // BooleanType + else if (name.equals("publisher")) + this.publisher = castToString(value); // StringType + else if (name.equals("contact")) + this.getContact().add((StructureMapContactComponent) value); + else if (name.equals("date")) + this.date = castToDateTime(value); // DateTimeType + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("useContext")) + this.getUseContext().add(castToCodeableConcept(value)); + else if (name.equals("requirements")) + this.requirements = castToString(value); // StringType + else if (name.equals("copyright")) + this.copyright = castToString(value); // StringType + else if (name.equals("structure")) + this.getStructure().add((StructureMapStructureComponent) value); + else if (name.equals("import")) + this.getImport().add(castToUri(value)); + else if (name.equals("group")) + this.getGroup().add((StructureMapGroupComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("url")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.url"); + } + else if (name.equals("identifier")) { + return addIdentifier(); + } + else if (name.equals("version")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.version"); + } + else if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.name"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.status"); + } + else if (name.equals("experimental")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.experimental"); + } + else if (name.equals("publisher")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.publisher"); + } + else if (name.equals("contact")) { + return addContact(); + } + else if (name.equals("date")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.date"); + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.description"); + } + else if (name.equals("useContext")) { + return addUseContext(); + } + else if (name.equals("requirements")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.requirements"); + } + else if (name.equals("copyright")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.copyright"); + } + else if (name.equals("structure")) { + return addStructure(); + } + else if (name.equals("import")) { + throw new FHIRException("Cannot call addChild on a primitive type StructureMap.import"); + } + else if (name.equals("group")) { + return addGroup(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "StructureMap"; + + } + + public StructureMap copy() { + StructureMap dst = new StructureMap(); + copyValues(dst); + dst.url = url == null ? null : url.copy(); + if (identifier != null) { + dst.identifier = new ArrayList(); + for (Identifier i : identifier) + dst.identifier.add(i.copy()); + }; + dst.version = version == null ? null : version.copy(); + dst.name = name == null ? null : name.copy(); + dst.status = status == null ? null : status.copy(); + dst.experimental = experimental == null ? null : experimental.copy(); + dst.publisher = publisher == null ? null : publisher.copy(); + if (contact != null) { + dst.contact = new ArrayList(); + for (StructureMapContactComponent i : contact) + dst.contact.add(i.copy()); + }; + dst.date = date == null ? null : date.copy(); + dst.description = description == null ? null : description.copy(); + if (useContext != null) { + dst.useContext = new ArrayList(); + for (CodeableConcept i : useContext) + dst.useContext.add(i.copy()); + }; + dst.requirements = requirements == null ? null : requirements.copy(); + dst.copyright = copyright == null ? null : copyright.copy(); + if (structure != null) { + dst.structure = new ArrayList(); + for (StructureMapStructureComponent i : structure) + dst.structure.add(i.copy()); + }; + if (import_ != null) { + dst.import_ = new ArrayList(); + for (UriType i : import_) + dst.import_.add(i.copy()); + }; + if (group != null) { + dst.group = new ArrayList(); + for (StructureMapGroupComponent i : group) + dst.group.add(i.copy()); + }; + return dst; + } + + protected StructureMap typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof StructureMap)) + return false; + StructureMap o = (StructureMap) other; + return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) + && compareDeep(name, o.name, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) + && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) + && compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true) + && compareDeep(requirements, o.requirements, true) && compareDeep(copyright, o.copyright, true) + && compareDeep(structure, o.structure, true) && compareDeep(import_, o.import_, true) && compareDeep(group, o.group, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof StructureMap)) + return false; + StructureMap o = (StructureMap) other; + return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) + && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) + && compareValues(date, o.date, true) && compareValues(description, o.description, true) && compareValues(requirements, o.requirements, true) + && compareValues(copyright, o.copyright, true) && compareValues(import_, o.import_, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, identifier, version, name + , status, experimental, publisher, contact, date, description, useContext, requirements + , copyright, structure, import_, group); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.StructureMap; + } + + /** + * Search parameter: date + *

+ * Description: The profile publication date
+ * Type: date
+ * Path: StructureMap.date
+ *

+ */ + @SearchParamDefinition(name="date", path="StructureMap.date", description="The profile publication date", type="date" ) + public static final String SP_DATE = "date"; + /** + * Fluent Client search parameter constant for date + *

+ * Description: The profile publication date
+ * Type: date
+ * Path: StructureMap.date
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); + + /** + * Search parameter: identifier + *

+ * Description: The identifier of the profile
+ * Type: token
+ * Path: StructureMap.identifier
+ *

+ */ + @SearchParamDefinition(name="identifier", path="StructureMap.identifier", description="The identifier of the profile", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + /** + * Fluent Client search parameter constant for identifier + *

+ * Description: The identifier of the profile
+ * Type: token
+ * Path: StructureMap.identifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); + + /** + * Search parameter: name + *

+ * Description: Name of the profile
+ * Type: string
+ * Path: StructureMap.name
+ *

+ */ + @SearchParamDefinition(name="name", path="StructureMap.name", description="Name of the profile", type="string" ) + public static final String SP_NAME = "name"; + /** + * Fluent Client search parameter constant for name + *

+ * Description: Name of the profile
+ * Type: string
+ * Path: StructureMap.name
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); + + /** + * Search parameter: context + *

+ * Description: A use context assigned to the structure
+ * Type: token
+ * Path: StructureMap.useContext
+ *

+ */ + @SearchParamDefinition(name="context", path="StructureMap.useContext", description="A use context assigned to the structure", type="token" ) + public static final String SP_CONTEXT = "context"; + /** + * Fluent Client search parameter constant for context + *

+ * Description: A use context assigned to the structure
+ * Type: token
+ * Path: StructureMap.useContext
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT); + + /** + * Search parameter: publisher + *

+ * Description: Name of the publisher of the profile
+ * Type: string
+ * Path: StructureMap.publisher
+ *

+ */ + @SearchParamDefinition(name="publisher", path="StructureMap.publisher", description="Name of the publisher of the profile", type="string" ) + public static final String SP_PUBLISHER = "publisher"; + /** + * Fluent Client search parameter constant for publisher + *

+ * Description: Name of the publisher of the profile
+ * Type: string
+ * Path: StructureMap.publisher
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); + + /** + * Search parameter: description + *

+ * Description: Text search in the description of the profile
+ * Type: string
+ * Path: StructureMap.description
+ *

+ */ + @SearchParamDefinition(name="description", path="StructureMap.description", description="Text search in the description of the profile", type="string" ) + public static final String SP_DESCRIPTION = "description"; + /** + * Fluent Client search parameter constant for description + *

+ * Description: Text search in the description of the profile
+ * Type: string
+ * Path: StructureMap.description
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); + + /** + * Search parameter: experimental + *

+ * Description: Whether the map is defined purely for experimental reasons
+ * Type: token
+ * Path: StructureMap.experimental
+ *

+ */ + @SearchParamDefinition(name="experimental", path="StructureMap.experimental", description="Whether the map is defined purely for experimental reasons", type="token" ) + public static final String SP_EXPERIMENTAL = "experimental"; + /** + * Fluent Client search parameter constant for experimental + *

+ * Description: Whether the map is defined purely for experimental reasons
+ * Type: token
+ * Path: StructureMap.experimental
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam EXPERIMENTAL = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EXPERIMENTAL); + + /** + * Search parameter: version + *

+ * Description: The version identifier of the profile
+ * Type: token
+ * Path: StructureMap.version
+ *

+ */ + @SearchParamDefinition(name="version", path="StructureMap.version", description="The version identifier of the profile", type="token" ) + public static final String SP_VERSION = "version"; + /** + * Fluent Client search parameter constant for version + *

+ * Description: The version identifier of the profile
+ * Type: token
+ * Path: StructureMap.version
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); + + /** + * Search parameter: url + *

+ * Description: The url that identifies the structure map
+ * Type: uri
+ * Path: StructureMap.url
+ *

+ */ + @SearchParamDefinition(name="url", path="StructureMap.url", description="The url that identifies the structure map", type="uri" ) + public static final String SP_URL = "url"; + /** + * Fluent Client search parameter constant for url + *

+ * Description: The url that identifies the structure map
+ * Type: uri
+ * Path: StructureMap.url
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); + + /** + * Search parameter: status + *

+ * Description: The current status of the profile
+ * Type: token
+ * Path: StructureMap.status
+ *

+ */ + @SearchParamDefinition(name="status", path="StructureMap.status", description="The current status of the profile", type="token" ) + public static final String SP_STATUS = "status"; + /** + * Fluent Client search parameter constant for status + *

+ * Description: The current status of the profile
+ * Type: token
+ * Path: StructureMap.status
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); + + +} + diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Subscription.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Subscription.java index 9795b740493..23ee2313d9b 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Subscription.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Subscription.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system is able to take an appropriate action. */ @@ -611,8 +610,8 @@ public class Subscription extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (endpoint == null || endpoint.isEmpty()) - && (payload == null || payload.isEmpty()) && (header == null || header.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, endpoint, payload, header + ); } public String fhirType() { @@ -1155,10 +1154,8 @@ public class Subscription extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (criteria == null || criteria.isEmpty()) && (contact == null || contact.isEmpty()) - && (reason == null || reason.isEmpty()) && (status == null || status.isEmpty()) && (error == null || error.isEmpty()) - && (channel == null || channel.isEmpty()) && (end == null || end.isEmpty()) && (tag == null || tag.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( criteria, contact, reason, status + , error, channel, end, tag); } @Override diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Substance.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Substance.java index 470f71a9baf..797c3a29ce2 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Substance.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Substance.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A homogeneous material with a definite composition. */ @@ -244,8 +243,8 @@ public class Substance extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (expiry == null || expiry.isEmpty()) - && (quantity == null || quantity.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, expiry, quantity + ); } public String fhirType() { @@ -420,8 +419,7 @@ public class Substance extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (quantity == null || quantity.isEmpty()) && (substance == null || substance.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( quantity, substance); } public String fhirType() { @@ -836,9 +834,8 @@ public class Substance extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (category == null || category.isEmpty()) - && (code == null || code.isEmpty()) && (description == null || description.isEmpty()) && (instance == null || instance.isEmpty()) - && (ingredient == null || ingredient.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, category, code, description + , instance, ingredient); } @Override diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SupplyDelivery.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SupplyDelivery.java index 4f91a1a6fab..ae3becd5804 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SupplyDelivery.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SupplyDelivery.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Record of delivery of what is supplied. */ @@ -832,11 +831,8 @@ public class SupplyDelivery extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) - && (patient == null || patient.isEmpty()) && (type == null || type.isEmpty()) && (quantity == null || quantity.isEmpty()) - && (suppliedItem == null || suppliedItem.isEmpty()) && (supplier == null || supplier.isEmpty()) - && (whenPrepared == null || whenPrepared.isEmpty()) && (time == null || time.isEmpty()) && (destination == null || destination.isEmpty()) - && (receiver == null || receiver.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, status, patient, type + , quantity, suppliedItem, supplier, whenPrepared, time, destination, receiver); } @Override @@ -872,7 +868,7 @@ public class SupplyDelivery extends DomainResource { * Path: SupplyDelivery.receiver
*

*/ - @SearchParamDefinition(name="receiver", path="SupplyDelivery.receiver", description="Who collected the Supply", type="reference" ) + @SearchParamDefinition(name="receiver", path="SupplyDelivery.receiver", description="Who collected the Supply", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_RECEIVER = "receiver"; /** * Fluent Client search parameter constant for receiver @@ -898,7 +894,7 @@ public class SupplyDelivery extends DomainResource { * Path: SupplyDelivery.patient
*

*/ - @SearchParamDefinition(name="patient", path="SupplyDelivery.patient", description="Patient for whom the item is supplied", type="reference" ) + @SearchParamDefinition(name="patient", path="SupplyDelivery.patient", description="Patient for whom the item is supplied", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient @@ -924,7 +920,7 @@ public class SupplyDelivery extends DomainResource { * Path: SupplyDelivery.supplier
*

*/ - @SearchParamDefinition(name="supplier", path="SupplyDelivery.supplier", description="Dispenser", type="reference" ) + @SearchParamDefinition(name="supplier", path="SupplyDelivery.supplier", description="Dispenser", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_SUPPLIER = "supplier"; /** * Fluent Client search parameter constant for supplier diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SupplyRequest.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SupplyRequest.java index ccd82806e49..258cf1771bd 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SupplyRequest.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/SupplyRequest.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A record of a request for a medication, substance or device used in the healthcare setting. */ @@ -299,8 +298,7 @@ public class SupplyRequest extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (schedule == null || schedule.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, schedule); } public String fhirType() { @@ -947,10 +945,8 @@ public class SupplyRequest extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (patient == null || patient.isEmpty()) && (source == null || source.isEmpty()) - && (date == null || date.isEmpty()) && (identifier == null || identifier.isEmpty()) && (status == null || status.isEmpty()) - && (kind == null || kind.isEmpty()) && (orderedItem == null || orderedItem.isEmpty()) && (supplier == null || supplier.isEmpty()) - && (reason == null || reason.isEmpty()) && (when == null || when.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( patient, source, date, identifier + , status, kind, orderedItem, supplier, reason, when); } @Override @@ -1026,7 +1022,7 @@ public class SupplyRequest extends DomainResource { * Path: SupplyRequest.patient
*

*/ - @SearchParamDefinition(name="patient", path="SupplyRequest.patient", description="Patient for whom the item is supplied", type="reference" ) + @SearchParamDefinition(name="patient", path="SupplyRequest.patient", description="Patient for whom the item is supplied", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Task.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Task.java new file mode 100644 index 00000000000..ef744417591 --- /dev/null +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Task.java @@ -0,0 +1,2289 @@ +package org.hl7.fhir.dstu3.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; +/** + * A task to be performed. + */ +@ResourceDef(name="Task", profile="http://hl7.org/fhir/Profile/Task") +public class Task extends DomainResource { + + public enum TaskPriority { + /** + * This task has low priority. + */ + LOW, + /** + * This task has normal priority. + */ + NORMAL, + /** + * This task has high priority. + */ + HIGH, + /** + * added to help the parsers + */ + NULL; + public static TaskPriority fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("low".equals(codeString)) + return LOW; + if ("normal".equals(codeString)) + return NORMAL; + if ("high".equals(codeString)) + return HIGH; + throw new FHIRException("Unknown TaskPriority code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case LOW: return "low"; + case NORMAL: return "normal"; + case HIGH: return "high"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case LOW: return "http://hl7.org/fhir/task-priority"; + case NORMAL: return "http://hl7.org/fhir/task-priority"; + case HIGH: return "http://hl7.org/fhir/task-priority"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case LOW: return "This task has low priority."; + case NORMAL: return "This task has normal priority."; + case HIGH: return "This task has high priority."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case LOW: return "Low"; + case NORMAL: return "Normal"; + case HIGH: return "High"; + default: return "?"; + } + } + } + + public static class TaskPriorityEnumFactory implements EnumFactory { + public TaskPriority fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("low".equals(codeString)) + return TaskPriority.LOW; + if ("normal".equals(codeString)) + return TaskPriority.NORMAL; + if ("high".equals(codeString)) + return TaskPriority.HIGH; + throw new IllegalArgumentException("Unknown TaskPriority code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("low".equals(codeString)) + return new Enumeration(this, TaskPriority.LOW); + if ("normal".equals(codeString)) + return new Enumeration(this, TaskPriority.NORMAL); + if ("high".equals(codeString)) + return new Enumeration(this, TaskPriority.HIGH); + throw new FHIRException("Unknown TaskPriority code '"+codeString+"'"); + } + public String toCode(TaskPriority code) { + if (code == TaskPriority.LOW) + return "low"; + if (code == TaskPriority.NORMAL) + return "normal"; + if (code == TaskPriority.HIGH) + return "high"; + return "?"; + } + public String toSystem(TaskPriority code) { + return code.getSystem(); + } + } + + public enum TaskStatus { + /** + * The task is not yet ready to be acted upon. + */ + DRAFT, + /** + * The task is ready to be acted upon + */ + REQUESTED, + /** + * A potential performer has claimed ownership of the task and is evaluating whether to perform it + */ + RECEIVED, + /** + * The potential performer has agreed to execute the task but has not yet started work + */ + ACCEPTED, + /** + * The potential performer who claimed ownership of the task has decided not to execute it prior to performing any action. + */ + REJECTED, + /** + * Task is ready to be performed, but no action has yet been taken. Used in place of requested/received/accepted/rejected when request assignment and acceptance is a given. + */ + READY, + /** + * Task has been started but is not yet complete. + */ + INPROGRESS, + /** + * Task has been started but work has been paused + */ + ONHOLD, + /** + * The task was attempted but could not be completed due to some error. + */ + FAILED, + /** + * The task has been completed (more or less) as requested. + */ + COMPLETED, + /** + * added to help the parsers + */ + NULL; + public static TaskStatus fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return DRAFT; + if ("requested".equals(codeString)) + return REQUESTED; + if ("received".equals(codeString)) + return RECEIVED; + if ("accepted".equals(codeString)) + return ACCEPTED; + if ("rejected".equals(codeString)) + return REJECTED; + if ("ready".equals(codeString)) + return READY; + if ("in-progress".equals(codeString)) + return INPROGRESS; + if ("on-hold".equals(codeString)) + return ONHOLD; + if ("failed".equals(codeString)) + return FAILED; + if ("completed".equals(codeString)) + return COMPLETED; + throw new FHIRException("Unknown TaskStatus code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case DRAFT: return "draft"; + case REQUESTED: return "requested"; + case RECEIVED: return "received"; + case ACCEPTED: return "accepted"; + case REJECTED: return "rejected"; + case READY: return "ready"; + case INPROGRESS: return "in-progress"; + case ONHOLD: return "on-hold"; + case FAILED: return "failed"; + case COMPLETED: return "completed"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case DRAFT: return "http://hl7.org/fhir/task-status"; + case REQUESTED: return "http://hl7.org/fhir/task-status"; + case RECEIVED: return "http://hl7.org/fhir/task-status"; + case ACCEPTED: return "http://hl7.org/fhir/task-status"; + case REJECTED: return "http://hl7.org/fhir/task-status"; + case READY: return "http://hl7.org/fhir/task-status"; + case INPROGRESS: return "http://hl7.org/fhir/task-status"; + case ONHOLD: return "http://hl7.org/fhir/task-status"; + case FAILED: return "http://hl7.org/fhir/task-status"; + case COMPLETED: return "http://hl7.org/fhir/task-status"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case DRAFT: return "The task is not yet ready to be acted upon."; + case REQUESTED: return "The task is ready to be acted upon"; + case RECEIVED: return "A potential performer has claimed ownership of the task and is evaluating whether to perform it"; + case ACCEPTED: return "The potential performer has agreed to execute the task but has not yet started work"; + case REJECTED: return "The potential performer who claimed ownership of the task has decided not to execute it prior to performing any action."; + case READY: return "Task is ready to be performed, but no action has yet been taken. Used in place of requested/received/accepted/rejected when request assignment and acceptance is a given."; + case INPROGRESS: return "Task has been started but is not yet complete."; + case ONHOLD: return "Task has been started but work has been paused"; + case FAILED: return "The task was attempted but could not be completed due to some error."; + case COMPLETED: return "The task has been completed (more or less) as requested."; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case DRAFT: return "Draft"; + case REQUESTED: return "Requested"; + case RECEIVED: return "Received"; + case ACCEPTED: return "Accepted"; + case REJECTED: return "Rejected"; + case READY: return "Ready"; + case INPROGRESS: return "In Progress"; + case ONHOLD: return "On Hold"; + case FAILED: return "Failed"; + case COMPLETED: return "Completed"; + default: return "?"; + } + } + } + + public static class TaskStatusEnumFactory implements EnumFactory { + public TaskStatus fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return TaskStatus.DRAFT; + if ("requested".equals(codeString)) + return TaskStatus.REQUESTED; + if ("received".equals(codeString)) + return TaskStatus.RECEIVED; + if ("accepted".equals(codeString)) + return TaskStatus.ACCEPTED; + if ("rejected".equals(codeString)) + return TaskStatus.REJECTED; + if ("ready".equals(codeString)) + return TaskStatus.READY; + if ("in-progress".equals(codeString)) + return TaskStatus.INPROGRESS; + if ("on-hold".equals(codeString)) + return TaskStatus.ONHOLD; + if ("failed".equals(codeString)) + return TaskStatus.FAILED; + if ("completed".equals(codeString)) + return TaskStatus.COMPLETED; + throw new IllegalArgumentException("Unknown TaskStatus code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("draft".equals(codeString)) + return new Enumeration(this, TaskStatus.DRAFT); + if ("requested".equals(codeString)) + return new Enumeration(this, TaskStatus.REQUESTED); + if ("received".equals(codeString)) + return new Enumeration(this, TaskStatus.RECEIVED); + if ("accepted".equals(codeString)) + return new Enumeration(this, TaskStatus.ACCEPTED); + if ("rejected".equals(codeString)) + return new Enumeration(this, TaskStatus.REJECTED); + if ("ready".equals(codeString)) + return new Enumeration(this, TaskStatus.READY); + if ("in-progress".equals(codeString)) + return new Enumeration(this, TaskStatus.INPROGRESS); + if ("on-hold".equals(codeString)) + return new Enumeration(this, TaskStatus.ONHOLD); + if ("failed".equals(codeString)) + return new Enumeration(this, TaskStatus.FAILED); + if ("completed".equals(codeString)) + return new Enumeration(this, TaskStatus.COMPLETED); + throw new FHIRException("Unknown TaskStatus code '"+codeString+"'"); + } + public String toCode(TaskStatus code) { + if (code == TaskStatus.DRAFT) + return "draft"; + if (code == TaskStatus.REQUESTED) + return "requested"; + if (code == TaskStatus.RECEIVED) + return "received"; + if (code == TaskStatus.ACCEPTED) + return "accepted"; + if (code == TaskStatus.REJECTED) + return "rejected"; + if (code == TaskStatus.READY) + return "ready"; + if (code == TaskStatus.INPROGRESS) + return "in-progress"; + if (code == TaskStatus.ONHOLD) + return "on-hold"; + if (code == TaskStatus.FAILED) + return "failed"; + if (code == TaskStatus.COMPLETED) + return "completed"; + return "?"; + } + public String toSystem(TaskStatus code) { + return code.getSystem(); + } + } + + @Block() + public static class ParameterComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of the input parameter. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Input Name", formalDefinition="The name of the input parameter." ) + protected StringType name; + + /** + * The value of the input parameter as a basic type. + */ + @Child(name = "value", type = {}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Input Value", formalDefinition="The value of the input parameter as a basic type." ) + protected org.hl7.fhir.dstu3.model.Type value; + + private static final long serialVersionUID = 342865819L; + + /** + * Constructor + */ + public ParameterComponent() { + super(); + } + + /** + * Constructor + */ + public ParameterComponent(StringType name, org.hl7.fhir.dstu3.model.Type value) { + super(); + this.name = name; + this.value = value; + } + + /** + * @return {@link #name} (The name of the input parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ParameterComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of the input parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public ParameterComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of the input parameter. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of the input parameter. + */ + public ParameterComponent setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #value} (The value of the input parameter as a basic type.) + */ + public org.hl7.fhir.dstu3.model.Type getValue() { + return this.value; + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The value of the input parameter as a basic type.) + */ + public ParameterComponent setValue(org.hl7.fhir.dstu3.model.Type value) { + this.value = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of the input parameter.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("value[x]", "*", "The value of the input parameter as a basic type.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("value[x]")) + this.value = (org.hl7.fhir.dstu3.model.Type) value; // org.hl7.fhir.dstu3.model.Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Task.name"); + } + else if (name.equals("valueBoolean")) { + this.value = new BooleanType(); + return this.value; + } + else if (name.equals("valueInteger")) { + this.value = new IntegerType(); + return this.value; + } + else if (name.equals("valueDecimal")) { + this.value = new DecimalType(); + return this.value; + } + else if (name.equals("valueBase64Binary")) { + this.value = new Base64BinaryType(); + return this.value; + } + else if (name.equals("valueInstant")) { + this.value = new InstantType(); + return this.value; + } + else if (name.equals("valueString")) { + this.value = new StringType(); + return this.value; + } + else if (name.equals("valueUri")) { + this.value = new UriType(); + return this.value; + } + else if (name.equals("valueDate")) { + this.value = new DateType(); + return this.value; + } + else if (name.equals("valueDateTime")) { + this.value = new DateTimeType(); + return this.value; + } + else if (name.equals("valueTime")) { + this.value = new TimeType(); + return this.value; + } + else if (name.equals("valueCode")) { + this.value = new CodeType(); + return this.value; + } + else if (name.equals("valueOid")) { + this.value = new OidType(); + return this.value; + } + else if (name.equals("valueId")) { + this.value = new IdType(); + return this.value; + } + else if (name.equals("valueUnsignedInt")) { + this.value = new UnsignedIntType(); + return this.value; + } + else if (name.equals("valuePositiveInt")) { + this.value = new PositiveIntType(); + return this.value; + } + else if (name.equals("valueMarkdown")) { + this.value = new MarkdownType(); + return this.value; + } + else if (name.equals("valueAnnotation")) { + this.value = new Annotation(); + return this.value; + } + else if (name.equals("valueAttachment")) { + this.value = new Attachment(); + return this.value; + } + else if (name.equals("valueIdentifier")) { + this.value = new Identifier(); + return this.value; + } + else if (name.equals("valueCodeableConcept")) { + this.value = new CodeableConcept(); + return this.value; + } + else if (name.equals("valueCoding")) { + this.value = new Coding(); + return this.value; + } + else if (name.equals("valueQuantity")) { + this.value = new Quantity(); + return this.value; + } + else if (name.equals("valueRange")) { + this.value = new Range(); + return this.value; + } + else if (name.equals("valuePeriod")) { + this.value = new Period(); + return this.value; + } + else if (name.equals("valueRatio")) { + this.value = new Ratio(); + return this.value; + } + else if (name.equals("valueSampledData")) { + this.value = new SampledData(); + return this.value; + } + else if (name.equals("valueSignature")) { + this.value = new Signature(); + return this.value; + } + else if (name.equals("valueHumanName")) { + this.value = new HumanName(); + return this.value; + } + else if (name.equals("valueAddress")) { + this.value = new Address(); + return this.value; + } + else if (name.equals("valueContactPoint")) { + this.value = new ContactPoint(); + return this.value; + } + else if (name.equals("valueTiming")) { + this.value = new Timing(); + return this.value; + } + else if (name.equals("valueReference")) { + this.value = new Reference(); + return this.value; + } + else if (name.equals("valueMeta")) { + this.value = new Meta(); + return this.value; + } + else + return super.addChild(name); + } + + public ParameterComponent copy() { + ParameterComponent dst = new ParameterComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ParameterComponent)) + return false; + ParameterComponent o = (ParameterComponent) other; + return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ParameterComponent)) + return false; + ParameterComponent o = (ParameterComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, value); + } + + public String fhirType() { + return "Task.input"; + + } + + } + + @Block() + public static class TaskOutputComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The name of the Output parameter. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Output Name", formalDefinition="The name of the Output parameter." ) + protected StringType name; + + /** + * The value of the Output parameter as a basic type. + */ + @Child(name = "value", type = {}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Output Value", formalDefinition="The value of the Output parameter as a basic type." ) + protected org.hl7.fhir.dstu3.model.Type value; + + private static final long serialVersionUID = 342865819L; + + /** + * Constructor + */ + public TaskOutputComponent() { + super(); + } + + /** + * Constructor + */ + public TaskOutputComponent(StringType name, org.hl7.fhir.dstu3.model.Type value) { + super(); + this.name = name; + this.value = value; + } + + /** + * @return {@link #name} (The name of the Output parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TaskOutputComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (The name of the Output parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public TaskOutputComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return The name of the Output parameter. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value The name of the Output parameter. + */ + public TaskOutputComponent setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #value} (The value of the Output parameter as a basic type.) + */ + public org.hl7.fhir.dstu3.model.Type getValue() { + return this.value; + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The value of the Output parameter as a basic type.) + */ + public TaskOutputComponent setValue(org.hl7.fhir.dstu3.model.Type value) { + this.value = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "The name of the Output parameter.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("value[x]", "*", "The value of the Output parameter as a basic type.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("value[x]")) + this.value = (org.hl7.fhir.dstu3.model.Type) value; // org.hl7.fhir.dstu3.model.Type + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type Task.name"); + } + else if (name.equals("valueBoolean")) { + this.value = new BooleanType(); + return this.value; + } + else if (name.equals("valueInteger")) { + this.value = new IntegerType(); + return this.value; + } + else if (name.equals("valueDecimal")) { + this.value = new DecimalType(); + return this.value; + } + else if (name.equals("valueBase64Binary")) { + this.value = new Base64BinaryType(); + return this.value; + } + else if (name.equals("valueInstant")) { + this.value = new InstantType(); + return this.value; + } + else if (name.equals("valueString")) { + this.value = new StringType(); + return this.value; + } + else if (name.equals("valueUri")) { + this.value = new UriType(); + return this.value; + } + else if (name.equals("valueDate")) { + this.value = new DateType(); + return this.value; + } + else if (name.equals("valueDateTime")) { + this.value = new DateTimeType(); + return this.value; + } + else if (name.equals("valueTime")) { + this.value = new TimeType(); + return this.value; + } + else if (name.equals("valueCode")) { + this.value = new CodeType(); + return this.value; + } + else if (name.equals("valueOid")) { + this.value = new OidType(); + return this.value; + } + else if (name.equals("valueId")) { + this.value = new IdType(); + return this.value; + } + else if (name.equals("valueUnsignedInt")) { + this.value = new UnsignedIntType(); + return this.value; + } + else if (name.equals("valuePositiveInt")) { + this.value = new PositiveIntType(); + return this.value; + } + else if (name.equals("valueMarkdown")) { + this.value = new MarkdownType(); + return this.value; + } + else if (name.equals("valueAnnotation")) { + this.value = new Annotation(); + return this.value; + } + else if (name.equals("valueAttachment")) { + this.value = new Attachment(); + return this.value; + } + else if (name.equals("valueIdentifier")) { + this.value = new Identifier(); + return this.value; + } + else if (name.equals("valueCodeableConcept")) { + this.value = new CodeableConcept(); + return this.value; + } + else if (name.equals("valueCoding")) { + this.value = new Coding(); + return this.value; + } + else if (name.equals("valueQuantity")) { + this.value = new Quantity(); + return this.value; + } + else if (name.equals("valueRange")) { + this.value = new Range(); + return this.value; + } + else if (name.equals("valuePeriod")) { + this.value = new Period(); + return this.value; + } + else if (name.equals("valueRatio")) { + this.value = new Ratio(); + return this.value; + } + else if (name.equals("valueSampledData")) { + this.value = new SampledData(); + return this.value; + } + else if (name.equals("valueSignature")) { + this.value = new Signature(); + return this.value; + } + else if (name.equals("valueHumanName")) { + this.value = new HumanName(); + return this.value; + } + else if (name.equals("valueAddress")) { + this.value = new Address(); + return this.value; + } + else if (name.equals("valueContactPoint")) { + this.value = new ContactPoint(); + return this.value; + } + else if (name.equals("valueTiming")) { + this.value = new Timing(); + return this.value; + } + else if (name.equals("valueReference")) { + this.value = new Reference(); + return this.value; + } + else if (name.equals("valueMeta")) { + this.value = new Meta(); + return this.value; + } + else + return super.addChild(name); + } + + public TaskOutputComponent copy() { + TaskOutputComponent dst = new TaskOutputComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TaskOutputComponent)) + return false; + TaskOutputComponent o = (TaskOutputComponent) other; + return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TaskOutputComponent)) + return false; + TaskOutputComponent o = (TaskOutputComponent) other; + return compareValues(name, o.name, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, value); + } + + public String fhirType() { + return "Task.output"; + + } + + } + + /** + * The business identifier for this task. + */ + @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Task Instance Identifier", formalDefinition="The business identifier for this task." ) + protected Identifier identifier; + + /** + * A name or code (or both) briefly describing what the task involves. + */ + @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Task Type", formalDefinition="A name or code (or both) briefly describing what the task involves." ) + protected CodeableConcept type; + + /** + * A description of this task. + */ + @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Task Description", formalDefinition="A description of this task." ) + protected StringType description; + + /** + * The type of participant that can execute the task. + */ + @Child(name = "performerType", type = {Coding.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="requester | dispatcher | scheduler | performer | monitor | manager | acquirer | reviewer", formalDefinition="The type of participant that can execute the task." ) + protected List performerType; + + /** + * The priority of the task among other tasks of the same type. + */ + @Child(name = "priority", type = {CodeType.class}, order=4, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="low | normal | high", formalDefinition="The priority of the task among other tasks of the same type." ) + protected Enumeration priority; + + /** + * The current status of the task. + */ + @Child(name = "status", type = {CodeType.class}, order=5, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="draft | requested | received | accepted | +", formalDefinition="The current status of the task." ) + protected Enumeration status; + + /** + * An explaination as to why this task failed. + */ + @Child(name = "failureReason", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Task Failure Reason", formalDefinition="An explaination as to why this task failed." ) + protected CodeableConcept failureReason; + + /** + * The subject of the task. + */ + @Child(name = "subject", type = {}, order=7, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Task Subject", formalDefinition="The subject of the task." ) + protected Reference subject; + + /** + * The actual object that is the target of the reference (The subject of the task.) + */ + protected Resource subjectTarget; + + /** + * The entity who benefits from the performance of the service specified in the task (e.g., the patient). + */ + @Child(name = "for", type = {}, order=8, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Beneficiary of the Task", formalDefinition="The entity who benefits from the performance of the service specified in the task (e.g., the patient)." ) + protected Reference for_; + + /** + * The actual object that is the target of the reference (The entity who benefits from the performance of the service specified in the task (e.g., the patient).) + */ + protected Resource for_Target; + + /** + * A reference to a formal or informal definition of the task. + */ + @Child(name = "definition", type = {UriType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Task Definition", formalDefinition="A reference to a formal or informal definition of the task." ) + protected UriType definition; + + /** + * The date and time this task was created. + */ + @Child(name = "created", type = {DateTimeType.class}, order=10, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Task Creation Date", formalDefinition="The date and time this task was created." ) + protected DateTimeType created; + + /** + * The date and time of last modification to this task. + */ + @Child(name = "lastModified", type = {DateTimeType.class}, order=11, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="Task Last Modified Date", formalDefinition="The date and time of last modification to this task." ) + protected DateTimeType lastModified; + + /** + * The creator of the task. + */ + @Child(name = "creator", type = {Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=12, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Task Creator", formalDefinition="The creator of the task." ) + protected Reference creator; + + /** + * The actual object that is the target of the reference (The creator of the task.) + */ + protected Resource creatorTarget; + + /** + * The owner of this task. The participant who can execute this task. + */ + @Child(name = "owner", type = {Device.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=13, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Task Owner", formalDefinition="The owner of this task. The participant who can execute this task." ) + protected Reference owner; + + /** + * The actual object that is the target of the reference (The owner of this task. The participant who can execute this task.) + */ + protected Resource ownerTarget; + + /** + * Task that this particular task is part of. + */ + @Child(name = "parent", type = {Task.class}, order=14, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Composite task", formalDefinition="Task that this particular task is part of." ) + protected Reference parent; + + /** + * The actual object that is the target of the reference (Task that this particular task is part of.) + */ + protected Task parentTarget; + + /** + * Inputs to the task. + */ + @Child(name = "input", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Task Input", formalDefinition="Inputs to the task." ) + protected List input; + + /** + * Outputs produced by the Task. + */ + @Child(name = "output", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Task Output", formalDefinition="Outputs produced by the Task." ) + protected List output; + + private static final long serialVersionUID = 969281174L; + + /** + * Constructor + */ + public Task() { + super(); + } + + /** + * Constructor + */ + public Task(Enumeration status, DateTimeType created, DateTimeType lastModified, Reference creator) { + super(); + this.status = status; + this.created = created; + this.lastModified = lastModified; + this.creator = creator; + } + + /** + * @return {@link #identifier} (The business identifier for this task.) + */ + public Identifier getIdentifier() { + if (this.identifier == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Task.identifier"); + else if (Configuration.doAutoCreate()) + this.identifier = new Identifier(); // cc + return this.identifier; + } + + public boolean hasIdentifier() { + return this.identifier != null && !this.identifier.isEmpty(); + } + + /** + * @param value {@link #identifier} (The business identifier for this task.) + */ + public Task setIdentifier(Identifier value) { + this.identifier = value; + return this; + } + + /** + * @return {@link #type} (A name or code (or both) briefly describing what the task involves.) + */ + public CodeableConcept getType() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Task.type"); + else if (Configuration.doAutoCreate()) + this.type = new CodeableConcept(); // cc + return this.type; + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (A name or code (or both) briefly describing what the task involves.) + */ + public Task setType(CodeableConcept value) { + this.type = value; + return this; + } + + /** + * @return {@link #description} (A description of this task.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public StringType getDescriptionElement() { + if (this.description == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Task.description"); + else if (Configuration.doAutoCreate()) + this.description = new StringType(); // bb + return this.description; + } + + public boolean hasDescriptionElement() { + return this.description != null && !this.description.isEmpty(); + } + + public boolean hasDescription() { + return this.description != null && !this.description.isEmpty(); + } + + /** + * @param value {@link #description} (A description of this task.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value + */ + public Task setDescriptionElement(StringType value) { + this.description = value; + return this; + } + + /** + * @return A description of this task. + */ + public String getDescription() { + return this.description == null ? null : this.description.getValue(); + } + + /** + * @param value A description of this task. + */ + public Task setDescription(String value) { + if (Utilities.noString(value)) + this.description = null; + else { + if (this.description == null) + this.description = new StringType(); + this.description.setValue(value); + } + return this; + } + + /** + * @return {@link #performerType} (The type of participant that can execute the task.) + */ + public List getPerformerType() { + if (this.performerType == null) + this.performerType = new ArrayList(); + return this.performerType; + } + + public boolean hasPerformerType() { + if (this.performerType == null) + return false; + for (Coding item : this.performerType) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #performerType} (The type of participant that can execute the task.) + */ + // syntactic sugar + public Coding addPerformerType() { //3 + Coding t = new Coding(); + if (this.performerType == null) + this.performerType = new ArrayList(); + this.performerType.add(t); + return t; + } + + // syntactic sugar + public Task addPerformerType(Coding t) { //3 + if (t == null) + return this; + if (this.performerType == null) + this.performerType = new ArrayList(); + this.performerType.add(t); + return this; + } + + /** + * @return {@link #priority} (The priority of the task among other tasks of the same type.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value + */ + public Enumeration getPriorityElement() { + if (this.priority == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Task.priority"); + else if (Configuration.doAutoCreate()) + this.priority = new Enumeration(new TaskPriorityEnumFactory()); // bb + return this.priority; + } + + public boolean hasPriorityElement() { + return this.priority != null && !this.priority.isEmpty(); + } + + public boolean hasPriority() { + return this.priority != null && !this.priority.isEmpty(); + } + + /** + * @param value {@link #priority} (The priority of the task among other tasks of the same type.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value + */ + public Task setPriorityElement(Enumeration value) { + this.priority = value; + return this; + } + + /** + * @return The priority of the task among other tasks of the same type. + */ + public TaskPriority getPriority() { + return this.priority == null ? null : this.priority.getValue(); + } + + /** + * @param value The priority of the task among other tasks of the same type. + */ + public Task setPriority(TaskPriority value) { + if (value == null) + this.priority = null; + else { + if (this.priority == null) + this.priority = new Enumeration(new TaskPriorityEnumFactory()); + this.priority.setValue(value); + } + return this; + } + + /** + * @return {@link #status} (The current status of the task.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Enumeration getStatusElement() { + if (this.status == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Task.status"); + else if (Configuration.doAutoCreate()) + this.status = new Enumeration(new TaskStatusEnumFactory()); // bb + return this.status; + } + + public boolean hasStatusElement() { + return this.status != null && !this.status.isEmpty(); + } + + public boolean hasStatus() { + return this.status != null && !this.status.isEmpty(); + } + + /** + * @param value {@link #status} (The current status of the task.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value + */ + public Task setStatusElement(Enumeration value) { + this.status = value; + return this; + } + + /** + * @return The current status of the task. + */ + public TaskStatus getStatus() { + return this.status == null ? null : this.status.getValue(); + } + + /** + * @param value The current status of the task. + */ + public Task setStatus(TaskStatus value) { + if (this.status == null) + this.status = new Enumeration(new TaskStatusEnumFactory()); + this.status.setValue(value); + return this; + } + + /** + * @return {@link #failureReason} (An explaination as to why this task failed.) + */ + public CodeableConcept getFailureReason() { + if (this.failureReason == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Task.failureReason"); + else if (Configuration.doAutoCreate()) + this.failureReason = new CodeableConcept(); // cc + return this.failureReason; + } + + public boolean hasFailureReason() { + return this.failureReason != null && !this.failureReason.isEmpty(); + } + + /** + * @param value {@link #failureReason} (An explaination as to why this task failed.) + */ + public Task setFailureReason(CodeableConcept value) { + this.failureReason = value; + return this; + } + + /** + * @return {@link #subject} (The subject of the task.) + */ + public Reference getSubject() { + if (this.subject == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Task.subject"); + else if (Configuration.doAutoCreate()) + this.subject = new Reference(); // cc + return this.subject; + } + + public boolean hasSubject() { + return this.subject != null && !this.subject.isEmpty(); + } + + /** + * @param value {@link #subject} (The subject of the task.) + */ + public Task setSubject(Reference value) { + this.subject = value; + return this; + } + + /** + * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The subject of the task.) + */ + public Resource getSubjectTarget() { + return this.subjectTarget; + } + + /** + * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The subject of the task.) + */ + public Task setSubjectTarget(Resource value) { + this.subjectTarget = value; + return this; + } + + /** + * @return {@link #for_} (The entity who benefits from the performance of the service specified in the task (e.g., the patient).) + */ + public Reference getFor() { + if (this.for_ == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Task.for_"); + else if (Configuration.doAutoCreate()) + this.for_ = new Reference(); // cc + return this.for_; + } + + public boolean hasFor() { + return this.for_ != null && !this.for_.isEmpty(); + } + + /** + * @param value {@link #for_} (The entity who benefits from the performance of the service specified in the task (e.g., the patient).) + */ + public Task setFor(Reference value) { + this.for_ = value; + return this; + } + + /** + * @return {@link #for_} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The entity who benefits from the performance of the service specified in the task (e.g., the patient).) + */ + public Resource getForTarget() { + return this.for_Target; + } + + /** + * @param value {@link #for_} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The entity who benefits from the performance of the service specified in the task (e.g., the patient).) + */ + public Task setForTarget(Resource value) { + this.for_Target = value; + return this; + } + + /** + * @return {@link #definition} (A reference to a formal or informal definition of the task.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value + */ + public UriType getDefinitionElement() { + if (this.definition == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Task.definition"); + else if (Configuration.doAutoCreate()) + this.definition = new UriType(); // bb + return this.definition; + } + + public boolean hasDefinitionElement() { + return this.definition != null && !this.definition.isEmpty(); + } + + public boolean hasDefinition() { + return this.definition != null && !this.definition.isEmpty(); + } + + /** + * @param value {@link #definition} (A reference to a formal or informal definition of the task.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value + */ + public Task setDefinitionElement(UriType value) { + this.definition = value; + return this; + } + + /** + * @return A reference to a formal or informal definition of the task. + */ + public String getDefinition() { + return this.definition == null ? null : this.definition.getValue(); + } + + /** + * @param value A reference to a formal or informal definition of the task. + */ + public Task setDefinition(String value) { + if (Utilities.noString(value)) + this.definition = null; + else { + if (this.definition == null) + this.definition = new UriType(); + this.definition.setValue(value); + } + return this; + } + + /** + * @return {@link #created} (The date and time this task was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public DateTimeType getCreatedElement() { + if (this.created == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Task.created"); + else if (Configuration.doAutoCreate()) + this.created = new DateTimeType(); // bb + return this.created; + } + + public boolean hasCreatedElement() { + return this.created != null && !this.created.isEmpty(); + } + + public boolean hasCreated() { + return this.created != null && !this.created.isEmpty(); + } + + /** + * @param value {@link #created} (The date and time this task was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value + */ + public Task setCreatedElement(DateTimeType value) { + this.created = value; + return this; + } + + /** + * @return The date and time this task was created. + */ + public Date getCreated() { + return this.created == null ? null : this.created.getValue(); + } + + /** + * @param value The date and time this task was created. + */ + public Task setCreated(Date value) { + if (this.created == null) + this.created = new DateTimeType(); + this.created.setValue(value); + return this; + } + + /** + * @return {@link #lastModified} (The date and time of last modification to this task.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value + */ + public DateTimeType getLastModifiedElement() { + if (this.lastModified == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Task.lastModified"); + else if (Configuration.doAutoCreate()) + this.lastModified = new DateTimeType(); // bb + return this.lastModified; + } + + public boolean hasLastModifiedElement() { + return this.lastModified != null && !this.lastModified.isEmpty(); + } + + public boolean hasLastModified() { + return this.lastModified != null && !this.lastModified.isEmpty(); + } + + /** + * @param value {@link #lastModified} (The date and time of last modification to this task.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value + */ + public Task setLastModifiedElement(DateTimeType value) { + this.lastModified = value; + return this; + } + + /** + * @return The date and time of last modification to this task. + */ + public Date getLastModified() { + return this.lastModified == null ? null : this.lastModified.getValue(); + } + + /** + * @param value The date and time of last modification to this task. + */ + public Task setLastModified(Date value) { + if (this.lastModified == null) + this.lastModified = new DateTimeType(); + this.lastModified.setValue(value); + return this; + } + + /** + * @return {@link #creator} (The creator of the task.) + */ + public Reference getCreator() { + if (this.creator == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Task.creator"); + else if (Configuration.doAutoCreate()) + this.creator = new Reference(); // cc + return this.creator; + } + + public boolean hasCreator() { + return this.creator != null && !this.creator.isEmpty(); + } + + /** + * @param value {@link #creator} (The creator of the task.) + */ + public Task setCreator(Reference value) { + this.creator = value; + return this; + } + + /** + * @return {@link #creator} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The creator of the task.) + */ + public Resource getCreatorTarget() { + return this.creatorTarget; + } + + /** + * @param value {@link #creator} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The creator of the task.) + */ + public Task setCreatorTarget(Resource value) { + this.creatorTarget = value; + return this; + } + + /** + * @return {@link #owner} (The owner of this task. The participant who can execute this task.) + */ + public Reference getOwner() { + if (this.owner == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Task.owner"); + else if (Configuration.doAutoCreate()) + this.owner = new Reference(); // cc + return this.owner; + } + + public boolean hasOwner() { + return this.owner != null && !this.owner.isEmpty(); + } + + /** + * @param value {@link #owner} (The owner of this task. The participant who can execute this task.) + */ + public Task setOwner(Reference value) { + this.owner = value; + return this; + } + + /** + * @return {@link #owner} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The owner of this task. The participant who can execute this task.) + */ + public Resource getOwnerTarget() { + return this.ownerTarget; + } + + /** + * @param value {@link #owner} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The owner of this task. The participant who can execute this task.) + */ + public Task setOwnerTarget(Resource value) { + this.ownerTarget = value; + return this; + } + + /** + * @return {@link #parent} (Task that this particular task is part of.) + */ + public Reference getParent() { + if (this.parent == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Task.parent"); + else if (Configuration.doAutoCreate()) + this.parent = new Reference(); // cc + return this.parent; + } + + public boolean hasParent() { + return this.parent != null && !this.parent.isEmpty(); + } + + /** + * @param value {@link #parent} (Task that this particular task is part of.) + */ + public Task setParent(Reference value) { + this.parent = value; + return this; + } + + /** + * @return {@link #parent} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Task that this particular task is part of.) + */ + public Task getParentTarget() { + if (this.parentTarget == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create Task.parent"); + else if (Configuration.doAutoCreate()) + this.parentTarget = new Task(); // aa + return this.parentTarget; + } + + /** + * @param value {@link #parent} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Task that this particular task is part of.) + */ + public Task setParentTarget(Task value) { + this.parentTarget = value; + return this; + } + + /** + * @return {@link #input} (Inputs to the task.) + */ + public List getInput() { + if (this.input == null) + this.input = new ArrayList(); + return this.input; + } + + public boolean hasInput() { + if (this.input == null) + return false; + for (ParameterComponent item : this.input) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #input} (Inputs to the task.) + */ + // syntactic sugar + public ParameterComponent addInput() { //3 + ParameterComponent t = new ParameterComponent(); + if (this.input == null) + this.input = new ArrayList(); + this.input.add(t); + return t; + } + + // syntactic sugar + public Task addInput(ParameterComponent t) { //3 + if (t == null) + return this; + if (this.input == null) + this.input = new ArrayList(); + this.input.add(t); + return this; + } + + /** + * @return {@link #output} (Outputs produced by the Task.) + */ + public List getOutput() { + if (this.output == null) + this.output = new ArrayList(); + return this.output; + } + + public boolean hasOutput() { + if (this.output == null) + return false; + for (TaskOutputComponent item : this.output) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #output} (Outputs produced by the Task.) + */ + // syntactic sugar + public TaskOutputComponent addOutput() { //3 + TaskOutputComponent t = new TaskOutputComponent(); + if (this.output == null) + this.output = new ArrayList(); + this.output.add(t); + return t; + } + + // syntactic sugar + public Task addOutput(TaskOutputComponent t) { //3 + if (t == null) + return this; + if (this.output == null) + this.output = new ArrayList(); + this.output.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("identifier", "Identifier", "The business identifier for this task.", 0, java.lang.Integer.MAX_VALUE, identifier)); + childrenList.add(new Property("type", "CodeableConcept", "A name or code (or both) briefly describing what the task involves.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("description", "string", "A description of this task.", 0, java.lang.Integer.MAX_VALUE, description)); + childrenList.add(new Property("performerType", "Coding", "The type of participant that can execute the task.", 0, java.lang.Integer.MAX_VALUE, performerType)); + childrenList.add(new Property("priority", "code", "The priority of the task among other tasks of the same type.", 0, java.lang.Integer.MAX_VALUE, priority)); + childrenList.add(new Property("status", "code", "The current status of the task.", 0, java.lang.Integer.MAX_VALUE, status)); + childrenList.add(new Property("failureReason", "CodeableConcept", "An explaination as to why this task failed.", 0, java.lang.Integer.MAX_VALUE, failureReason)); + childrenList.add(new Property("subject", "Reference(Any)", "The subject of the task.", 0, java.lang.Integer.MAX_VALUE, subject)); + childrenList.add(new Property("for", "Reference(Any)", "The entity who benefits from the performance of the service specified in the task (e.g., the patient).", 0, java.lang.Integer.MAX_VALUE, for_)); + childrenList.add(new Property("definition", "uri", "A reference to a formal or informal definition of the task.", 0, java.lang.Integer.MAX_VALUE, definition)); + childrenList.add(new Property("created", "dateTime", "The date and time this task was created.", 0, java.lang.Integer.MAX_VALUE, created)); + childrenList.add(new Property("lastModified", "dateTime", "The date and time of last modification to this task.", 0, java.lang.Integer.MAX_VALUE, lastModified)); + childrenList.add(new Property("creator", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "The creator of the task.", 0, java.lang.Integer.MAX_VALUE, creator)); + childrenList.add(new Property("owner", "Reference(Device|Organization|Patient|Practitioner|RelatedPerson)", "The owner of this task. The participant who can execute this task.", 0, java.lang.Integer.MAX_VALUE, owner)); + childrenList.add(new Property("parent", "Reference(Task)", "Task that this particular task is part of.", 0, java.lang.Integer.MAX_VALUE, parent)); + childrenList.add(new Property("input", "", "Inputs to the task.", 0, java.lang.Integer.MAX_VALUE, input)); + childrenList.add(new Property("output", "", "Outputs produced by the Task.", 0, java.lang.Integer.MAX_VALUE, output)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("identifier")) + this.identifier = castToIdentifier(value); // Identifier + else if (name.equals("type")) + this.type = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("description")) + this.description = castToString(value); // StringType + else if (name.equals("performerType")) + this.getPerformerType().add(castToCoding(value)); + else if (name.equals("priority")) + this.priority = new TaskPriorityEnumFactory().fromType(value); // Enumeration + else if (name.equals("status")) + this.status = new TaskStatusEnumFactory().fromType(value); // Enumeration + else if (name.equals("failureReason")) + this.failureReason = castToCodeableConcept(value); // CodeableConcept + else if (name.equals("subject")) + this.subject = castToReference(value); // Reference + else if (name.equals("for")) + this.for_ = castToReference(value); // Reference + else if (name.equals("definition")) + this.definition = castToUri(value); // UriType + else if (name.equals("created")) + this.created = castToDateTime(value); // DateTimeType + else if (name.equals("lastModified")) + this.lastModified = castToDateTime(value); // DateTimeType + else if (name.equals("creator")) + this.creator = castToReference(value); // Reference + else if (name.equals("owner")) + this.owner = castToReference(value); // Reference + else if (name.equals("parent")) + this.parent = castToReference(value); // Reference + else if (name.equals("input")) + this.getInput().add((ParameterComponent) value); + else if (name.equals("output")) + this.getOutput().add((TaskOutputComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("identifier")) { + this.identifier = new Identifier(); + return this.identifier; + } + else if (name.equals("type")) { + this.type = new CodeableConcept(); + return this.type; + } + else if (name.equals("description")) { + throw new FHIRException("Cannot call addChild on a primitive type Task.description"); + } + else if (name.equals("performerType")) { + return addPerformerType(); + } + else if (name.equals("priority")) { + throw new FHIRException("Cannot call addChild on a primitive type Task.priority"); + } + else if (name.equals("status")) { + throw new FHIRException("Cannot call addChild on a primitive type Task.status"); + } + else if (name.equals("failureReason")) { + this.failureReason = new CodeableConcept(); + return this.failureReason; + } + else if (name.equals("subject")) { + this.subject = new Reference(); + return this.subject; + } + else if (name.equals("for")) { + this.for_ = new Reference(); + return this.for_; + } + else if (name.equals("definition")) { + throw new FHIRException("Cannot call addChild on a primitive type Task.definition"); + } + else if (name.equals("created")) { + throw new FHIRException("Cannot call addChild on a primitive type Task.created"); + } + else if (name.equals("lastModified")) { + throw new FHIRException("Cannot call addChild on a primitive type Task.lastModified"); + } + else if (name.equals("creator")) { + this.creator = new Reference(); + return this.creator; + } + else if (name.equals("owner")) { + this.owner = new Reference(); + return this.owner; + } + else if (name.equals("parent")) { + this.parent = new Reference(); + return this.parent; + } + else if (name.equals("input")) { + return addInput(); + } + else if (name.equals("output")) { + return addOutput(); + } + else + return super.addChild(name); + } + + public String fhirType() { + return "Task"; + + } + + public Task copy() { + Task dst = new Task(); + copyValues(dst); + dst.identifier = identifier == null ? null : identifier.copy(); + dst.type = type == null ? null : type.copy(); + dst.description = description == null ? null : description.copy(); + if (performerType != null) { + dst.performerType = new ArrayList(); + for (Coding i : performerType) + dst.performerType.add(i.copy()); + }; + dst.priority = priority == null ? null : priority.copy(); + dst.status = status == null ? null : status.copy(); + dst.failureReason = failureReason == null ? null : failureReason.copy(); + dst.subject = subject == null ? null : subject.copy(); + dst.for_ = for_ == null ? null : for_.copy(); + dst.definition = definition == null ? null : definition.copy(); + dst.created = created == null ? null : created.copy(); + dst.lastModified = lastModified == null ? null : lastModified.copy(); + dst.creator = creator == null ? null : creator.copy(); + dst.owner = owner == null ? null : owner.copy(); + dst.parent = parent == null ? null : parent.copy(); + if (input != null) { + dst.input = new ArrayList(); + for (ParameterComponent i : input) + dst.input.add(i.copy()); + }; + if (output != null) { + dst.output = new ArrayList(); + for (TaskOutputComponent i : output) + dst.output.add(i.copy()); + }; + return dst; + } + + protected Task typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof Task)) + return false; + Task o = (Task) other; + return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(description, o.description, true) + && compareDeep(performerType, o.performerType, true) && compareDeep(priority, o.priority, true) + && compareDeep(status, o.status, true) && compareDeep(failureReason, o.failureReason, true) && compareDeep(subject, o.subject, true) + && compareDeep(for_, o.for_, true) && compareDeep(definition, o.definition, true) && compareDeep(created, o.created, true) + && compareDeep(lastModified, o.lastModified, true) && compareDeep(creator, o.creator, true) && compareDeep(owner, o.owner, true) + && compareDeep(parent, o.parent, true) && compareDeep(input, o.input, true) && compareDeep(output, o.output, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof Task)) + return false; + Task o = (Task) other; + return compareValues(description, o.description, true) && compareValues(priority, o.priority, true) + && compareValues(status, o.status, true) && compareValues(definition, o.definition, true) && compareValues(created, o.created, true) + && compareValues(lastModified, o.lastModified, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, type, description + , performerType, priority, status, failureReason, subject, for_, definition, created + , lastModified, creator, owner, parent, input, output); + } + + @Override + public ResourceType getResourceType() { + return ResourceType.Task; + } + + /** + * Search parameter: owner + *

+ * Description: Search by task owner
+ * Type: reference
+ * Path: Task.owner
+ *

+ */ + @SearchParamDefinition(name="owner", path="Task.owner", description="Search by task owner", type="reference" ) + public static final String SP_OWNER = "owner"; + /** + * Fluent Client search parameter constant for owner + *

+ * Description: Search by task owner
+ * Type: reference
+ * Path: Task.owner
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam OWNER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_OWNER); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Task:owner". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_OWNER = new ca.uhn.fhir.model.api.Include("Task:owner").toLocked(); + + /** + * Search parameter: identifier + *

+ * Description: Search for a task instance by its business identifier
+ * Type: token
+ * Path: Task.identifier
+ *

+ */ + @SearchParamDefinition(name="identifier", path="Task.identifier", description="Search for a task instance by its business identifier", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; + /** + * Fluent Client search parameter constant for identifier + *

+ * Description: Search for a task instance by its business identifier
+ * Type: token
+ * Path: Task.identifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); + + /** + * Search parameter: parent + *

+ * Description: Search by parent task
+ * Type: reference
+ * Path: Task.parent
+ *

+ */ + @SearchParamDefinition(name="parent", path="Task.parent", description="Search by parent task", type="reference" ) + public static final String SP_PARENT = "parent"; + /** + * Fluent Client search parameter constant for parent + *

+ * Description: Search by parent task
+ * Type: reference
+ * Path: Task.parent
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARENT); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Task:parent". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_PARENT = new ca.uhn.fhir.model.api.Include("Task:parent").toLocked(); + + /** + * Search parameter: creator + *

+ * Description: Search by task creator
+ * Type: reference
+ * Path: Task.creator
+ *

+ */ + @SearchParamDefinition(name="creator", path="Task.creator", description="Search by task creator", type="reference" ) + public static final String SP_CREATOR = "creator"; + /** + * Fluent Client search parameter constant for creator + *

+ * Description: Search by task creator
+ * Type: reference
+ * Path: Task.creator
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CREATOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CREATOR); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Task:creator". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_CREATOR = new ca.uhn.fhir.model.api.Include("Task:creator").toLocked(); + + /** + * Search parameter: performer + *

+ * Description: Search by recommended type of performer (e.g., Requester, Performer, Scheduler).
+ * Type: token
+ * Path: Task.performerType
+ *

+ */ + @SearchParamDefinition(name="performer", path="Task.performerType", description="Search by recommended type of performer (e.g., Requester, Performer, Scheduler).", type="token" ) + public static final String SP_PERFORMER = "performer"; + /** + * Fluent Client search parameter constant for performer + *

+ * Description: Search by recommended type of performer (e.g., Requester, Performer, Scheduler).
+ * Type: token
+ * Path: Task.performerType
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PERFORMER); + + /** + * Search parameter: subject + *

+ * Description: Search by task subject
+ * Type: reference
+ * Path: Task.subject
+ *

+ */ + @SearchParamDefinition(name="subject", path="Task.subject", description="Search by task subject", type="reference" ) + public static final String SP_SUBJECT = "subject"; + /** + * Fluent Client search parameter constant for subject + *

+ * Description: Search by task subject
+ * Type: reference
+ * Path: Task.subject
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); + +/** + * Constant for fluent queries to be used to add include statements. Specifies + * the path value of "Task:subject". + */ + public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Task:subject").toLocked(); + + /** + * Search parameter: created + *

+ * Description: Search by creation date
+ * Type: date
+ * Path: Task.created
+ *

+ */ + @SearchParamDefinition(name="created", path="Task.created", description="Search by creation date", type="date" ) + public static final String SP_CREATED = "created"; + /** + * Fluent Client search parameter constant for created + *

+ * Description: Search by creation date
+ * Type: date
+ * Path: Task.created
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED); + + /** + * Search parameter: type + *

+ * Description: Search by task type
+ * Type: token
+ * Path: Task.type
+ *

+ */ + @SearchParamDefinition(name="type", path="Task.type", description="Search by task type", type="token" ) + public static final String SP_TYPE = "type"; + /** + * Fluent Client search parameter constant for type + *

+ * Description: Search by task type
+ * Type: token
+ * Path: Task.type
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); + + /** + * Search parameter: priority + *

+ * Description: Search by task priority
+ * Type: token
+ * Path: Task.priority
+ *

+ */ + @SearchParamDefinition(name="priority", path="Task.priority", description="Search by task priority", type="token" ) + public static final String SP_PRIORITY = "priority"; + /** + * Fluent Client search parameter constant for priority + *

+ * Description: Search by task priority
+ * Type: token
+ * Path: Task.priority
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam PRIORITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PRIORITY); + + /** + * Search parameter: failure + *

+ * Description: Search by failure reason
+ * Type: token
+ * Path: Task.failureReason
+ *

+ */ + @SearchParamDefinition(name="failure", path="Task.failureReason", description="Search by failure reason", type="token" ) + public static final String SP_FAILURE = "failure"; + /** + * Fluent Client search parameter constant for failure + *

+ * Description: Search by failure reason
+ * Type: token
+ * Path: Task.failureReason
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam FAILURE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FAILURE); + + /** + * Search parameter: modified + *

+ * Description: Search by last modification date
+ * Type: date
+ * Path: Task.lastModified
+ *

+ */ + @SearchParamDefinition(name="modified", path="Task.lastModified", description="Search by last modification date", type="date" ) + public static final String SP_MODIFIED = "modified"; + /** + * Fluent Client search parameter constant for modified + *

+ * Description: Search by last modification date
+ * Type: date
+ * Path: Task.lastModified
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.DateClientParam MODIFIED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_MODIFIED); + + /** + * Search parameter: definition + *

+ * Description: Search by task definition
+ * Type: uri
+ * Path: Task.definition
+ *

+ */ + @SearchParamDefinition(name="definition", path="Task.definition", description="Search by task definition", type="uri" ) + public static final String SP_DEFINITION = "definition"; + /** + * Fluent Client search parameter constant for definition + *

+ * Description: Search by task definition
+ * Type: uri
+ * Path: Task.definition
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.UriClientParam DEFINITION = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_DEFINITION); + + /** + * Search parameter: status + *

+ * Description: Search by task status
+ * Type: token
+ * Path: Task.status
+ *

+ */ + @SearchParamDefinition(name="status", path="Task.status", description="Search by task status", type="token" ) + public static final String SP_STATUS = "status"; + /** + * Fluent Client search parameter constant for status + *

+ * Description: Search by task status
+ * Type: token
+ * Path: Task.status
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); + + +} + diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/TestScript.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/TestScript.java index 305692b950b..171b3ba8955 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/TestScript.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/TestScript.java @@ -29,233 +29,25 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification. */ @ResourceDef(name="TestScript", profile="http://hl7.org/fhir/Profile/TestScript") public class TestScript extends DomainResource { - public enum ProfileOriginType { - /** - * General DSTU2 client initiating against a DSTU2 Server. - */ - FHIRDSTU2CLIENT, - /** - * DSTU2 client that serves as an SDC-FormFiller. - */ - FHIRDSTU2SDCFORMFILLER, - /** - * added to help the parsers - */ - NULL; - public static ProfileOriginType fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("FHIR-DSTU2-Client".equals(codeString)) - return FHIRDSTU2CLIENT; - if ("FHIR-DSTU2-SDC-FormFiller".equals(codeString)) - return FHIRDSTU2SDCFORMFILLER; - throw new FHIRException("Unknown ProfileOriginType code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case FHIRDSTU2CLIENT: return "FHIR-DSTU2-Client"; - case FHIRDSTU2SDCFORMFILLER: return "FHIR-DSTU2-SDC-FormFiller"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case FHIRDSTU2CLIENT: return "http://hl7.org/fhir/profile-origin-types"; - case FHIRDSTU2SDCFORMFILLER: return "http://hl7.org/fhir/profile-origin-types"; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case FHIRDSTU2CLIENT: return "General DSTU2 client initiating against a DSTU2 Server."; - case FHIRDSTU2SDCFORMFILLER: return "DSTU2 client that serves as an SDC-FormFiller."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case FHIRDSTU2CLIENT: return "FHIR-DSTU2-Client"; - case FHIRDSTU2SDCFORMFILLER: return "FHIR-DSTU2-SDC-FormFiller"; - default: return "?"; - } - } - } - - public static class ProfileOriginTypeEnumFactory implements EnumFactory { - public ProfileOriginType fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("FHIR-DSTU2-Client".equals(codeString)) - return ProfileOriginType.FHIRDSTU2CLIENT; - if ("FHIR-DSTU2-SDC-FormFiller".equals(codeString)) - return ProfileOriginType.FHIRDSTU2SDCFORMFILLER; - throw new IllegalArgumentException("Unknown ProfileOriginType code '"+codeString+"'"); - } - public Enumeration fromType(Base code) throws FHIRException { - if (code == null || code.isEmpty()) - return null; - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return null; - if ("FHIR-DSTU2-Client".equals(codeString)) - return new Enumeration(this, ProfileOriginType.FHIRDSTU2CLIENT); - if ("FHIR-DSTU2-SDC-FormFiller".equals(codeString)) - return new Enumeration(this, ProfileOriginType.FHIRDSTU2SDCFORMFILLER); - throw new FHIRException("Unknown ProfileOriginType code '"+codeString+"'"); - } - public String toCode(ProfileOriginType code) { - if (code == ProfileOriginType.FHIRDSTU2CLIENT) - return "FHIR-DSTU2-Client"; - if (code == ProfileOriginType.FHIRDSTU2SDCFORMFILLER) - return "FHIR-DSTU2-SDC-FormFiller"; - return "?"; - } - public String toSystem(ProfileOriginType code) { - return code.getSystem(); - } - } - - public enum ProfileDestinationType { - /** - * General DSTU2 server. - */ - FHIRDSTU2SERVER, - /** - * DSTU2 server that serves as an SDC-FormManager. - */ - FHIRDSTU2SDCFORMMANAGER, - /** - * DSTU2 server that serves as an SDC-FormReceiver. - */ - FHIRDSTU2SDCFORMRECEIVER, - /** - * DSTU2 server that serves as an SDC-FormProcessor. - */ - FHIRDSTU2SDCFORMPROCESSOR, - /** - * added to help the parsers - */ - NULL; - public static ProfileDestinationType fromCode(String codeString) throws FHIRException { - if (codeString == null || "".equals(codeString)) - return null; - if ("FHIR-DSTU2-Server".equals(codeString)) - return FHIRDSTU2SERVER; - if ("FHIR-DSTU2-SDC-FormManager".equals(codeString)) - return FHIRDSTU2SDCFORMMANAGER; - if ("FHIR-DSTU2-SDC-FormReceiver".equals(codeString)) - return FHIRDSTU2SDCFORMRECEIVER; - if ("FHIR-DSTU2-SDC-FormProcessor".equals(codeString)) - return FHIRDSTU2SDCFORMPROCESSOR; - throw new FHIRException("Unknown ProfileDestinationType code '"+codeString+"'"); - } - public String toCode() { - switch (this) { - case FHIRDSTU2SERVER: return "FHIR-DSTU2-Server"; - case FHIRDSTU2SDCFORMMANAGER: return "FHIR-DSTU2-SDC-FormManager"; - case FHIRDSTU2SDCFORMRECEIVER: return "FHIR-DSTU2-SDC-FormReceiver"; - case FHIRDSTU2SDCFORMPROCESSOR: return "FHIR-DSTU2-SDC-FormProcessor"; - default: return "?"; - } - } - public String getSystem() { - switch (this) { - case FHIRDSTU2SERVER: return "http://hl7.org/fhir/profile-destination-types"; - case FHIRDSTU2SDCFORMMANAGER: return "http://hl7.org/fhir/profile-destination-types"; - case FHIRDSTU2SDCFORMRECEIVER: return "http://hl7.org/fhir/profile-destination-types"; - case FHIRDSTU2SDCFORMPROCESSOR: return "http://hl7.org/fhir/profile-destination-types"; - default: return "?"; - } - } - public String getDefinition() { - switch (this) { - case FHIRDSTU2SERVER: return "General DSTU2 server."; - case FHIRDSTU2SDCFORMMANAGER: return "DSTU2 server that serves as an SDC-FormManager."; - case FHIRDSTU2SDCFORMRECEIVER: return "DSTU2 server that serves as an SDC-FormReceiver."; - case FHIRDSTU2SDCFORMPROCESSOR: return "DSTU2 server that serves as an SDC-FormProcessor."; - default: return "?"; - } - } - public String getDisplay() { - switch (this) { - case FHIRDSTU2SERVER: return "FHIR-DSTU2-Server"; - case FHIRDSTU2SDCFORMMANAGER: return "FHIR-DSTU2-SDC-FormManager"; - case FHIRDSTU2SDCFORMRECEIVER: return "FHIR-DSTU2-SDC-FormReceiver"; - case FHIRDSTU2SDCFORMPROCESSOR: return "FHIR-DSTU2-SDC-FormProcessor"; - default: return "?"; - } - } - } - - public static class ProfileDestinationTypeEnumFactory implements EnumFactory { - public ProfileDestinationType fromCode(String codeString) throws IllegalArgumentException { - if (codeString == null || "".equals(codeString)) - if (codeString == null || "".equals(codeString)) - return null; - if ("FHIR-DSTU2-Server".equals(codeString)) - return ProfileDestinationType.FHIRDSTU2SERVER; - if ("FHIR-DSTU2-SDC-FormManager".equals(codeString)) - return ProfileDestinationType.FHIRDSTU2SDCFORMMANAGER; - if ("FHIR-DSTU2-SDC-FormReceiver".equals(codeString)) - return ProfileDestinationType.FHIRDSTU2SDCFORMRECEIVER; - if ("FHIR-DSTU2-SDC-FormProcessor".equals(codeString)) - return ProfileDestinationType.FHIRDSTU2SDCFORMPROCESSOR; - throw new IllegalArgumentException("Unknown ProfileDestinationType code '"+codeString+"'"); - } - public Enumeration fromType(Base code) throws FHIRException { - if (code == null || code.isEmpty()) - return null; - String codeString = ((PrimitiveType) code).asStringValue(); - if (codeString == null || "".equals(codeString)) - return null; - if ("FHIR-DSTU2-Server".equals(codeString)) - return new Enumeration(this, ProfileDestinationType.FHIRDSTU2SERVER); - if ("FHIR-DSTU2-SDC-FormManager".equals(codeString)) - return new Enumeration(this, ProfileDestinationType.FHIRDSTU2SDCFORMMANAGER); - if ("FHIR-DSTU2-SDC-FormReceiver".equals(codeString)) - return new Enumeration(this, ProfileDestinationType.FHIRDSTU2SDCFORMRECEIVER); - if ("FHIR-DSTU2-SDC-FormProcessor".equals(codeString)) - return new Enumeration(this, ProfileDestinationType.FHIRDSTU2SDCFORMPROCESSOR); - throw new FHIRException("Unknown ProfileDestinationType code '"+codeString+"'"); - } - public String toCode(ProfileDestinationType code) { - if (code == ProfileDestinationType.FHIRDSTU2SERVER) - return "FHIR-DSTU2-Server"; - if (code == ProfileDestinationType.FHIRDSTU2SDCFORMMANAGER) - return "FHIR-DSTU2-SDC-FormManager"; - if (code == ProfileDestinationType.FHIRDSTU2SDCFORMRECEIVER) - return "FHIR-DSTU2-SDC-FormReceiver"; - if (code == ProfileDestinationType.FHIRDSTU2SDCFORMPROCESSOR) - return "FHIR-DSTU2-SDC-FormProcessor"; - return "?"; - } - public String toSystem(ProfileDestinationType code) { - return code.getSystem(); - } - } - public enum ContentType { /** * XML content-type corresponding to the application/xml+fhir mime-type. @@ -898,7 +690,7 @@ public class TestScript extends DomainResource { * The name of an individual to contact regarding the Test Script. */ @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the Test Script." ) + @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the Test Script." ) protected StringType name; /** @@ -1067,8 +859,7 @@ public class TestScript extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); } public String fhirType() { @@ -1076,6 +867,348 @@ public class TestScript extends DomainResource { } + } + + @Block() + public static class TestScriptOriginComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. + */ + @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The index of the abstract origin server starting at 1", formalDefinition="Abstract name given to an origin server in this test script. The name is provided as a number starting at 1." ) + protected IntegerType index; + + /** + * The type of origin profile the test system supports. + */ + @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="FHIR-Client | FHIR-SDC-FormFiller", formalDefinition="The type of origin profile the test system supports." ) + protected Coding profile; + + private static final long serialVersionUID = -1239935149L; + + /** + * Constructor + */ + public TestScriptOriginComponent() { + super(); + } + + /** + * Constructor + */ + public TestScriptOriginComponent(IntegerType index, Coding profile) { + super(); + this.index = index; + this.profile = profile; + } + + /** + * @return {@link #index} (Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value + */ + public IntegerType getIndexElement() { + if (this.index == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptOriginComponent.index"); + else if (Configuration.doAutoCreate()) + this.index = new IntegerType(); // bb + return this.index; + } + + public boolean hasIndexElement() { + return this.index != null && !this.index.isEmpty(); + } + + public boolean hasIndex() { + return this.index != null && !this.index.isEmpty(); + } + + /** + * @param value {@link #index} (Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value + */ + public TestScriptOriginComponent setIndexElement(IntegerType value) { + this.index = value; + return this; + } + + /** + * @return Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. + */ + public int getIndex() { + return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue(); + } + + /** + * @param value Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. + */ + public TestScriptOriginComponent setIndex(int value) { + if (this.index == null) + this.index = new IntegerType(); + this.index.setValue(value); + return this; + } + + /** + * @return {@link #profile} (The type of origin profile the test system supports.) + */ + public Coding getProfile() { + if (this.profile == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptOriginComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profile = new Coding(); // cc + return this.profile; + } + + public boolean hasProfile() { + return this.profile != null && !this.profile.isEmpty(); + } + + /** + * @param value {@link #profile} (The type of origin profile the test system supports.) + */ + public TestScriptOriginComponent setProfile(Coding value) { + this.profile = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("index", "integer", "Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.", 0, java.lang.Integer.MAX_VALUE, index)); + childrenList.add(new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, java.lang.Integer.MAX_VALUE, profile)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("index")) + this.index = castToInteger(value); // IntegerType + else if (name.equals("profile")) + this.profile = castToCoding(value); // Coding + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("index")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.index"); + } + else if (name.equals("profile")) { + this.profile = new Coding(); + return this.profile; + } + else + return super.addChild(name); + } + + public TestScriptOriginComponent copy() { + TestScriptOriginComponent dst = new TestScriptOriginComponent(); + copyValues(dst); + dst.index = index == null ? null : index.copy(); + dst.profile = profile == null ? null : profile.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptOriginComponent)) + return false; + TestScriptOriginComponent o = (TestScriptOriginComponent) other; + return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptOriginComponent)) + return false; + TestScriptOriginComponent o = (TestScriptOriginComponent) other; + return compareValues(index, o.index, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( index, profile); + } + + public String fhirType() { + return "TestScript.origin"; + + } + + } + + @Block() + public static class TestScriptDestinationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. + */ + @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The index of the abstract destination server starting at 1", formalDefinition="Abstract name given to a destination server in this test script. The name is provided as a number starting at 1." ) + protected IntegerType index; + + /** + * The type of destination profile the test system supports. + */ + @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor", formalDefinition="The type of destination profile the test system supports." ) + protected Coding profile; + + private static final long serialVersionUID = -1239935149L; + + /** + * Constructor + */ + public TestScriptDestinationComponent() { + super(); + } + + /** + * Constructor + */ + public TestScriptDestinationComponent(IntegerType index, Coding profile) { + super(); + this.index = index; + this.profile = profile; + } + + /** + * @return {@link #index} (Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value + */ + public IntegerType getIndexElement() { + if (this.index == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptDestinationComponent.index"); + else if (Configuration.doAutoCreate()) + this.index = new IntegerType(); // bb + return this.index; + } + + public boolean hasIndexElement() { + return this.index != null && !this.index.isEmpty(); + } + + public boolean hasIndex() { + return this.index != null && !this.index.isEmpty(); + } + + /** + * @param value {@link #index} (Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value + */ + public TestScriptDestinationComponent setIndexElement(IntegerType value) { + this.index = value; + return this; + } + + /** + * @return Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. + */ + public int getIndex() { + return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue(); + } + + /** + * @param value Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. + */ + public TestScriptDestinationComponent setIndex(int value) { + if (this.index == null) + this.index = new IntegerType(); + this.index.setValue(value); + return this; + } + + /** + * @return {@link #profile} (The type of destination profile the test system supports.) + */ + public Coding getProfile() { + if (this.profile == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptDestinationComponent.profile"); + else if (Configuration.doAutoCreate()) + this.profile = new Coding(); // cc + return this.profile; + } + + public boolean hasProfile() { + return this.profile != null && !this.profile.isEmpty(); + } + + /** + * @param value {@link #profile} (The type of destination profile the test system supports.) + */ + public TestScriptDestinationComponent setProfile(Coding value) { + this.profile = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("index", "integer", "Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.", 0, java.lang.Integer.MAX_VALUE, index)); + childrenList.add(new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, java.lang.Integer.MAX_VALUE, profile)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("index")) + this.index = castToInteger(value); // IntegerType + else if (name.equals("profile")) + this.profile = castToCoding(value); // Coding + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("index")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.index"); + } + else if (name.equals("profile")) { + this.profile = new Coding(); + return this.profile; + } + else + return super.addChild(name); + } + + public TestScriptDestinationComponent copy() { + TestScriptDestinationComponent dst = new TestScriptDestinationComponent(); + copyValues(dst); + dst.index = index == null ? null : index.copy(); + dst.profile = profile == null ? null : profile.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptDestinationComponent)) + return false; + TestScriptDestinationComponent o = (TestScriptDestinationComponent) other; + return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptDestinationComponent)) + return false; + TestScriptDestinationComponent o = (TestScriptDestinationComponent) other; + return compareValues(index, o.index, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( index, profile); + } + + public String fhirType() { + return "TestScript.destination"; + + } + } @Block() @@ -1248,8 +1381,7 @@ public class TestScript extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (link == null || link.isEmpty()) && (capability == null || capability.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( link, capability); } public String fhirType() { @@ -1443,8 +1575,7 @@ public class TestScript extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (url == null || url.isEmpty()) && (description == null || description.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, description); } public String fhirType() { @@ -1968,10 +2099,8 @@ public class TestScript extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (required == null || required.isEmpty()) && (validated == null || validated.isEmpty()) - && (description == null || description.isEmpty()) && (origin == null || origin.isEmpty()) - && (destination == null || destination.isEmpty()) && (link == null || link.isEmpty()) && (conformance == null || conformance.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( required, validated, description + , origin, destination, link, conformance); } public String fhirType() { @@ -1979,390 +2108,6 @@ public class TestScript extends DomainResource { } - } - - @Block() - public static class TestScriptOriginComponent extends BackboneElement implements IBaseBackboneElement { - /** - * Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. - */ - @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="The index of the abstract origin server starting at 1", formalDefinition="Abstract name given to an origin server in this test script. The name is provided as a number starting at 1." ) - protected IntegerType index; - - /** - * The type of profile the server supports. - */ - @Child(name = "profile", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="FHIR-DSTU2-Client | FHIR-DSTU2-SDC-FormFiller", formalDefinition="The type of profile the server supports." ) - protected Enumeration profile; - - private static final long serialVersionUID = -1472818765L; - - /** - * Constructor - */ - public TestScriptOriginComponent() { - super(); - } - - /** - * Constructor - */ - public TestScriptOriginComponent(IntegerType index, Enumeration profile) { - super(); - this.index = index; - this.profile = profile; - } - - /** - * @return {@link #index} (Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value - */ - public IntegerType getIndexElement() { - if (this.index == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TestScriptOriginComponent.index"); - else if (Configuration.doAutoCreate()) - this.index = new IntegerType(); // bb - return this.index; - } - - public boolean hasIndexElement() { - return this.index != null && !this.index.isEmpty(); - } - - public boolean hasIndex() { - return this.index != null && !this.index.isEmpty(); - } - - /** - * @param value {@link #index} (Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value - */ - public TestScriptOriginComponent setIndexElement(IntegerType value) { - this.index = value; - return this; - } - - /** - * @return Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. - */ - public int getIndex() { - return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue(); - } - - /** - * @param value Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. - */ - public TestScriptOriginComponent setIndex(int value) { - if (this.index == null) - this.index = new IntegerType(); - this.index.setValue(value); - return this; - } - - /** - * @return {@link #profile} (The type of profile the server supports.). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value - */ - public Enumeration getProfileElement() { - if (this.profile == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TestScriptOriginComponent.profile"); - else if (Configuration.doAutoCreate()) - this.profile = new Enumeration(new ProfileOriginTypeEnumFactory()); // bb - return this.profile; - } - - public boolean hasProfileElement() { - return this.profile != null && !this.profile.isEmpty(); - } - - public boolean hasProfile() { - return this.profile != null && !this.profile.isEmpty(); - } - - /** - * @param value {@link #profile} (The type of profile the server supports.). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value - */ - public TestScriptOriginComponent setProfileElement(Enumeration value) { - this.profile = value; - return this; - } - - /** - * @return The type of profile the server supports. - */ - public ProfileOriginType getProfile() { - return this.profile == null ? null : this.profile.getValue(); - } - - /** - * @param value The type of profile the server supports. - */ - public TestScriptOriginComponent setProfile(ProfileOriginType value) { - if (this.profile == null) - this.profile = new Enumeration(new ProfileOriginTypeEnumFactory()); - this.profile.setValue(value); - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("index", "integer", "Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.", 0, java.lang.Integer.MAX_VALUE, index)); - childrenList.add(new Property("profile", "code", "The type of profile the server supports.", 0, java.lang.Integer.MAX_VALUE, profile)); - } - - @Override - public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("index")) - this.index = castToInteger(value); // IntegerType - else if (name.equals("profile")) - this.profile = new ProfileOriginTypeEnumFactory().fromType(value); // Enumeration - else - super.setProperty(name, value); - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("index")) { - throw new FHIRException("Cannot call addChild on a primitive type TestScript.index"); - } - else if (name.equals("profile")) { - throw new FHIRException("Cannot call addChild on a primitive type TestScript.profile"); - } - else - return super.addChild(name); - } - - public TestScriptOriginComponent copy() { - TestScriptOriginComponent dst = new TestScriptOriginComponent(); - copyValues(dst); - dst.index = index == null ? null : index.copy(); - dst.profile = profile == null ? null : profile.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof TestScriptOriginComponent)) - return false; - TestScriptOriginComponent o = (TestScriptOriginComponent) other; - return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof TestScriptOriginComponent)) - return false; - TestScriptOriginComponent o = (TestScriptOriginComponent) other; - return compareValues(index, o.index, true) && compareValues(profile, o.profile, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (index == null || index.isEmpty()) && (profile == null || profile.isEmpty()) - ; - } - - public String fhirType() { - return "TestScript.origin"; - - } - - } - - @Block() - public static class TestScriptDestinationComponent extends BackboneElement implements IBaseBackboneElement { - /** - * Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. - */ - @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="The index of the abstract destination server starting at 1", formalDefinition="Abstract name given to a destination server in this test script. The name is provided as a number starting at 1." ) - protected IntegerType index; - - /** - * The type of profile the server supports. - */ - @Child(name = "profile", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="FHIR-DSTU2-Server | FHIR-DSTU2-SDC-FormManager | FHIR-DSTU2-SDC-FormReceiver | FHIR-DSTU2-SDC-FormProcessor", formalDefinition="The type of profile the server supports." ) - protected Enumeration profile; - - private static final long serialVersionUID = 399132503L; - - /** - * Constructor - */ - public TestScriptDestinationComponent() { - super(); - } - - /** - * Constructor - */ - public TestScriptDestinationComponent(IntegerType index, Enumeration profile) { - super(); - this.index = index; - this.profile = profile; - } - - /** - * @return {@link #index} (Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value - */ - public IntegerType getIndexElement() { - if (this.index == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TestScriptDestinationComponent.index"); - else if (Configuration.doAutoCreate()) - this.index = new IntegerType(); // bb - return this.index; - } - - public boolean hasIndexElement() { - return this.index != null && !this.index.isEmpty(); - } - - public boolean hasIndex() { - return this.index != null && !this.index.isEmpty(); - } - - /** - * @param value {@link #index} (Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value - */ - public TestScriptDestinationComponent setIndexElement(IntegerType value) { - this.index = value; - return this; - } - - /** - * @return Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. - */ - public int getIndex() { - return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue(); - } - - /** - * @param value Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. - */ - public TestScriptDestinationComponent setIndex(int value) { - if (this.index == null) - this.index = new IntegerType(); - this.index.setValue(value); - return this; - } - - /** - * @return {@link #profile} (The type of profile the server supports.). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value - */ - public Enumeration getProfileElement() { - if (this.profile == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TestScriptDestinationComponent.profile"); - else if (Configuration.doAutoCreate()) - this.profile = new Enumeration(new ProfileDestinationTypeEnumFactory()); // bb - return this.profile; - } - - public boolean hasProfileElement() { - return this.profile != null && !this.profile.isEmpty(); - } - - public boolean hasProfile() { - return this.profile != null && !this.profile.isEmpty(); - } - - /** - * @param value {@link #profile} (The type of profile the server supports.). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value - */ - public TestScriptDestinationComponent setProfileElement(Enumeration value) { - this.profile = value; - return this; - } - - /** - * @return The type of profile the server supports. - */ - public ProfileDestinationType getProfile() { - return this.profile == null ? null : this.profile.getValue(); - } - - /** - * @param value The type of profile the server supports. - */ - public TestScriptDestinationComponent setProfile(ProfileDestinationType value) { - if (this.profile == null) - this.profile = new Enumeration(new ProfileDestinationTypeEnumFactory()); - this.profile.setValue(value); - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("index", "integer", "Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.", 0, java.lang.Integer.MAX_VALUE, index)); - childrenList.add(new Property("profile", "code", "The type of profile the server supports.", 0, java.lang.Integer.MAX_VALUE, profile)); - } - - @Override - public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("index")) - this.index = castToInteger(value); // IntegerType - else if (name.equals("profile")) - this.profile = new ProfileDestinationTypeEnumFactory().fromType(value); // Enumeration - else - super.setProperty(name, value); - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("index")) { - throw new FHIRException("Cannot call addChild on a primitive type TestScript.index"); - } - else if (name.equals("profile")) { - throw new FHIRException("Cannot call addChild on a primitive type TestScript.profile"); - } - else - return super.addChild(name); - } - - public TestScriptDestinationComponent copy() { - TestScriptDestinationComponent dst = new TestScriptDestinationComponent(); - copyValues(dst); - dst.index = index == null ? null : index.copy(); - dst.profile = profile == null ? null : profile.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof TestScriptDestinationComponent)) - return false; - TestScriptDestinationComponent o = (TestScriptDestinationComponent) other; - return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof TestScriptDestinationComponent)) - return false; - TestScriptDestinationComponent o = (TestScriptDestinationComponent) other; - return compareValues(index, o.index, true) && compareValues(profile, o.profile, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (index == null || index.isEmpty()) && (profile == null || profile.isEmpty()) - ; - } - - public String fhirType() { - return "TestScript.destination"; - - } - } @Block() @@ -2598,8 +2343,8 @@ public class TestScript extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (autocreate == null || autocreate.isEmpty()) && (autodelete == null || autodelete.isEmpty()) - && (resource == null || resource.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( autocreate, autodelete, resource + ); } public String fhirType() { @@ -2622,7 +2367,7 @@ public class TestScript extends DomainResource { * A default, hard-coded, or user-defined value for this variable. */ @Child(name = "defaultValue", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Default value for this variable", formalDefinition="A default, hard-coded, or user-defined value for this variable." ) + @Description(shortDefinition="Default, hard-coded, or user-defined value for this variable", formalDefinition="A default, hard-coded, or user-defined value for this variable." ) protected StringType defaultValue; /** @@ -2984,9 +2729,8 @@ public class TestScript extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (defaultValue == null || defaultValue.isEmpty()) - && (headerField == null || headerField.isEmpty()) && (path == null || path.isEmpty()) && (sourceId == null || sourceId.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, defaultValue, headerField + , path, sourceId); } public String fhirType() { @@ -2994,6 +2738,894 @@ public class TestScript extends DomainResource { } + } + + @Block() + public static class TestScriptRuleComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Reference to the resource (containing the contents of the rule needed for assertions). + */ + @Child(name = "resource", type = {}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Assert rule resource reference", formalDefinition="Reference to the resource (containing the contents of the rule needed for assertions)." ) + protected Reference resource; + + /** + * The actual object that is the target of the reference (Reference to the resource (containing the contents of the rule needed for assertions).) + */ + protected Resource resourceTarget; + + /** + * Each rule template can take one or more parameters for rule evaluation. + */ + @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) + protected List param; + + private static final long serialVersionUID = -524260474L; + + /** + * Constructor + */ + public TestScriptRuleComponent() { + super(); + } + + /** + * Constructor + */ + public TestScriptRuleComponent(Reference resource) { + super(); + this.resource = resource; + } + + /** + * @return {@link #resource} (Reference to the resource (containing the contents of the rule needed for assertions).) + */ + public Reference getResource() { + if (this.resource == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptRuleComponent.resource"); + else if (Configuration.doAutoCreate()) + this.resource = new Reference(); // cc + return this.resource; + } + + public boolean hasResource() { + return this.resource != null && !this.resource.isEmpty(); + } + + /** + * @param value {@link #resource} (Reference to the resource (containing the contents of the rule needed for assertions).) + */ + public TestScriptRuleComponent setResource(Reference value) { + this.resource = value; + return this; + } + + /** + * @return {@link #resource} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the resource (containing the contents of the rule needed for assertions).) + */ + public Resource getResourceTarget() { + return this.resourceTarget; + } + + /** + * @param value {@link #resource} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the resource (containing the contents of the rule needed for assertions).) + */ + public TestScriptRuleComponent setResourceTarget(Resource value) { + this.resourceTarget = value; + return this; + } + + /** + * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) + */ + public List getParam() { + if (this.param == null) + this.param = new ArrayList(); + return this.param; + } + + public boolean hasParam() { + if (this.param == null) + return false; + for (TestScriptRuleParamComponent item : this.param) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) + */ + // syntactic sugar + public TestScriptRuleParamComponent addParam() { //3 + TestScriptRuleParamComponent t = new TestScriptRuleParamComponent(); + if (this.param == null) + this.param = new ArrayList(); + this.param.add(t); + return t; + } + + // syntactic sugar + public TestScriptRuleComponent addParam(TestScriptRuleParamComponent t) { //3 + if (t == null) + return this; + if (this.param == null) + this.param = new ArrayList(); + this.param.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the rule needed for assertions).", 0, java.lang.Integer.MAX_VALUE, resource)); + childrenList.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("resource")) + this.resource = castToReference(value); // Reference + else if (name.equals("param")) + this.getParam().add((TestScriptRuleParamComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("resource")) { + this.resource = new Reference(); + return this.resource; + } + else if (name.equals("param")) { + return addParam(); + } + else + return super.addChild(name); + } + + public TestScriptRuleComponent copy() { + TestScriptRuleComponent dst = new TestScriptRuleComponent(); + copyValues(dst); + dst.resource = resource == null ? null : resource.copy(); + if (param != null) { + dst.param = new ArrayList(); + for (TestScriptRuleParamComponent i : param) + dst.param.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptRuleComponent)) + return false; + TestScriptRuleComponent o = (TestScriptRuleComponent) other; + return compareDeep(resource, o.resource, true) && compareDeep(param, o.param, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptRuleComponent)) + return false; + TestScriptRuleComponent o = (TestScriptRuleComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( resource, param); + } + + public String fhirType() { + return "TestScript.rule"; + + } + + } + + @Block() + public static class TestScriptRuleParamComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Descriptive name for this parameter that matches the external assert rule parameter name. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Parameter name matching external assert rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert rule parameter name." ) + protected StringType name; + + /** + * The explict or dynamic value for the parameter that will be passed on to the external rule template. + */ + @Child(name = "value", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Parameter value defined either explicitly or dynamically", formalDefinition="The explict or dynamic value for the parameter that will be passed on to the external rule template." ) + protected StringType value; + + private static final long serialVersionUID = 395259392L; + + /** + * Constructor + */ + public TestScriptRuleParamComponent() { + super(); + } + + /** + * Constructor + */ + public TestScriptRuleParamComponent(StringType name) { + super(); + this.name = name; + } + + /** + * @return {@link #name} (Descriptive name for this parameter that matches the external assert rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptRuleParamComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Descriptive name for this parameter that matches the external assert rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public TestScriptRuleParamComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return Descriptive name for this parameter that matches the external assert rule parameter name. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Descriptive name for this parameter that matches the external assert rule parameter name. + */ + public TestScriptRuleParamComponent setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #value} (The explict or dynamic value for the parameter that will be passed on to the external rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public StringType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptRuleParamComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new StringType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The explict or dynamic value for the parameter that will be passed on to the external rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public TestScriptRuleParamComponent setValueElement(StringType value) { + this.value = value; + return this; + } + + /** + * @return The explict or dynamic value for the parameter that will be passed on to the external rule template. + */ + public String getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value The explict or dynamic value for the parameter that will be passed on to the external rule template. + */ + public TestScriptRuleParamComponent setValue(String value) { + if (Utilities.noString(value)) + this.value = null; + else { + if (this.value == null) + this.value = new StringType(); + this.value.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("value", "string", "The explict or dynamic value for the parameter that will be passed on to the external rule template.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("value")) + this.value = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); + } + else + return super.addChild(name); + } + + public TestScriptRuleParamComponent copy() { + TestScriptRuleParamComponent dst = new TestScriptRuleParamComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptRuleParamComponent)) + return false; + TestScriptRuleParamComponent o = (TestScriptRuleParamComponent) other; + return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptRuleParamComponent)) + return false; + TestScriptRuleParamComponent o = (TestScriptRuleParamComponent) other; + return compareValues(name, o.name, true) && compareValues(value, o.value, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, value); + } + + public String fhirType() { + return "TestScript.rule.param"; + + } + + } + + @Block() + public static class TestScriptRulesetComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Reference to the resource (containing the contents of the ruleset needed for assertions). + */ + @Child(name = "resource", type = {}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Assert ruleset resource reference", formalDefinition="Reference to the resource (containing the contents of the ruleset needed for assertions)." ) + protected Reference resource; + + /** + * The actual object that is the target of the reference (Reference to the resource (containing the contents of the ruleset needed for assertions).) + */ + protected Resource resourceTarget; + + /** + * Id of the referenced rule within the external ruleset template. + */ + @Child(name = "rule", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Id of referenced rule within the ruleset", formalDefinition="Id of the referenced rule within the external ruleset template." ) + protected List rule; + + private static final long serialVersionUID = 5813554L; + + /** + * Constructor + */ + public TestScriptRulesetComponent() { + super(); + } + + /** + * Constructor + */ + public TestScriptRulesetComponent(Reference resource) { + super(); + this.resource = resource; + } + + /** + * @return {@link #resource} (Reference to the resource (containing the contents of the ruleset needed for assertions).) + */ + public Reference getResource() { + if (this.resource == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptRulesetComponent.resource"); + else if (Configuration.doAutoCreate()) + this.resource = new Reference(); // cc + return this.resource; + } + + public boolean hasResource() { + return this.resource != null && !this.resource.isEmpty(); + } + + /** + * @param value {@link #resource} (Reference to the resource (containing the contents of the ruleset needed for assertions).) + */ + public TestScriptRulesetComponent setResource(Reference value) { + this.resource = value; + return this; + } + + /** + * @return {@link #resource} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the resource (containing the contents of the ruleset needed for assertions).) + */ + public Resource getResourceTarget() { + return this.resourceTarget; + } + + /** + * @param value {@link #resource} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the resource (containing the contents of the ruleset needed for assertions).) + */ + public TestScriptRulesetComponent setResourceTarget(Resource value) { + this.resourceTarget = value; + return this; + } + + /** + * @return {@link #rule} (Id of the referenced rule within the external ruleset template.) + */ + public List getRule() { + if (this.rule == null) + this.rule = new ArrayList(); + return this.rule; + } + + public boolean hasRule() { + if (this.rule == null) + return false; + for (TestScriptRulesetRuleComponent item : this.rule) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #rule} (Id of the referenced rule within the external ruleset template.) + */ + // syntactic sugar + public TestScriptRulesetRuleComponent addRule() { //3 + TestScriptRulesetRuleComponent t = new TestScriptRulesetRuleComponent(); + if (this.rule == null) + this.rule = new ArrayList(); + this.rule.add(t); + return t; + } + + // syntactic sugar + public TestScriptRulesetComponent addRule(TestScriptRulesetRuleComponent t) { //3 + if (t == null) + return this; + if (this.rule == null) + this.rule = new ArrayList(); + this.rule.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the ruleset needed for assertions).", 0, java.lang.Integer.MAX_VALUE, resource)); + childrenList.add(new Property("rule", "", "Id of the referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("resource")) + this.resource = castToReference(value); // Reference + else if (name.equals("rule")) + this.getRule().add((TestScriptRulesetRuleComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("resource")) { + this.resource = new Reference(); + return this.resource; + } + else if (name.equals("rule")) { + return addRule(); + } + else + return super.addChild(name); + } + + public TestScriptRulesetComponent copy() { + TestScriptRulesetComponent dst = new TestScriptRulesetComponent(); + copyValues(dst); + dst.resource = resource == null ? null : resource.copy(); + if (rule != null) { + dst.rule = new ArrayList(); + for (TestScriptRulesetRuleComponent i : rule) + dst.rule.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptRulesetComponent)) + return false; + TestScriptRulesetComponent o = (TestScriptRulesetComponent) other; + return compareDeep(resource, o.resource, true) && compareDeep(rule, o.rule, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptRulesetComponent)) + return false; + TestScriptRulesetComponent o = (TestScriptRulesetComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( resource, rule); + } + + public String fhirType() { + return "TestScript.ruleset"; + + } + + } + + @Block() + public static class TestScriptRulesetRuleComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Each rule template can take one or more parameters for rule evaluation. + */ + @Child(name = "param", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Ruleset rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) + protected List param; + + private static final long serialVersionUID = 1266281462L; + + /** + * Constructor + */ + public TestScriptRulesetRuleComponent() { + super(); + } + + /** + * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) + */ + public List getParam() { + if (this.param == null) + this.param = new ArrayList(); + return this.param; + } + + public boolean hasParam() { + if (this.param == null) + return false; + for (TestScriptRulesetRuleParamComponent item : this.param) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) + */ + // syntactic sugar + public TestScriptRulesetRuleParamComponent addParam() { //3 + TestScriptRulesetRuleParamComponent t = new TestScriptRulesetRuleParamComponent(); + if (this.param == null) + this.param = new ArrayList(); + this.param.add(t); + return t; + } + + // syntactic sugar + public TestScriptRulesetRuleComponent addParam(TestScriptRulesetRuleParamComponent t) { //3 + if (t == null) + return this; + if (this.param == null) + this.param = new ArrayList(); + this.param.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("param")) + this.getParam().add((TestScriptRulesetRuleParamComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("param")) { + return addParam(); + } + else + return super.addChild(name); + } + + public TestScriptRulesetRuleComponent copy() { + TestScriptRulesetRuleComponent dst = new TestScriptRulesetRuleComponent(); + copyValues(dst); + if (param != null) { + dst.param = new ArrayList(); + for (TestScriptRulesetRuleParamComponent i : param) + dst.param.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptRulesetRuleComponent)) + return false; + TestScriptRulesetRuleComponent o = (TestScriptRulesetRuleComponent) other; + return compareDeep(param, o.param, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptRulesetRuleComponent)) + return false; + TestScriptRulesetRuleComponent o = (TestScriptRulesetRuleComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( param); + } + + public String fhirType() { + return "TestScript.ruleset.rule"; + + } + + } + + @Block() + public static class TestScriptRulesetRuleParamComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Descriptive name for this parameter that matches the external assert ruleset rule parameter name. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Parameter name matching external assert ruleset rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert ruleset rule parameter name." ) + protected StringType name; + + /** + * The value for the parameter that will be passed on to the external ruleset rule template. + */ + @Child(name = "value", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Parameter value defined either explicitly or dynamically", formalDefinition="The value for the parameter that will be passed on to the external ruleset rule template." ) + protected StringType value; + + private static final long serialVersionUID = 395259392L; + + /** + * Constructor + */ + public TestScriptRulesetRuleParamComponent() { + super(); + } + + /** + * Constructor + */ + public TestScriptRulesetRuleParamComponent(StringType name) { + super(); + this.name = name; + } + + /** + * @return {@link #name} (Descriptive name for this parameter that matches the external assert ruleset rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptRulesetRuleParamComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Descriptive name for this parameter that matches the external assert ruleset rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public TestScriptRulesetRuleParamComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return Descriptive name for this parameter that matches the external assert ruleset rule parameter name. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Descriptive name for this parameter that matches the external assert ruleset rule parameter name. + */ + public TestScriptRulesetRuleParamComponent setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #value} (The value for the parameter that will be passed on to the external ruleset rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public StringType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TestScriptRulesetRuleParamComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new StringType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The value for the parameter that will be passed on to the external ruleset rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public TestScriptRulesetRuleParamComponent setValueElement(StringType value) { + this.value = value; + return this; + } + + /** + * @return The value for the parameter that will be passed on to the external ruleset rule template. + */ + public String getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value The value for the parameter that will be passed on to the external ruleset rule template. + */ + public TestScriptRulesetRuleParamComponent setValue(String value) { + if (Utilities.noString(value)) + this.value = null; + else { + if (this.value == null) + this.value = new StringType(); + this.value.setValue(value); + } + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("value")) + this.value = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); + } + else + return super.addChild(name); + } + + public TestScriptRulesetRuleParamComponent copy() { + TestScriptRulesetRuleParamComponent dst = new TestScriptRulesetRuleParamComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TestScriptRulesetRuleParamComponent)) + return false; + TestScriptRulesetRuleParamComponent o = (TestScriptRulesetRuleParamComponent) other; + return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TestScriptRulesetRuleParamComponent)) + return false; + TestScriptRulesetRuleParamComponent o = (TestScriptRulesetRuleParamComponent) other; + return compareValues(name, o.name, true) && compareValues(value, o.value, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, value); + } + + public String fhirType() { + return "TestScript.ruleset.rule.param"; + + } + } @Block() @@ -3147,8 +3779,7 @@ public class TestScript extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (metadata == null || metadata.isEmpty()) && (action == null || action.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( metadata, action); } public String fhirType() { @@ -3290,8 +3921,7 @@ public class TestScript extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (operation == null || operation.isEmpty()) && (assert_ == null || assert_.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( operation, assert_); } public String fhirType() { @@ -3307,7 +3937,7 @@ public class TestScript extends DomainResource { * Server interaction or operation type. */ @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="The setup operation type that will be executed", formalDefinition="Server interaction or operation type." ) + @Description(shortDefinition="The operation code type that will be executed", formalDefinition="Server interaction or operation type." ) protected Coding type; /** @@ -4268,13 +4898,9 @@ public class TestScript extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (type == null || type.isEmpty()) && (resource == null || resource.isEmpty()) - && (label == null || label.isEmpty()) && (description == null || description.isEmpty()) && (accept == null || accept.isEmpty()) - && (contentType == null || contentType.isEmpty()) && (destination == null || destination.isEmpty()) - && (encodeRequestUrl == null || encodeRequestUrl.isEmpty()) && (origin == null || origin.isEmpty()) - && (params == null || params.isEmpty()) && (requestHeader == null || requestHeader.isEmpty()) - && (responseId == null || responseId.isEmpty()) && (sourceId == null || sourceId.isEmpty()) - && (targetId == null || targetId.isEmpty()) && (url == null || url.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, resource, label, description + , accept, contentType, destination, encodeRequestUrl, origin, params, requestHeader, responseId + , sourceId, targetId, url); } public String fhirType() { @@ -4465,8 +5091,7 @@ public class TestScript extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (field == null || field.isEmpty()) && (value == null || value.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( field, value); } public String fhirType() { @@ -4528,10 +5153,10 @@ public class TestScript extends DomainResource { protected StringType headerField; /** - * The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId. + * The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. */ @Child(name = "minimumId", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Fixture Id of minimum content resource", formalDefinition="The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId." ) + @Description(shortDefinition="Fixture Id of minimum content resource", formalDefinition="The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId." ) protected StringType minimumId; /** @@ -4576,35 +5201,49 @@ public class TestScript extends DomainResource { @Description(shortDefinition="HTTP response code to test", formalDefinition="The value of the HTTP response code to be tested." ) protected StringType responseCode; + /** + * The TestScript.rule id value this assert will evaluate. + */ + @Child(name = "rule", type = {}, order=15, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Id of the TestScript.rule", formalDefinition="The TestScript.rule id value this assert will evaluate." ) + protected SetupActionAssertRuleComponent rule; + + /** + * The TestScript.ruleset id value this assert will evaluate. + */ + @Child(name = "ruleset", type = {}, order=16, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Id of the TestScript.ruleset", formalDefinition="The TestScript.ruleset id value this assert will evaluate." ) + protected SetupActionAssertRulesetComponent ruleset; + /** * Fixture to evaluate the XPath/JSONPath expression or the headerField against. */ - @Child(name = "sourceId", type = {IdType.class}, order=15, min=0, max=1, modifier=false, summary=false) + @Child(name = "sourceId", type = {IdType.class}, order=17, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Fixture Id of source expression or headerField", formalDefinition="Fixture to evaluate the XPath/JSONPath expression or the headerField against." ) protected IdType sourceId; /** * The ID of the Profile to validate against. */ - @Child(name = "validateProfileId", type = {IdType.class}, order=16, min=0, max=1, modifier=false, summary=false) + @Child(name = "validateProfileId", type = {IdType.class}, order=18, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Profile Id of validation profile reference", formalDefinition="The ID of the Profile to validate against." ) protected IdType validateProfileId; /** * The value to compare to. */ - @Child(name = "value", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false) + @Child(name = "value", type = {StringType.class}, order=19, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="The value to compare to", formalDefinition="The value to compare to." ) protected StringType value; /** * Whether or not the test execution will produce a warning only on error for this assert. */ - @Child(name = "warningOnly", type = {BooleanType.class}, order=18, min=0, max=1, modifier=false, summary=false) + @Child(name = "warningOnly", type = {BooleanType.class}, order=20, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Will this assert produce a warning only on error?", formalDefinition="Whether or not the test execution will produce a warning only on error for this assert." ) protected BooleanType warningOnly; - private static final long serialVersionUID = -607939856L; + private static final long serialVersionUID = -561290310L; /** * Constructor @@ -4957,7 +5596,7 @@ public class TestScript extends DomainResource { } /** - * @return {@link #minimumId} (The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId.). This is the underlying object with id, value and extensions. The accessor "getMinimumId" gives direct access to the value + * @return {@link #minimumId} (The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.). This is the underlying object with id, value and extensions. The accessor "getMinimumId" gives direct access to the value */ public StringType getMinimumIdElement() { if (this.minimumId == null) @@ -4977,7 +5616,7 @@ public class TestScript extends DomainResource { } /** - * @param value {@link #minimumId} (The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId.). This is the underlying object with id, value and extensions. The accessor "getMinimumId" gives direct access to the value + * @param value {@link #minimumId} (The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.). This is the underlying object with id, value and extensions. The accessor "getMinimumId" gives direct access to the value */ public SetupActionAssertComponent setMinimumIdElement(StringType value) { this.minimumId = value; @@ -4985,14 +5624,14 @@ public class TestScript extends DomainResource { } /** - * @return The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId. + * @return The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. */ public String getMinimumId() { return this.minimumId == null ? null : this.minimumId.getValue(); } /** - * @param value The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId. + * @param value The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. */ public SetupActionAssertComponent setMinimumId(String value) { if (Utilities.noString(value)) @@ -5295,6 +5934,54 @@ public class TestScript extends DomainResource { return this; } + /** + * @return {@link #rule} (The TestScript.rule id value this assert will evaluate.) + */ + public SetupActionAssertRuleComponent getRule() { + if (this.rule == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SetupActionAssertComponent.rule"); + else if (Configuration.doAutoCreate()) + this.rule = new SetupActionAssertRuleComponent(); // cc + return this.rule; + } + + public boolean hasRule() { + return this.rule != null && !this.rule.isEmpty(); + } + + /** + * @param value {@link #rule} (The TestScript.rule id value this assert will evaluate.) + */ + public SetupActionAssertComponent setRule(SetupActionAssertRuleComponent value) { + this.rule = value; + return this; + } + + /** + * @return {@link #ruleset} (The TestScript.ruleset id value this assert will evaluate.) + */ + public SetupActionAssertRulesetComponent getRuleset() { + if (this.ruleset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SetupActionAssertComponent.ruleset"); + else if (Configuration.doAutoCreate()) + this.ruleset = new SetupActionAssertRulesetComponent(); // cc + return this.ruleset; + } + + public boolean hasRuleset() { + return this.ruleset != null && !this.ruleset.isEmpty(); + } + + /** + * @param value {@link #ruleset} (The TestScript.ruleset id value this assert will evaluate.) + */ + public SetupActionAssertComponent setRuleset(SetupActionAssertRulesetComponent value) { + this.ruleset = value; + return this; + } + /** * @return {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression or the headerField against.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value */ @@ -5496,13 +6183,15 @@ public class TestScript extends DomainResource { childrenList.add(new Property("compareToSourcePath", "string", "XPath or JSONPath expression against fixture used to compare the \"sourceId/path\" evaluations to.", 0, java.lang.Integer.MAX_VALUE, compareToSourcePath)); childrenList.add(new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, java.lang.Integer.MAX_VALUE, contentType)); childrenList.add(new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, java.lang.Integer.MAX_VALUE, headerField)); - childrenList.add(new Property("minimumId", "string", "The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId.", 0, java.lang.Integer.MAX_VALUE, minimumId)); + childrenList.add(new Property("minimumId", "string", "The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.", 0, java.lang.Integer.MAX_VALUE, minimumId)); childrenList.add(new Property("navigationLinks", "boolean", "Whether or not the test execution performs validation on the bundle navigation links.", 0, java.lang.Integer.MAX_VALUE, navigationLinks)); childrenList.add(new Property("operator", "code", "The operator type.", 0, java.lang.Integer.MAX_VALUE, operator)); childrenList.add(new Property("path", "string", "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.", 0, java.lang.Integer.MAX_VALUE, path)); childrenList.add(new Property("resource", "code", "The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.", 0, java.lang.Integer.MAX_VALUE, resource)); childrenList.add(new Property("response", "code", "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", 0, java.lang.Integer.MAX_VALUE, response)); childrenList.add(new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, java.lang.Integer.MAX_VALUE, responseCode)); + childrenList.add(new Property("rule", "", "The TestScript.rule id value this assert will evaluate.", 0, java.lang.Integer.MAX_VALUE, rule)); + childrenList.add(new Property("ruleset", "", "The TestScript.ruleset id value this assert will evaluate.", 0, java.lang.Integer.MAX_VALUE, ruleset)); childrenList.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against.", 0, java.lang.Integer.MAX_VALUE, sourceId)); childrenList.add(new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, java.lang.Integer.MAX_VALUE, validateProfileId)); childrenList.add(new Property("value", "string", "The value to compare to.", 0, java.lang.Integer.MAX_VALUE, value)); @@ -5539,6 +6228,10 @@ public class TestScript extends DomainResource { this.response = new AssertionResponseTypesEnumFactory().fromType(value); // Enumeration else if (name.equals("responseCode")) this.responseCode = castToString(value); // StringType + else if (name.equals("rule")) + this.rule = (SetupActionAssertRuleComponent) value; // SetupActionAssertRuleComponent + else if (name.equals("ruleset")) + this.ruleset = (SetupActionAssertRulesetComponent) value; // SetupActionAssertRulesetComponent else if (name.equals("sourceId")) this.sourceId = castToId(value); // IdType else if (name.equals("validateProfileId")) @@ -5595,6 +6288,14 @@ public class TestScript extends DomainResource { else if (name.equals("responseCode")) { throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseCode"); } + else if (name.equals("rule")) { + this.rule = new SetupActionAssertRuleComponent(); + return this.rule; + } + else if (name.equals("ruleset")) { + this.ruleset = new SetupActionAssertRulesetComponent(); + return this.ruleset; + } else if (name.equals("sourceId")) { throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); } @@ -5628,6 +6329,8 @@ public class TestScript extends DomainResource { dst.resource = resource == null ? null : resource.copy(); dst.response = response == null ? null : response.copy(); dst.responseCode = responseCode == null ? null : responseCode.copy(); + dst.rule = rule == null ? null : rule.copy(); + dst.ruleset = ruleset == null ? null : ruleset.copy(); dst.sourceId = sourceId == null ? null : sourceId.copy(); dst.validateProfileId = validateProfileId == null ? null : validateProfileId.copy(); dst.value = value == null ? null : value.copy(); @@ -5647,9 +6350,9 @@ public class TestScript extends DomainResource { && compareDeep(contentType, o.contentType, true) && compareDeep(headerField, o.headerField, true) && compareDeep(minimumId, o.minimumId, true) && compareDeep(navigationLinks, o.navigationLinks, true) && compareDeep(operator, o.operator, true) && compareDeep(path, o.path, true) && compareDeep(resource, o.resource, true) - && compareDeep(response, o.response, true) && compareDeep(responseCode, o.responseCode, true) && compareDeep(sourceId, o.sourceId, true) - && compareDeep(validateProfileId, o.validateProfileId, true) && compareDeep(value, o.value, true) - && compareDeep(warningOnly, o.warningOnly, true); + && compareDeep(response, o.response, true) && compareDeep(responseCode, o.responseCode, true) && compareDeep(rule, o.rule, true) + && compareDeep(ruleset, o.ruleset, true) && compareDeep(sourceId, o.sourceId, true) && compareDeep(validateProfileId, o.validateProfileId, true) + && compareDeep(value, o.value, true) && compareDeep(warningOnly, o.warningOnly, true); } @Override @@ -5670,15 +6373,10 @@ public class TestScript extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (label == null || label.isEmpty()) && (description == null || description.isEmpty()) - && (direction == null || direction.isEmpty()) && (compareToSourceId == null || compareToSourceId.isEmpty()) - && (compareToSourcePath == null || compareToSourcePath.isEmpty()) && (contentType == null || contentType.isEmpty()) - && (headerField == null || headerField.isEmpty()) && (minimumId == null || minimumId.isEmpty()) - && (navigationLinks == null || navigationLinks.isEmpty()) && (operator == null || operator.isEmpty()) - && (path == null || path.isEmpty()) && (resource == null || resource.isEmpty()) && (response == null || response.isEmpty()) - && (responseCode == null || responseCode.isEmpty()) && (sourceId == null || sourceId.isEmpty()) - && (validateProfileId == null || validateProfileId.isEmpty()) && (value == null || value.isEmpty()) - && (warningOnly == null || warningOnly.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( label, description, direction + , compareToSourceId, compareToSourcePath, contentType, headerField, minimumId, navigationLinks + , operator, path, resource, response, responseCode, rule, ruleset, sourceId, validateProfileId + , value, warningOnly); } public String fhirType() { @@ -5686,6 +6384,754 @@ public class TestScript extends DomainResource { } + } + + @Block() + public static class SetupActionAssertRuleComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Each rule template can take one or more parameters for rule evaluation. + */ + @Child(name = "param", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) + protected List param; + + private static final long serialVersionUID = 791319302L; + + /** + * Constructor + */ + public SetupActionAssertRuleComponent() { + super(); + } + + /** + * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) + */ + public List getParam() { + if (this.param == null) + this.param = new ArrayList(); + return this.param; + } + + public boolean hasParam() { + if (this.param == null) + return false; + for (SetupActionAssertRuleParamComponent item : this.param) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) + */ + // syntactic sugar + public SetupActionAssertRuleParamComponent addParam() { //3 + SetupActionAssertRuleParamComponent t = new SetupActionAssertRuleParamComponent(); + if (this.param == null) + this.param = new ArrayList(); + this.param.add(t); + return t; + } + + // syntactic sugar + public SetupActionAssertRuleComponent addParam(SetupActionAssertRuleParamComponent t) { //3 + if (t == null) + return this; + if (this.param == null) + this.param = new ArrayList(); + this.param.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("param")) + this.getParam().add((SetupActionAssertRuleParamComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("param")) { + return addParam(); + } + else + return super.addChild(name); + } + + public SetupActionAssertRuleComponent copy() { + SetupActionAssertRuleComponent dst = new SetupActionAssertRuleComponent(); + copyValues(dst); + if (param != null) { + dst.param = new ArrayList(); + for (SetupActionAssertRuleParamComponent i : param) + dst.param.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SetupActionAssertRuleComponent)) + return false; + SetupActionAssertRuleComponent o = (SetupActionAssertRuleComponent) other; + return compareDeep(param, o.param, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SetupActionAssertRuleComponent)) + return false; + SetupActionAssertRuleComponent o = (SetupActionAssertRuleComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( param); + } + + public String fhirType() { + return "TestScript.setup.action.assert.rule"; + + } + + } + + @Block() + public static class SetupActionAssertRuleParamComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Descriptive name for this parameter that matches the external assert rule parameter name. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Parameter name matching external assert rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert rule parameter name." ) + protected StringType name; + + /** + * The value for the parameter that will be passed on to the external rule template. + */ + @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Parameter value defined either explicitly or dynamically", formalDefinition="The value for the parameter that will be passed on to the external rule template." ) + protected StringType value; + + private static final long serialVersionUID = 395259392L; + + /** + * Constructor + */ + public SetupActionAssertRuleParamComponent() { + super(); + } + + /** + * Constructor + */ + public SetupActionAssertRuleParamComponent(StringType name, StringType value) { + super(); + this.name = name; + this.value = value; + } + + /** + * @return {@link #name} (Descriptive name for this parameter that matches the external assert rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SetupActionAssertRuleParamComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Descriptive name for this parameter that matches the external assert rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public SetupActionAssertRuleParamComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return Descriptive name for this parameter that matches the external assert rule parameter name. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Descriptive name for this parameter that matches the external assert rule parameter name. + */ + public SetupActionAssertRuleParamComponent setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #value} (The value for the parameter that will be passed on to the external rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public StringType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SetupActionAssertRuleParamComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new StringType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The value for the parameter that will be passed on to the external rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public SetupActionAssertRuleParamComponent setValueElement(StringType value) { + this.value = value; + return this; + } + + /** + * @return The value for the parameter that will be passed on to the external rule template. + */ + public String getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value The value for the parameter that will be passed on to the external rule template. + */ + public SetupActionAssertRuleParamComponent setValue(String value) { + if (this.value == null) + this.value = new StringType(); + this.value.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("value", "string", "The value for the parameter that will be passed on to the external rule template.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("value")) + this.value = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); + } + else + return super.addChild(name); + } + + public SetupActionAssertRuleParamComponent copy() { + SetupActionAssertRuleParamComponent dst = new SetupActionAssertRuleParamComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SetupActionAssertRuleParamComponent)) + return false; + SetupActionAssertRuleParamComponent o = (SetupActionAssertRuleParamComponent) other; + return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SetupActionAssertRuleParamComponent)) + return false; + SetupActionAssertRuleParamComponent o = (SetupActionAssertRuleParamComponent) other; + return compareValues(name, o.name, true) && compareValues(value, o.value, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, value); + } + + public String fhirType() { + return "TestScript.setup.action.assert.rule.param"; + + } + + } + + @Block() + public static class SetupActionAssertRulesetComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Id of the referenced rule within the external ruleset template. + */ + @Child(name = "rule", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Id of referenced rule within the ruleset", formalDefinition="Id of the referenced rule within the external ruleset template." ) + protected List rule; + + private static final long serialVersionUID = 2134080946L; + + /** + * Constructor + */ + public SetupActionAssertRulesetComponent() { + super(); + } + + /** + * @return {@link #rule} (Id of the referenced rule within the external ruleset template.) + */ + public List getRule() { + if (this.rule == null) + this.rule = new ArrayList(); + return this.rule; + } + + public boolean hasRule() { + if (this.rule == null) + return false; + for (SetupActionAssertRulesetRuleComponent item : this.rule) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #rule} (Id of the referenced rule within the external ruleset template.) + */ + // syntactic sugar + public SetupActionAssertRulesetRuleComponent addRule() { //3 + SetupActionAssertRulesetRuleComponent t = new SetupActionAssertRulesetRuleComponent(); + if (this.rule == null) + this.rule = new ArrayList(); + this.rule.add(t); + return t; + } + + // syntactic sugar + public SetupActionAssertRulesetComponent addRule(SetupActionAssertRulesetRuleComponent t) { //3 + if (t == null) + return this; + if (this.rule == null) + this.rule = new ArrayList(); + this.rule.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("rule", "", "Id of the referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("rule")) + this.getRule().add((SetupActionAssertRulesetRuleComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("rule")) { + return addRule(); + } + else + return super.addChild(name); + } + + public SetupActionAssertRulesetComponent copy() { + SetupActionAssertRulesetComponent dst = new SetupActionAssertRulesetComponent(); + copyValues(dst); + if (rule != null) { + dst.rule = new ArrayList(); + for (SetupActionAssertRulesetRuleComponent i : rule) + dst.rule.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SetupActionAssertRulesetComponent)) + return false; + SetupActionAssertRulesetComponent o = (SetupActionAssertRulesetComponent) other; + return compareDeep(rule, o.rule, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SetupActionAssertRulesetComponent)) + return false; + SetupActionAssertRulesetComponent o = (SetupActionAssertRulesetComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( rule); + } + + public String fhirType() { + return "TestScript.setup.action.assert.ruleset"; + + } + + } + + @Block() + public static class SetupActionAssertRulesetRuleComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Each rule template can take one or more parameters for rule evaluation. + */ + @Child(name = "param", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) + protected List param; + + private static final long serialVersionUID = -905162350L; + + /** + * Constructor + */ + public SetupActionAssertRulesetRuleComponent() { + super(); + } + + /** + * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) + */ + public List getParam() { + if (this.param == null) + this.param = new ArrayList(); + return this.param; + } + + public boolean hasParam() { + if (this.param == null) + return false; + for (SetupActionAssertRulesetRuleParamComponent item : this.param) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) + */ + // syntactic sugar + public SetupActionAssertRulesetRuleParamComponent addParam() { //3 + SetupActionAssertRulesetRuleParamComponent t = new SetupActionAssertRulesetRuleParamComponent(); + if (this.param == null) + this.param = new ArrayList(); + this.param.add(t); + return t; + } + + // syntactic sugar + public SetupActionAssertRulesetRuleComponent addParam(SetupActionAssertRulesetRuleParamComponent t) { //3 + if (t == null) + return this; + if (this.param == null) + this.param = new ArrayList(); + this.param.add(t); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("param")) + this.getParam().add((SetupActionAssertRulesetRuleParamComponent) value); + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("param")) { + return addParam(); + } + else + return super.addChild(name); + } + + public SetupActionAssertRulesetRuleComponent copy() { + SetupActionAssertRulesetRuleComponent dst = new SetupActionAssertRulesetRuleComponent(); + copyValues(dst); + if (param != null) { + dst.param = new ArrayList(); + for (SetupActionAssertRulesetRuleParamComponent i : param) + dst.param.add(i.copy()); + }; + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SetupActionAssertRulesetRuleComponent)) + return false; + SetupActionAssertRulesetRuleComponent o = (SetupActionAssertRulesetRuleComponent) other; + return compareDeep(param, o.param, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SetupActionAssertRulesetRuleComponent)) + return false; + SetupActionAssertRulesetRuleComponent o = (SetupActionAssertRulesetRuleComponent) other; + return true; + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( param); + } + + public String fhirType() { + return "TestScript.setup.action.assert.ruleset.rule"; + + } + + } + + @Block() + public static class SetupActionAssertRulesetRuleParamComponent extends BackboneElement implements IBaseBackboneElement { + /** + * Descriptive name for this parameter that matches the external assert ruleset rule parameter name. + */ + @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Parameter name matching external assert ruleset rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert ruleset rule parameter name." ) + protected StringType name; + + /** + * The value for the parameter that will be passed on to the external ruleset rule template. + */ + @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="Parameter value defined either explicitly or dynamically", formalDefinition="The value for the parameter that will be passed on to the external ruleset rule template." ) + protected StringType value; + + private static final long serialVersionUID = 395259392L; + + /** + * Constructor + */ + public SetupActionAssertRulesetRuleParamComponent() { + super(); + } + + /** + * Constructor + */ + public SetupActionAssertRulesetRuleParamComponent(StringType name, StringType value) { + super(); + this.name = name; + this.value = value; + } + + /** + * @return {@link #name} (Descriptive name for this parameter that matches the external assert ruleset rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public StringType getNameElement() { + if (this.name == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SetupActionAssertRulesetRuleParamComponent.name"); + else if (Configuration.doAutoCreate()) + this.name = new StringType(); // bb + return this.name; + } + + public boolean hasNameElement() { + return this.name != null && !this.name.isEmpty(); + } + + public boolean hasName() { + return this.name != null && !this.name.isEmpty(); + } + + /** + * @param value {@link #name} (Descriptive name for this parameter that matches the external assert ruleset rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value + */ + public SetupActionAssertRulesetRuleParamComponent setNameElement(StringType value) { + this.name = value; + return this; + } + + /** + * @return Descriptive name for this parameter that matches the external assert ruleset rule parameter name. + */ + public String getName() { + return this.name == null ? null : this.name.getValue(); + } + + /** + * @param value Descriptive name for this parameter that matches the external assert ruleset rule parameter name. + */ + public SetupActionAssertRulesetRuleParamComponent setName(String value) { + if (this.name == null) + this.name = new StringType(); + this.name.setValue(value); + return this; + } + + /** + * @return {@link #value} (The value for the parameter that will be passed on to the external ruleset rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public StringType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create SetupActionAssertRulesetRuleParamComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new StringType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The value for the parameter that will be passed on to the external ruleset rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public SetupActionAssertRulesetRuleParamComponent setValueElement(StringType value) { + this.value = value; + return this; + } + + /** + * @return The value for the parameter that will be passed on to the external ruleset rule template. + */ + public String getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value The value for the parameter that will be passed on to the external ruleset rule template. + */ + public SetupActionAssertRulesetRuleParamComponent setValue(String value) { + if (this.value == null) + this.value = new StringType(); + this.value.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, java.lang.Integer.MAX_VALUE, name)); + childrenList.add(new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("name")) + this.name = castToString(value); // StringType + else if (name.equals("value")) + this.value = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("name")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); + } + else + return super.addChild(name); + } + + public SetupActionAssertRulesetRuleParamComponent copy() { + SetupActionAssertRulesetRuleParamComponent dst = new SetupActionAssertRulesetRuleParamComponent(); + copyValues(dst); + dst.name = name == null ? null : name.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof SetupActionAssertRulesetRuleParamComponent)) + return false; + SetupActionAssertRulesetRuleParamComponent o = (SetupActionAssertRulesetRuleParamComponent) other; + return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof SetupActionAssertRulesetRuleParamComponent)) + return false; + SetupActionAssertRulesetRuleParamComponent o = (SetupActionAssertRulesetRuleParamComponent) other; + return compareValues(name, o.name, true) && compareValues(value, o.value, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, value); + } + + public String fhirType() { + return "TestScript.setup.action.assert.ruleset.rule.param"; + + } + } @Block() @@ -5966,8 +7412,8 @@ public class TestScript extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (description == null || description.isEmpty()) - && (metadata == null || metadata.isEmpty()) && (action == null || action.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, description, metadata, action + ); } public String fhirType() { @@ -6109,8 +7555,7 @@ public class TestScript extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (operation == null || operation.isEmpty()) && (assert_ == null || assert_.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( operation, assert_); } public String fhirType() { @@ -6232,7 +7677,7 @@ public class TestScript extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (action == null || action.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( action); } public String fhirType() { @@ -6335,7 +7780,7 @@ public class TestScript extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (operation == null || operation.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( operation); } public String fhirType() { @@ -6436,45 +7881,38 @@ public class TestScript extends DomainResource { @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings." ) protected StringType copyright; - /** - * The required capability must exist and are assumed to function correctly on the FHIR server being tested. - */ - @Child(name = "metadata", type = {}, order=13, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Required capability that is assumed to function correctly on the FHIR server being tested", formalDefinition="The required capability must exist and are assumed to function correctly on the FHIR server being tested." ) - protected TestScriptMetadataComponent metadata; - /** * An abstract server used in operations within this test script in the origin element. */ - @Child(name = "origin", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "origin", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="An abstract server representing a client or sender in a message exchange", formalDefinition="An abstract server used in operations within this test script in the origin element." ) protected List origin; /** * An abstract server used in operations within this test script in the destination element. */ - @Child(name = "destination", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "destination", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="An abstract server representing a destination or receiver in a message exchange", formalDefinition="An abstract server used in operations within this test script in the destination element." ) protected List destination; /** - * If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified. + * The required capability must exist and are assumed to function correctly on the FHIR server being tested. */ - @Child(name = "multiserver", type = {BooleanType.class}, order=16, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Whether or not the tests apply to more than one FHIR server", formalDefinition="If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified." ) - protected BooleanType multiserver; + @Child(name = "metadata", type = {}, order=15, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Required capability that is assumed to function correctly on the FHIR server being tested", formalDefinition="The required capability must exist and are assumed to function correctly on the FHIR server being tested." ) + protected TestScriptMetadataComponent metadata; /** * Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute. */ - @Child(name = "fixture", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "fixture", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Fixture in the test script - by reference (uri)", formalDefinition="Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute." ) protected List fixture; /** * Reference to the profile to be used for validation. */ - @Child(name = "profile", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "profile", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Reference of the validation profile", formalDefinition="Reference to the profile to be used for validation." ) protected List profile; /** @@ -6486,32 +7924,46 @@ public class TestScript extends DomainResource { /** * Variable is set based either on element value in response body or on header field value in the response headers. */ - @Child(name = "variable", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "variable", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Placeholder for evaluated elements", formalDefinition="Variable is set based either on element value in response body or on header field value in the response headers." ) protected List variable; + /** + * Assert rule to be used in one or more asserts within the test script. + */ + @Child(name = "rule", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Assert rule used within the test script", formalDefinition="Assert rule to be used in one or more asserts within the test script." ) + protected List rule; + + /** + * Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied. + */ + @Child(name = "ruleset", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Description(shortDefinition="Assert ruleset used within the test script", formalDefinition="Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied." ) + protected List ruleset; + /** * A series of required setup operations before tests are executed. */ - @Child(name = "setup", type = {}, order=20, min=0, max=1, modifier=false, summary=false) + @Child(name = "setup", type = {}, order=21, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="A series of required setup operations before tests are executed", formalDefinition="A series of required setup operations before tests are executed." ) protected TestScriptSetupComponent setup; /** * A test in this script. */ - @Child(name = "test", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "test", type = {}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="A test in this script", formalDefinition="A test in this script." ) protected List test; /** * A series of operations required to clean up after the all the tests are executed (successfully or otherwise). */ - @Child(name = "teardown", type = {}, order=22, min=0, max=1, modifier=false, summary=false) + @Child(name = "teardown", type = {}, order=23, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="A series of required clean up steps", formalDefinition="A series of operations required to clean up after the all the tests are executed (successfully or otherwise)." ) protected TestScriptTeardownComponent teardown; - private static final long serialVersionUID = -1185376163L; + private static final long serialVersionUID = -468958725L; /** * Constructor @@ -7108,30 +8560,6 @@ public class TestScript extends DomainResource { return this; } - /** - * @return {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) - */ - public TestScriptMetadataComponent getMetadata() { - if (this.metadata == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TestScript.metadata"); - else if (Configuration.doAutoCreate()) - this.metadata = new TestScriptMetadataComponent(); // cc - return this.metadata; - } - - public boolean hasMetadata() { - return this.metadata != null && !this.metadata.isEmpty(); - } - - /** - * @param value {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) - */ - public TestScript setMetadata(TestScriptMetadataComponent value) { - this.metadata = value; - return this; - } - /** * @return {@link #origin} (An abstract server used in operations within this test script in the origin element.) */ @@ -7213,47 +8641,26 @@ public class TestScript extends DomainResource { } /** - * @return {@link #multiserver} (If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.). This is the underlying object with id, value and extensions. The accessor "getMultiserver" gives direct access to the value + * @return {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) */ - public BooleanType getMultiserverElement() { - if (this.multiserver == null) + public TestScriptMetadataComponent getMetadata() { + if (this.metadata == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TestScript.multiserver"); + throw new Error("Attempt to auto-create TestScript.metadata"); else if (Configuration.doAutoCreate()) - this.multiserver = new BooleanType(); // bb - return this.multiserver; + this.metadata = new TestScriptMetadataComponent(); // cc + return this.metadata; } - public boolean hasMultiserverElement() { - return this.multiserver != null && !this.multiserver.isEmpty(); - } - - public boolean hasMultiserver() { - return this.multiserver != null && !this.multiserver.isEmpty(); + public boolean hasMetadata() { + return this.metadata != null && !this.metadata.isEmpty(); } /** - * @param value {@link #multiserver} (If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.). This is the underlying object with id, value and extensions. The accessor "getMultiserver" gives direct access to the value + * @param value {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) */ - public TestScript setMultiserverElement(BooleanType value) { - this.multiserver = value; - return this; - } - - /** - * @return If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified. - */ - public boolean getMultiserver() { - return this.multiserver == null || this.multiserver.isEmpty() ? false : this.multiserver.getValue(); - } - - /** - * @param value If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified. - */ - public TestScript setMultiserver(boolean value) { - if (this.multiserver == null) - this.multiserver = new BooleanType(); - this.multiserver.setValue(value); + public TestScript setMetadata(TestScriptMetadataComponent value) { + this.metadata = value; return this; } @@ -7386,6 +8793,86 @@ public class TestScript extends DomainResource { return this; } + /** + * @return {@link #rule} (Assert rule to be used in one or more asserts within the test script.) + */ + public List getRule() { + if (this.rule == null) + this.rule = new ArrayList(); + return this.rule; + } + + public boolean hasRule() { + if (this.rule == null) + return false; + for (TestScriptRuleComponent item : this.rule) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #rule} (Assert rule to be used in one or more asserts within the test script.) + */ + // syntactic sugar + public TestScriptRuleComponent addRule() { //3 + TestScriptRuleComponent t = new TestScriptRuleComponent(); + if (this.rule == null) + this.rule = new ArrayList(); + this.rule.add(t); + return t; + } + + // syntactic sugar + public TestScript addRule(TestScriptRuleComponent t) { //3 + if (t == null) + return this; + if (this.rule == null) + this.rule = new ArrayList(); + this.rule.add(t); + return this; + } + + /** + * @return {@link #ruleset} (Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.) + */ + public List getRuleset() { + if (this.ruleset == null) + this.ruleset = new ArrayList(); + return this.ruleset; + } + + public boolean hasRuleset() { + if (this.ruleset == null) + return false; + for (TestScriptRulesetComponent item : this.ruleset) + if (!item.isEmpty()) + return true; + return false; + } + + /** + * @return {@link #ruleset} (Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.) + */ + // syntactic sugar + public TestScriptRulesetComponent addRuleset() { //3 + TestScriptRulesetComponent t = new TestScriptRulesetComponent(); + if (this.ruleset == null) + this.ruleset = new ArrayList(); + this.ruleset.add(t); + return t; + } + + // syntactic sugar + public TestScript addRuleset(TestScriptRulesetComponent t) { //3 + if (t == null) + return this; + if (this.ruleset == null) + this.ruleset = new ArrayList(); + this.ruleset.add(t); + return this; + } + /** * @return {@link #setup} (A series of required setup operations before tests are executed.) */ @@ -7489,13 +8976,14 @@ public class TestScript extends DomainResource { childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of Test Scripts.", 0, java.lang.Integer.MAX_VALUE, useContext)); childrenList.add(new Property("requirements", "string", "Explains why this Test Script is needed and why it's been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); childrenList.add(new Property("copyright", "string", "A copyright statement relating to the Test Script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.", 0, java.lang.Integer.MAX_VALUE, copyright)); - childrenList.add(new Property("metadata", "", "The required capability must exist and are assumed to function correctly on the FHIR server being tested.", 0, java.lang.Integer.MAX_VALUE, metadata)); childrenList.add(new Property("origin", "", "An abstract server used in operations within this test script in the origin element.", 0, java.lang.Integer.MAX_VALUE, origin)); childrenList.add(new Property("destination", "", "An abstract server used in operations within this test script in the destination element.", 0, java.lang.Integer.MAX_VALUE, destination)); - childrenList.add(new Property("multiserver", "boolean", "If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.", 0, java.lang.Integer.MAX_VALUE, multiserver)); + childrenList.add(new Property("metadata", "", "The required capability must exist and are assumed to function correctly on the FHIR server being tested.", 0, java.lang.Integer.MAX_VALUE, metadata)); childrenList.add(new Property("fixture", "", "Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.", 0, java.lang.Integer.MAX_VALUE, fixture)); childrenList.add(new Property("profile", "Reference(Any)", "Reference to the profile to be used for validation.", 0, java.lang.Integer.MAX_VALUE, profile)); childrenList.add(new Property("variable", "", "Variable is set based either on element value in response body or on header field value in the response headers.", 0, java.lang.Integer.MAX_VALUE, variable)); + childrenList.add(new Property("rule", "", "Assert rule to be used in one or more asserts within the test script.", 0, java.lang.Integer.MAX_VALUE, rule)); + childrenList.add(new Property("ruleset", "", "Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.", 0, java.lang.Integer.MAX_VALUE, ruleset)); childrenList.add(new Property("setup", "", "A series of required setup operations before tests are executed.", 0, java.lang.Integer.MAX_VALUE, setup)); childrenList.add(new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test)); childrenList.add(new Property("teardown", "", "A series of operations required to clean up after the all the tests are executed (successfully or otherwise).", 0, java.lang.Integer.MAX_VALUE, teardown)); @@ -7529,20 +9017,22 @@ public class TestScript extends DomainResource { this.requirements = castToString(value); // StringType else if (name.equals("copyright")) this.copyright = castToString(value); // StringType - else if (name.equals("metadata")) - this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent else if (name.equals("origin")) this.getOrigin().add((TestScriptOriginComponent) value); else if (name.equals("destination")) this.getDestination().add((TestScriptDestinationComponent) value); - else if (name.equals("multiserver")) - this.multiserver = castToBoolean(value); // BooleanType + else if (name.equals("metadata")) + this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent else if (name.equals("fixture")) this.getFixture().add((TestScriptFixtureComponent) value); else if (name.equals("profile")) this.getProfile().add(castToReference(value)); else if (name.equals("variable")) this.getVariable().add((TestScriptVariableComponent) value); + else if (name.equals("rule")) + this.getRule().add((TestScriptRuleComponent) value); + else if (name.equals("ruleset")) + this.getRuleset().add((TestScriptRulesetComponent) value); else if (name.equals("setup")) this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent else if (name.equals("test")) @@ -7595,18 +9085,15 @@ public class TestScript extends DomainResource { else if (name.equals("copyright")) { throw new FHIRException("Cannot call addChild on a primitive type TestScript.copyright"); } - else if (name.equals("metadata")) { - this.metadata = new TestScriptMetadataComponent(); - return this.metadata; - } else if (name.equals("origin")) { return addOrigin(); } else if (name.equals("destination")) { return addDestination(); } - else if (name.equals("multiserver")) { - throw new FHIRException("Cannot call addChild on a primitive type TestScript.multiserver"); + else if (name.equals("metadata")) { + this.metadata = new TestScriptMetadataComponent(); + return this.metadata; } else if (name.equals("fixture")) { return addFixture(); @@ -7617,6 +9104,12 @@ public class TestScript extends DomainResource { else if (name.equals("variable")) { return addVariable(); } + else if (name.equals("rule")) { + return addRule(); + } + else if (name.equals("ruleset")) { + return addRuleset(); + } else if (name.equals("setup")) { this.setup = new TestScriptSetupComponent(); return this.setup; @@ -7661,7 +9154,6 @@ public class TestScript extends DomainResource { }; dst.requirements = requirements == null ? null : requirements.copy(); dst.copyright = copyright == null ? null : copyright.copy(); - dst.metadata = metadata == null ? null : metadata.copy(); if (origin != null) { dst.origin = new ArrayList(); for (TestScriptOriginComponent i : origin) @@ -7672,7 +9164,7 @@ public class TestScript extends DomainResource { for (TestScriptDestinationComponent i : destination) dst.destination.add(i.copy()); }; - dst.multiserver = multiserver == null ? null : multiserver.copy(); + dst.metadata = metadata == null ? null : metadata.copy(); if (fixture != null) { dst.fixture = new ArrayList(); for (TestScriptFixtureComponent i : fixture) @@ -7688,6 +9180,16 @@ public class TestScript extends DomainResource { for (TestScriptVariableComponent i : variable) dst.variable.add(i.copy()); }; + if (rule != null) { + dst.rule = new ArrayList(); + for (TestScriptRuleComponent i : rule) + dst.rule.add(i.copy()); + }; + if (ruleset != null) { + dst.ruleset = new ArrayList(); + for (TestScriptRulesetComponent i : ruleset) + dst.ruleset.add(i.copy()); + }; dst.setup = setup == null ? null : setup.copy(); if (test != null) { dst.test = new ArrayList(); @@ -7714,10 +9216,10 @@ public class TestScript extends DomainResource { && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) && compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true) && compareDeep(requirements, o.requirements, true) && compareDeep(copyright, o.copyright, true) - && compareDeep(metadata, o.metadata, true) && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) - && compareDeep(multiserver, o.multiserver, true) && compareDeep(fixture, o.fixture, true) && compareDeep(profile, o.profile, true) - && compareDeep(variable, o.variable, true) && compareDeep(setup, o.setup, true) && compareDeep(test, o.test, true) - && compareDeep(teardown, o.teardown, true); + && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(metadata, o.metadata, true) + && compareDeep(fixture, o.fixture, true) && compareDeep(profile, o.profile, true) && compareDeep(variable, o.variable, true) + && compareDeep(rule, o.rule, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(setup, o.setup, true) + && compareDeep(test, o.test, true) && compareDeep(teardown, o.teardown, true); } @Override @@ -7730,20 +9232,14 @@ public class TestScript extends DomainResource { return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) && compareValues(date, o.date, true) && compareValues(description, o.description, true) && compareValues(requirements, o.requirements, true) - && compareValues(copyright, o.copyright, true) && compareValues(multiserver, o.multiserver, true); + && compareValues(copyright, o.copyright, true); } public boolean isEmpty() { - return super.isEmpty() && (url == null || url.isEmpty()) && (version == null || version.isEmpty()) - && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty()) - && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty()) - && (useContext == null || useContext.isEmpty()) && (requirements == null || requirements.isEmpty()) - && (copyright == null || copyright.isEmpty()) && (metadata == null || metadata.isEmpty()) - && (origin == null || origin.isEmpty()) && (destination == null || destination.isEmpty()) - && (multiserver == null || multiserver.isEmpty()) && (fixture == null || fixture.isEmpty()) - && (profile == null || profile.isEmpty()) && (variable == null || variable.isEmpty()) && (setup == null || setup.isEmpty()) - && (test == null || test.isEmpty()) && (teardown == null || teardown.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, version, name, status, identifier + , experimental, publisher, contact, date, description, useContext, requirements, copyright + , origin, destination, metadata, fixture, profile, variable, rule, ruleset, setup, test + , teardown); } @Override diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Timing.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Timing.java index 7affd7b12cc..d32e2f42804 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Timing.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Timing.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -39,9 +39,8 @@ import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * Specifies an event that may occur multiple times. Timing schedules are used to record when things are expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds. */ @@ -510,70 +509,84 @@ public class Timing extends Type implements ICompositeType { @Description(shortDefinition="Number of times to repeat", formalDefinition="A total count of the desired number of repetitions." ) protected IntegerType count; + /** + * A maximum value for the count of the desired repetitions (e.g. do something 6-8 times). + */ + @Child(name = "countMax", type = {IntegerType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Maximum number of times to repeat", formalDefinition="A maximum value for the count of the desired repetitions (e.g. do something 6-8 times)." ) + protected IntegerType countMax; + /** * How long this thing happens for when it happens. */ - @Child(name = "duration", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Child(name = "duration", type = {DecimalType.class}, order=4, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="How long when it happens", formalDefinition="How long this thing happens for when it happens." ) protected DecimalType duration; /** * The upper limit of how long this thing happens for when it happens. */ - @Child(name = "durationMax", type = {DecimalType.class}, order=4, min=0, max=1, modifier=false, summary=true) + @Child(name = "durationMax", type = {DecimalType.class}, order=5, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="How long when it happens (Max)", formalDefinition="The upper limit of how long this thing happens for when it happens." ) protected DecimalType durationMax; /** * The units of time for the duration, in UCUM units. */ - @Child(name = "durationUnits", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true) + @Child(name = "durationUnit", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="s | min | h | d | wk | mo | a - unit of time (UCUM)", formalDefinition="The units of time for the duration, in UCUM units." ) - protected Enumeration durationUnits; + protected Enumeration durationUnit; /** * The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided). */ - @Child(name = "frequency", type = {IntegerType.class}, order=6, min=0, max=1, modifier=false, summary=true) + @Child(name = "frequency", type = {IntegerType.class}, order=7, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Event occurs frequency times per period", formalDefinition="The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided)." ) protected IntegerType frequency; /** * If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range. */ - @Child(name = "frequencyMax", type = {IntegerType.class}, order=7, min=0, max=1, modifier=false, summary=true) + @Child(name = "frequencyMax", type = {IntegerType.class}, order=8, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Event occurs up to frequencyMax times per period", formalDefinition="If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range." ) protected IntegerType frequencyMax; /** * Indicates the duration of time over which repetitions are to occur; e.g. to express "3 times per day", 3 would be the frequency and "1 day" would be the period. */ - @Child(name = "period", type = {DecimalType.class}, order=8, min=0, max=1, modifier=false, summary=true) + @Child(name = "period", type = {DecimalType.class}, order=9, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Event occurs frequency times per period", formalDefinition="Indicates the duration of time over which repetitions are to occur; e.g. to express \"3 times per day\", 3 would be the frequency and \"1 day\" would be the period." ) protected DecimalType period; /** * If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as "do this once every 3-5 days. */ - @Child(name = "periodMax", type = {DecimalType.class}, order=9, min=0, max=1, modifier=false, summary=true) + @Child(name = "periodMax", type = {DecimalType.class}, order=10, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Upper limit of period (3-4 hours)", formalDefinition="If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as \"do this once every 3-5 days." ) protected DecimalType periodMax; /** * The units of time for the period in UCUM units. */ - @Child(name = "periodUnits", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=true) + @Child(name = "periodUnit", type = {CodeType.class}, order=11, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="s | min | h | d | wk | mo | a - unit of time (UCUM)", formalDefinition="The units of time for the period in UCUM units." ) - protected Enumeration periodUnits; + protected Enumeration periodUnit; /** * A real world event that the occurrence of the event should be tied to. */ - @Child(name = "when", type = {CodeType.class}, order=11, min=0, max=1, modifier=false, summary=true) + @Child(name = "when", type = {CodeType.class}, order=12, min=0, max=1, modifier=false, summary=true) @Description(shortDefinition="Regular life events the event is tied to", formalDefinition="A real world event that the occurrence of the event should be tied to." ) protected Enumeration when; - private static final long serialVersionUID = -585686982L; + /** + * The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event. + */ + @Child(name = "offset", type = {UnsignedIntType.class}, order=13, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Minutes from event (before or after)", formalDefinition="The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event." ) + protected UnsignedIntType offset; + + private static final long serialVersionUID = -1317919984L; /** * Constructor @@ -685,6 +698,51 @@ public class Timing extends Type implements ICompositeType { return this; } + /** + * @return {@link #countMax} (A maximum value for the count of the desired repetitions (e.g. do something 6-8 times).). This is the underlying object with id, value and extensions. The accessor "getCountMax" gives direct access to the value + */ + public IntegerType getCountMaxElement() { + if (this.countMax == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TimingRepeatComponent.countMax"); + else if (Configuration.doAutoCreate()) + this.countMax = new IntegerType(); // bb + return this.countMax; + } + + public boolean hasCountMaxElement() { + return this.countMax != null && !this.countMax.isEmpty(); + } + + public boolean hasCountMax() { + return this.countMax != null && !this.countMax.isEmpty(); + } + + /** + * @param value {@link #countMax} (A maximum value for the count of the desired repetitions (e.g. do something 6-8 times).). This is the underlying object with id, value and extensions. The accessor "getCountMax" gives direct access to the value + */ + public TimingRepeatComponent setCountMaxElement(IntegerType value) { + this.countMax = value; + return this; + } + + /** + * @return A maximum value for the count of the desired repetitions (e.g. do something 6-8 times). + */ + public int getCountMax() { + return this.countMax == null || this.countMax.isEmpty() ? 0 : this.countMax.getValue(); + } + + /** + * @param value A maximum value for the count of the desired repetitions (e.g. do something 6-8 times). + */ + public TimingRepeatComponent setCountMax(int value) { + if (this.countMax == null) + this.countMax = new IntegerType(); + this.countMax.setValue(value); + return this; + } + /** * @return {@link #duration} (How long this thing happens for when it happens.). This is the underlying object with id, value and extensions. The accessor "getDuration" gives direct access to the value */ @@ -820,50 +878,50 @@ public class Timing extends Type implements ICompositeType { } /** - * @return {@link #durationUnits} (The units of time for the duration, in UCUM units.). This is the underlying object with id, value and extensions. The accessor "getDurationUnits" gives direct access to the value + * @return {@link #durationUnit} (The units of time for the duration, in UCUM units.). This is the underlying object with id, value and extensions. The accessor "getDurationUnit" gives direct access to the value */ - public Enumeration getDurationUnitsElement() { - if (this.durationUnits == null) + public Enumeration getDurationUnitElement() { + if (this.durationUnit == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TimingRepeatComponent.durationUnits"); + throw new Error("Attempt to auto-create TimingRepeatComponent.durationUnit"); else if (Configuration.doAutoCreate()) - this.durationUnits = new Enumeration(new UnitsOfTimeEnumFactory()); // bb - return this.durationUnits; + this.durationUnit = new Enumeration(new UnitsOfTimeEnumFactory()); // bb + return this.durationUnit; } - public boolean hasDurationUnitsElement() { - return this.durationUnits != null && !this.durationUnits.isEmpty(); + public boolean hasDurationUnitElement() { + return this.durationUnit != null && !this.durationUnit.isEmpty(); } - public boolean hasDurationUnits() { - return this.durationUnits != null && !this.durationUnits.isEmpty(); + public boolean hasDurationUnit() { + return this.durationUnit != null && !this.durationUnit.isEmpty(); } /** - * @param value {@link #durationUnits} (The units of time for the duration, in UCUM units.). This is the underlying object with id, value and extensions. The accessor "getDurationUnits" gives direct access to the value + * @param value {@link #durationUnit} (The units of time for the duration, in UCUM units.). This is the underlying object with id, value and extensions. The accessor "getDurationUnit" gives direct access to the value */ - public TimingRepeatComponent setDurationUnitsElement(Enumeration value) { - this.durationUnits = value; + public TimingRepeatComponent setDurationUnitElement(Enumeration value) { + this.durationUnit = value; return this; } /** * @return The units of time for the duration, in UCUM units. */ - public UnitsOfTime getDurationUnits() { - return this.durationUnits == null ? null : this.durationUnits.getValue(); + public UnitsOfTime getDurationUnit() { + return this.durationUnit == null ? null : this.durationUnit.getValue(); } /** * @param value The units of time for the duration, in UCUM units. */ - public TimingRepeatComponent setDurationUnits(UnitsOfTime value) { + public TimingRepeatComponent setDurationUnit(UnitsOfTime value) { if (value == null) - this.durationUnits = null; + this.durationUnit = null; else { - if (this.durationUnits == null) - this.durationUnits = new Enumeration(new UnitsOfTimeEnumFactory()); - this.durationUnits.setValue(value); + if (this.durationUnit == null) + this.durationUnit = new Enumeration(new UnitsOfTimeEnumFactory()); + this.durationUnit.setValue(value); } return this; } @@ -1093,50 +1151,50 @@ public class Timing extends Type implements ICompositeType { } /** - * @return {@link #periodUnits} (The units of time for the period in UCUM units.). This is the underlying object with id, value and extensions. The accessor "getPeriodUnits" gives direct access to the value + * @return {@link #periodUnit} (The units of time for the period in UCUM units.). This is the underlying object with id, value and extensions. The accessor "getPeriodUnit" gives direct access to the value */ - public Enumeration getPeriodUnitsElement() { - if (this.periodUnits == null) + public Enumeration getPeriodUnitElement() { + if (this.periodUnit == null) if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create TimingRepeatComponent.periodUnits"); + throw new Error("Attempt to auto-create TimingRepeatComponent.periodUnit"); else if (Configuration.doAutoCreate()) - this.periodUnits = new Enumeration(new UnitsOfTimeEnumFactory()); // bb - return this.periodUnits; + this.periodUnit = new Enumeration(new UnitsOfTimeEnumFactory()); // bb + return this.periodUnit; } - public boolean hasPeriodUnitsElement() { - return this.periodUnits != null && !this.periodUnits.isEmpty(); + public boolean hasPeriodUnitElement() { + return this.periodUnit != null && !this.periodUnit.isEmpty(); } - public boolean hasPeriodUnits() { - return this.periodUnits != null && !this.periodUnits.isEmpty(); + public boolean hasPeriodUnit() { + return this.periodUnit != null && !this.periodUnit.isEmpty(); } /** - * @param value {@link #periodUnits} (The units of time for the period in UCUM units.). This is the underlying object with id, value and extensions. The accessor "getPeriodUnits" gives direct access to the value + * @param value {@link #periodUnit} (The units of time for the period in UCUM units.). This is the underlying object with id, value and extensions. The accessor "getPeriodUnit" gives direct access to the value */ - public TimingRepeatComponent setPeriodUnitsElement(Enumeration value) { - this.periodUnits = value; + public TimingRepeatComponent setPeriodUnitElement(Enumeration value) { + this.periodUnit = value; return this; } /** * @return The units of time for the period in UCUM units. */ - public UnitsOfTime getPeriodUnits() { - return this.periodUnits == null ? null : this.periodUnits.getValue(); + public UnitsOfTime getPeriodUnit() { + return this.periodUnit == null ? null : this.periodUnit.getValue(); } /** * @param value The units of time for the period in UCUM units. */ - public TimingRepeatComponent setPeriodUnits(UnitsOfTime value) { + public TimingRepeatComponent setPeriodUnit(UnitsOfTime value) { if (value == null) - this.periodUnits = null; + this.periodUnit = null; else { - if (this.periodUnits == null) - this.periodUnits = new Enumeration(new UnitsOfTimeEnumFactory()); - this.periodUnits.setValue(value); + if (this.periodUnit == null) + this.periodUnit = new Enumeration(new UnitsOfTimeEnumFactory()); + this.periodUnit.setValue(value); } return this; } @@ -1190,19 +1248,66 @@ public class Timing extends Type implements ICompositeType { return this; } + /** + * @return {@link #offset} (The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.). This is the underlying object with id, value and extensions. The accessor "getOffset" gives direct access to the value + */ + public UnsignedIntType getOffsetElement() { + if (this.offset == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TimingRepeatComponent.offset"); + else if (Configuration.doAutoCreate()) + this.offset = new UnsignedIntType(); // bb + return this.offset; + } + + public boolean hasOffsetElement() { + return this.offset != null && !this.offset.isEmpty(); + } + + public boolean hasOffset() { + return this.offset != null && !this.offset.isEmpty(); + } + + /** + * @param value {@link #offset} (The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.). This is the underlying object with id, value and extensions. The accessor "getOffset" gives direct access to the value + */ + public TimingRepeatComponent setOffsetElement(UnsignedIntType value) { + this.offset = value; + return this; + } + + /** + * @return The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event. + */ + public int getOffset() { + return this.offset == null || this.offset.isEmpty() ? 0 : this.offset.getValue(); + } + + /** + * @param value The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event. + */ + public TimingRepeatComponent setOffset(int value) { + if (this.offset == null) + this.offset = new UnsignedIntType(); + this.offset.setValue(value); + return this; + } + protected void listChildren(List childrenList) { super.listChildren(childrenList); childrenList.add(new Property("bounds[x]", "Duration|Range|Period", "Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule.", 0, java.lang.Integer.MAX_VALUE, bounds)); childrenList.add(new Property("count", "integer", "A total count of the desired number of repetitions.", 0, java.lang.Integer.MAX_VALUE, count)); + childrenList.add(new Property("countMax", "integer", "A maximum value for the count of the desired repetitions (e.g. do something 6-8 times).", 0, java.lang.Integer.MAX_VALUE, countMax)); childrenList.add(new Property("duration", "decimal", "How long this thing happens for when it happens.", 0, java.lang.Integer.MAX_VALUE, duration)); childrenList.add(new Property("durationMax", "decimal", "The upper limit of how long this thing happens for when it happens.", 0, java.lang.Integer.MAX_VALUE, durationMax)); - childrenList.add(new Property("durationUnits", "code", "The units of time for the duration, in UCUM units.", 0, java.lang.Integer.MAX_VALUE, durationUnits)); + childrenList.add(new Property("durationUnit", "code", "The units of time for the duration, in UCUM units.", 0, java.lang.Integer.MAX_VALUE, durationUnit)); childrenList.add(new Property("frequency", "integer", "The number of times to repeat the action within the specified period / period range (i.e. both period and periodMax provided).", 0, java.lang.Integer.MAX_VALUE, frequency)); childrenList.add(new Property("frequencyMax", "integer", "If present, indicates that the frequency is a range - so repeat between [frequency] and [frequencyMax] times within the period or period range.", 0, java.lang.Integer.MAX_VALUE, frequencyMax)); childrenList.add(new Property("period", "decimal", "Indicates the duration of time over which repetitions are to occur; e.g. to express \"3 times per day\", 3 would be the frequency and \"1 day\" would be the period.", 0, java.lang.Integer.MAX_VALUE, period)); childrenList.add(new Property("periodMax", "decimal", "If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as \"do this once every 3-5 days.", 0, java.lang.Integer.MAX_VALUE, periodMax)); - childrenList.add(new Property("periodUnits", "code", "The units of time for the period in UCUM units.", 0, java.lang.Integer.MAX_VALUE, periodUnits)); + childrenList.add(new Property("periodUnit", "code", "The units of time for the period in UCUM units.", 0, java.lang.Integer.MAX_VALUE, periodUnit)); childrenList.add(new Property("when", "code", "A real world event that the occurrence of the event should be tied to.", 0, java.lang.Integer.MAX_VALUE, when)); + childrenList.add(new Property("offset", "unsignedInt", "The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.", 0, java.lang.Integer.MAX_VALUE, offset)); } @Override @@ -1211,12 +1316,14 @@ public class Timing extends Type implements ICompositeType { this.bounds = (Type) value; // Type else if (name.equals("count")) this.count = castToInteger(value); // IntegerType + else if (name.equals("countMax")) + this.countMax = castToInteger(value); // IntegerType else if (name.equals("duration")) this.duration = castToDecimal(value); // DecimalType else if (name.equals("durationMax")) this.durationMax = castToDecimal(value); // DecimalType - else if (name.equals("durationUnits")) - this.durationUnits = new UnitsOfTimeEnumFactory().fromType(value); // Enumeration + else if (name.equals("durationUnit")) + this.durationUnit = new UnitsOfTimeEnumFactory().fromType(value); // Enumeration else if (name.equals("frequency")) this.frequency = castToInteger(value); // IntegerType else if (name.equals("frequencyMax")) @@ -1225,10 +1332,12 @@ public class Timing extends Type implements ICompositeType { this.period = castToDecimal(value); // DecimalType else if (name.equals("periodMax")) this.periodMax = castToDecimal(value); // DecimalType - else if (name.equals("periodUnits")) - this.periodUnits = new UnitsOfTimeEnumFactory().fromType(value); // Enumeration + else if (name.equals("periodUnit")) + this.periodUnit = new UnitsOfTimeEnumFactory().fromType(value); // Enumeration else if (name.equals("when")) this.when = new EventTimingEnumFactory().fromType(value); // Enumeration + else if (name.equals("offset")) + this.offset = castToUnsignedInt(value); // UnsignedIntType else super.setProperty(name, value); } @@ -1250,14 +1359,17 @@ public class Timing extends Type implements ICompositeType { else if (name.equals("count")) { throw new FHIRException("Cannot call addChild on a primitive type Timing.count"); } + else if (name.equals("countMax")) { + throw new FHIRException("Cannot call addChild on a primitive type Timing.countMax"); + } else if (name.equals("duration")) { throw new FHIRException("Cannot call addChild on a primitive type Timing.duration"); } else if (name.equals("durationMax")) { throw new FHIRException("Cannot call addChild on a primitive type Timing.durationMax"); } - else if (name.equals("durationUnits")) { - throw new FHIRException("Cannot call addChild on a primitive type Timing.durationUnits"); + else if (name.equals("durationUnit")) { + throw new FHIRException("Cannot call addChild on a primitive type Timing.durationUnit"); } else if (name.equals("frequency")) { throw new FHIRException("Cannot call addChild on a primitive type Timing.frequency"); @@ -1271,12 +1383,15 @@ public class Timing extends Type implements ICompositeType { else if (name.equals("periodMax")) { throw new FHIRException("Cannot call addChild on a primitive type Timing.periodMax"); } - else if (name.equals("periodUnits")) { - throw new FHIRException("Cannot call addChild on a primitive type Timing.periodUnits"); + else if (name.equals("periodUnit")) { + throw new FHIRException("Cannot call addChild on a primitive type Timing.periodUnit"); } else if (name.equals("when")) { throw new FHIRException("Cannot call addChild on a primitive type Timing.when"); } + else if (name.equals("offset")) { + throw new FHIRException("Cannot call addChild on a primitive type Timing.offset"); + } else return super.addChild(name); } @@ -1286,15 +1401,17 @@ public class Timing extends Type implements ICompositeType { copyValues(dst); dst.bounds = bounds == null ? null : bounds.copy(); dst.count = count == null ? null : count.copy(); + dst.countMax = countMax == null ? null : countMax.copy(); dst.duration = duration == null ? null : duration.copy(); dst.durationMax = durationMax == null ? null : durationMax.copy(); - dst.durationUnits = durationUnits == null ? null : durationUnits.copy(); + dst.durationUnit = durationUnit == null ? null : durationUnit.copy(); dst.frequency = frequency == null ? null : frequency.copy(); dst.frequencyMax = frequencyMax == null ? null : frequencyMax.copy(); dst.period = period == null ? null : period.copy(); dst.periodMax = periodMax == null ? null : periodMax.copy(); - dst.periodUnits = periodUnits == null ? null : periodUnits.copy(); + dst.periodUnit = periodUnit == null ? null : periodUnit.copy(); dst.when = when == null ? null : when.copy(); + dst.offset = offset == null ? null : offset.copy(); return dst; } @@ -1305,11 +1422,11 @@ public class Timing extends Type implements ICompositeType { if (!(other instanceof TimingRepeatComponent)) return false; TimingRepeatComponent o = (TimingRepeatComponent) other; - return compareDeep(bounds, o.bounds, true) && compareDeep(count, o.count, true) && compareDeep(duration, o.duration, true) - && compareDeep(durationMax, o.durationMax, true) && compareDeep(durationUnits, o.durationUnits, true) + return compareDeep(bounds, o.bounds, true) && compareDeep(count, o.count, true) && compareDeep(countMax, o.countMax, true) + && compareDeep(duration, o.duration, true) && compareDeep(durationMax, o.durationMax, true) && compareDeep(durationUnit, o.durationUnit, true) && compareDeep(frequency, o.frequency, true) && compareDeep(frequencyMax, o.frequencyMax, true) - && compareDeep(period, o.period, true) && compareDeep(periodMax, o.periodMax, true) && compareDeep(periodUnits, o.periodUnits, true) - && compareDeep(when, o.when, true); + && compareDeep(period, o.period, true) && compareDeep(periodMax, o.periodMax, true) && compareDeep(periodUnit, o.periodUnit, true) + && compareDeep(when, o.when, true) && compareDeep(offset, o.offset, true); } @Override @@ -1319,19 +1436,17 @@ public class Timing extends Type implements ICompositeType { if (!(other instanceof TimingRepeatComponent)) return false; TimingRepeatComponent o = (TimingRepeatComponent) other; - return compareValues(count, o.count, true) && compareValues(duration, o.duration, true) && compareValues(durationMax, o.durationMax, true) - && compareValues(durationUnits, o.durationUnits, true) && compareValues(frequency, o.frequency, true) - && compareValues(frequencyMax, o.frequencyMax, true) && compareValues(period, o.period, true) && compareValues(periodMax, o.periodMax, true) - && compareValues(periodUnits, o.periodUnits, true) && compareValues(when, o.when, true); + return compareValues(count, o.count, true) && compareValues(countMax, o.countMax, true) && compareValues(duration, o.duration, true) + && compareValues(durationMax, o.durationMax, true) && compareValues(durationUnit, o.durationUnit, true) + && compareValues(frequency, o.frequency, true) && compareValues(frequencyMax, o.frequencyMax, true) + && compareValues(period, o.period, true) && compareValues(periodMax, o.periodMax, true) && compareValues(periodUnit, o.periodUnit, true) + && compareValues(when, o.when, true) && compareValues(offset, o.offset, true); } public boolean isEmpty() { - return super.isEmpty() && (bounds == null || bounds.isEmpty()) && (count == null || count.isEmpty()) - && (duration == null || duration.isEmpty()) && (durationMax == null || durationMax.isEmpty()) - && (durationUnits == null || durationUnits.isEmpty()) && (frequency == null || frequency.isEmpty()) - && (frequencyMax == null || frequencyMax.isEmpty()) && (period == null || period.isEmpty()) - && (periodMax == null || periodMax.isEmpty()) && (periodUnits == null || periodUnits.isEmpty()) - && (when == null || when.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( bounds, count, countMax, duration + , durationMax, durationUnit, frequency, frequencyMax, period, periodMax, periodUnit, when + , offset); } public String fhirType() { @@ -1356,10 +1471,10 @@ public class Timing extends Type implements ICompositeType { protected TimingRepeatComponent repeat; /** - * A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes. + * A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing. */ @Child(name = "code", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="QD | QOD | Q4H | Q6H | BID | TID | QID | AM | PM +", formalDefinition="A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes." ) + @Description(shortDefinition="QD | QOD | Q4H | Q6H | BID | TID | QID | AM | PM +", formalDefinition="A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing." ) protected CodeableConcept code; private static final long serialVersionUID = 791565112L; @@ -1450,7 +1565,7 @@ public class Timing extends Type implements ICompositeType { } /** - * @return {@link #code} (A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes.) + * @return {@link #code} (A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing.) */ public CodeableConcept getCode() { if (this.code == null) @@ -1466,7 +1581,7 @@ public class Timing extends Type implements ICompositeType { } /** - * @param value {@link #code} (A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes.) + * @param value {@link #code} (A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing.) */ public Timing setCode(CodeableConcept value) { this.code = value; @@ -1477,7 +1592,7 @@ public class Timing extends Type implements ICompositeType { super.listChildren(childrenList); childrenList.add(new Property("event", "dateTime", "Identifies specific times when the event occurs.", 0, java.lang.Integer.MAX_VALUE, event)); childrenList.add(new Property("repeat", "", "A set of rules that describe when the event should occur.", 0, java.lang.Integer.MAX_VALUE, repeat)); - childrenList.add(new Property("code", "CodeableConcept", "A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes.", 0, java.lang.Integer.MAX_VALUE, code)); + childrenList.add(new Property("code", "CodeableConcept", "A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing.", 0, java.lang.Integer.MAX_VALUE, code)); } @Override @@ -1553,8 +1668,7 @@ public class Timing extends Type implements ICompositeType { } public boolean isEmpty() { - return super.isEmpty() && (event == null || event.isEmpty()) && (repeat == null || repeat.isEmpty()) - && (code == null || code.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( event, repeat, code); } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/TriggerDefinition.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/TriggerDefinition.java new file mode 100644 index 00000000000..8aab234f390 --- /dev/null +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/TriggerDefinition.java @@ -0,0 +1,551 @@ +package org.hl7.fhir.dstu3.model; + +/* + Copyright (c) 2011+, HL7, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of HL7 nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 + +import java.util.*; + +import org.hl7.fhir.utilities.Utilities; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Block; +import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; +/** + * A description of a triggering event. + */ +@DatatypeDef(name="TriggerDefinition") +public class TriggerDefinition extends Type implements ICompositeType { + + public enum TriggerType { + /** + * The trigger occurs in response to a specific named event + */ + NAMEDEVENT, + /** + * The trigger occurs at a specific time or periodically as described by a timing or schedule + */ + PERIODIC, + /** + * The trigger occurs whenever data of a particular type is added + */ + DATAADDED, + /** + * The trigger occurs whenever data of a particular type is modified + */ + DATAMODIFIED, + /** + * The trigger occurs whenever data of a particular type is removed + */ + DATAREMOVED, + /** + * The trigger occurs whenever data of a particular type is accessed + */ + DATAACCESSED, + /** + * The trigger occurs whenever access to data of a particular type is completed + */ + DATAACCESSENDED, + /** + * added to help the parsers + */ + NULL; + public static TriggerType fromCode(String codeString) throws FHIRException { + if (codeString == null || "".equals(codeString)) + return null; + if ("named-event".equals(codeString)) + return NAMEDEVENT; + if ("periodic".equals(codeString)) + return PERIODIC; + if ("data-added".equals(codeString)) + return DATAADDED; + if ("data-modified".equals(codeString)) + return DATAMODIFIED; + if ("data-removed".equals(codeString)) + return DATAREMOVED; + if ("data-accessed".equals(codeString)) + return DATAACCESSED; + if ("data-access-ended".equals(codeString)) + return DATAACCESSENDED; + throw new FHIRException("Unknown TriggerType code '"+codeString+"'"); + } + public String toCode() { + switch (this) { + case NAMEDEVENT: return "named-event"; + case PERIODIC: return "periodic"; + case DATAADDED: return "data-added"; + case DATAMODIFIED: return "data-modified"; + case DATAREMOVED: return "data-removed"; + case DATAACCESSED: return "data-accessed"; + case DATAACCESSENDED: return "data-access-ended"; + default: return "?"; + } + } + public String getSystem() { + switch (this) { + case NAMEDEVENT: return "http://hl7.org/fhir/trigger-type"; + case PERIODIC: return "http://hl7.org/fhir/trigger-type"; + case DATAADDED: return "http://hl7.org/fhir/trigger-type"; + case DATAMODIFIED: return "http://hl7.org/fhir/trigger-type"; + case DATAREMOVED: return "http://hl7.org/fhir/trigger-type"; + case DATAACCESSED: return "http://hl7.org/fhir/trigger-type"; + case DATAACCESSENDED: return "http://hl7.org/fhir/trigger-type"; + default: return "?"; + } + } + public String getDefinition() { + switch (this) { + case NAMEDEVENT: return "The trigger occurs in response to a specific named event"; + case PERIODIC: return "The trigger occurs at a specific time or periodically as described by a timing or schedule"; + case DATAADDED: return "The trigger occurs whenever data of a particular type is added"; + case DATAMODIFIED: return "The trigger occurs whenever data of a particular type is modified"; + case DATAREMOVED: return "The trigger occurs whenever data of a particular type is removed"; + case DATAACCESSED: return "The trigger occurs whenever data of a particular type is accessed"; + case DATAACCESSENDED: return "The trigger occurs whenever access to data of a particular type is completed"; + default: return "?"; + } + } + public String getDisplay() { + switch (this) { + case NAMEDEVENT: return "Named Event"; + case PERIODIC: return "Periodic"; + case DATAADDED: return "Data Added"; + case DATAMODIFIED: return "Data Modified"; + case DATAREMOVED: return "Data Removed"; + case DATAACCESSED: return "Data Accessed"; + case DATAACCESSENDED: return "Data Access Ended"; + default: return "?"; + } + } + } + + public static class TriggerTypeEnumFactory implements EnumFactory { + public TriggerType fromCode(String codeString) throws IllegalArgumentException { + if (codeString == null || "".equals(codeString)) + if (codeString == null || "".equals(codeString)) + return null; + if ("named-event".equals(codeString)) + return TriggerType.NAMEDEVENT; + if ("periodic".equals(codeString)) + return TriggerType.PERIODIC; + if ("data-added".equals(codeString)) + return TriggerType.DATAADDED; + if ("data-modified".equals(codeString)) + return TriggerType.DATAMODIFIED; + if ("data-removed".equals(codeString)) + return TriggerType.DATAREMOVED; + if ("data-accessed".equals(codeString)) + return TriggerType.DATAACCESSED; + if ("data-access-ended".equals(codeString)) + return TriggerType.DATAACCESSENDED; + throw new IllegalArgumentException("Unknown TriggerType code '"+codeString+"'"); + } + public Enumeration fromType(Base code) throws FHIRException { + if (code == null || code.isEmpty()) + return null; + String codeString = ((PrimitiveType) code).asStringValue(); + if (codeString == null || "".equals(codeString)) + return null; + if ("named-event".equals(codeString)) + return new Enumeration(this, TriggerType.NAMEDEVENT); + if ("periodic".equals(codeString)) + return new Enumeration(this, TriggerType.PERIODIC); + if ("data-added".equals(codeString)) + return new Enumeration(this, TriggerType.DATAADDED); + if ("data-modified".equals(codeString)) + return new Enumeration(this, TriggerType.DATAMODIFIED); + if ("data-removed".equals(codeString)) + return new Enumeration(this, TriggerType.DATAREMOVED); + if ("data-accessed".equals(codeString)) + return new Enumeration(this, TriggerType.DATAACCESSED); + if ("data-access-ended".equals(codeString)) + return new Enumeration(this, TriggerType.DATAACCESSENDED); + throw new FHIRException("Unknown TriggerType code '"+codeString+"'"); + } + public String toCode(TriggerType code) { + if (code == TriggerType.NAMEDEVENT) + return "named-event"; + if (code == TriggerType.PERIODIC) + return "periodic"; + if (code == TriggerType.DATAADDED) + return "data-added"; + if (code == TriggerType.DATAMODIFIED) + return "data-modified"; + if (code == TriggerType.DATAREMOVED) + return "data-removed"; + if (code == TriggerType.DATAACCESSED) + return "data-accessed"; + if (code == TriggerType.DATAACCESSENDED) + return "data-access-ended"; + return "?"; + } + public String toSystem(TriggerType code) { + return code.getSystem(); + } + } + + /** + * The type of triggering event. + */ + @Child(name = "type", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=true) + @Description(shortDefinition="named-event | periodic | data-added | data-modified | data-removed | data-accessed | data-access-ended", formalDefinition="The type of triggering event." ) + protected Enumeration type; + + /** + * The name of the event (if this is a named-event trigger). + */ + @Child(name = "eventName", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Name of the event", formalDefinition="The name of the event (if this is a named-event trigger)." ) + protected StringType eventName; + + /** + * The timing of the event (if this is a period trigger). + */ + @Child(name = "eventTiming", type = {Timing.class, Schedule.class, DateType.class, DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Timing of the event", formalDefinition="The timing of the event (if this is a period trigger)." ) + protected Type eventTiming; + + /** + * The triggering data of the event (if this is a data trigger). + */ + @Child(name = "eventData", type = {DataRequirement.class}, order=3, min=0, max=1, modifier=false, summary=true) + @Description(shortDefinition="Triggering data of the event", formalDefinition="The triggering data of the event (if this is a data trigger)." ) + protected DataRequirement eventData; + + private static final long serialVersionUID = -1695534864L; + + /** + * Constructor + */ + public TriggerDefinition() { + super(); + } + + /** + * Constructor + */ + public TriggerDefinition(Enumeration type) { + super(); + this.type = type; + } + + /** + * @return {@link #type} (The type of triggering event.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public Enumeration getTypeElement() { + if (this.type == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TriggerDefinition.type"); + else if (Configuration.doAutoCreate()) + this.type = new Enumeration(new TriggerTypeEnumFactory()); // bb + return this.type; + } + + public boolean hasTypeElement() { + return this.type != null && !this.type.isEmpty(); + } + + public boolean hasType() { + return this.type != null && !this.type.isEmpty(); + } + + /** + * @param value {@link #type} (The type of triggering event.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value + */ + public TriggerDefinition setTypeElement(Enumeration value) { + this.type = value; + return this; + } + + /** + * @return The type of triggering event. + */ + public TriggerType getType() { + return this.type == null ? null : this.type.getValue(); + } + + /** + * @param value The type of triggering event. + */ + public TriggerDefinition setType(TriggerType value) { + if (this.type == null) + this.type = new Enumeration(new TriggerTypeEnumFactory()); + this.type.setValue(value); + return this; + } + + /** + * @return {@link #eventName} (The name of the event (if this is a named-event trigger).). This is the underlying object with id, value and extensions. The accessor "getEventName" gives direct access to the value + */ + public StringType getEventNameElement() { + if (this.eventName == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TriggerDefinition.eventName"); + else if (Configuration.doAutoCreate()) + this.eventName = new StringType(); // bb + return this.eventName; + } + + public boolean hasEventNameElement() { + return this.eventName != null && !this.eventName.isEmpty(); + } + + public boolean hasEventName() { + return this.eventName != null && !this.eventName.isEmpty(); + } + + /** + * @param value {@link #eventName} (The name of the event (if this is a named-event trigger).). This is the underlying object with id, value and extensions. The accessor "getEventName" gives direct access to the value + */ + public TriggerDefinition setEventNameElement(StringType value) { + this.eventName = value; + return this; + } + + /** + * @return The name of the event (if this is a named-event trigger). + */ + public String getEventName() { + return this.eventName == null ? null : this.eventName.getValue(); + } + + /** + * @param value The name of the event (if this is a named-event trigger). + */ + public TriggerDefinition setEventName(String value) { + if (Utilities.noString(value)) + this.eventName = null; + else { + if (this.eventName == null) + this.eventName = new StringType(); + this.eventName.setValue(value); + } + return this; + } + + /** + * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) + */ + public Type getEventTiming() { + return this.eventTiming; + } + + /** + * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) + */ + public Timing getEventTimingTiming() throws FHIRException { + if (!(this.eventTiming instanceof Timing)) + throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.eventTiming.getClass().getName()+" was encountered"); + return (Timing) this.eventTiming; + } + + public boolean hasEventTimingTiming() { + return this.eventTiming instanceof Timing; + } + + /** + * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) + */ + public Reference getEventTimingReference() throws FHIRException { + if (!(this.eventTiming instanceof Reference)) + throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.eventTiming.getClass().getName()+" was encountered"); + return (Reference) this.eventTiming; + } + + public boolean hasEventTimingReference() { + return this.eventTiming instanceof Reference; + } + + /** + * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) + */ + public DateType getEventTimingDateType() throws FHIRException { + if (!(this.eventTiming instanceof DateType)) + throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.eventTiming.getClass().getName()+" was encountered"); + return (DateType) this.eventTiming; + } + + public boolean hasEventTimingDateType() { + return this.eventTiming instanceof DateType; + } + + /** + * @return {@link #eventTiming} (The timing of the event (if this is a period trigger).) + */ + public DateTimeType getEventTimingDateTimeType() throws FHIRException { + if (!(this.eventTiming instanceof DateTimeType)) + throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.eventTiming.getClass().getName()+" was encountered"); + return (DateTimeType) this.eventTiming; + } + + public boolean hasEventTimingDateTimeType() { + return this.eventTiming instanceof DateTimeType; + } + + public boolean hasEventTiming() { + return this.eventTiming != null && !this.eventTiming.isEmpty(); + } + + /** + * @param value {@link #eventTiming} (The timing of the event (if this is a period trigger).) + */ + public TriggerDefinition setEventTiming(Type value) { + this.eventTiming = value; + return this; + } + + /** + * @return {@link #eventData} (The triggering data of the event (if this is a data trigger).) + */ + public DataRequirement getEventData() { + if (this.eventData == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create TriggerDefinition.eventData"); + else if (Configuration.doAutoCreate()) + this.eventData = new DataRequirement(); // cc + return this.eventData; + } + + public boolean hasEventData() { + return this.eventData != null && !this.eventData.isEmpty(); + } + + /** + * @param value {@link #eventData} (The triggering data of the event (if this is a data trigger).) + */ + public TriggerDefinition setEventData(DataRequirement value) { + this.eventData = value; + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("type", "code", "The type of triggering event.", 0, java.lang.Integer.MAX_VALUE, type)); + childrenList.add(new Property("eventName", "string", "The name of the event (if this is a named-event trigger).", 0, java.lang.Integer.MAX_VALUE, eventName)); + childrenList.add(new Property("eventTiming[x]", "Timing|Reference(Schedule)|date|dateTime", "The timing of the event (if this is a period trigger).", 0, java.lang.Integer.MAX_VALUE, eventTiming)); + childrenList.add(new Property("eventData", "DataRequirement", "The triggering data of the event (if this is a data trigger).", 0, java.lang.Integer.MAX_VALUE, eventData)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("type")) + this.type = new TriggerTypeEnumFactory().fromType(value); // Enumeration + else if (name.equals("eventName")) + this.eventName = castToString(value); // StringType + else if (name.equals("eventTiming[x]")) + this.eventTiming = (Type) value; // Type + else if (name.equals("eventData")) + this.eventData = castToDataRequirement(value); // DataRequirement + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("type")) { + throw new FHIRException("Cannot call addChild on a primitive type TriggerDefinition.type"); + } + else if (name.equals("eventName")) { + throw new FHIRException("Cannot call addChild on a primitive type TriggerDefinition.eventName"); + } + else if (name.equals("eventTimingTiming")) { + this.eventTiming = new Timing(); + return this.eventTiming; + } + else if (name.equals("eventTimingReference")) { + this.eventTiming = new Reference(); + return this.eventTiming; + } + else if (name.equals("eventTimingDate")) { + this.eventTiming = new DateType(); + return this.eventTiming; + } + else if (name.equals("eventTimingDateTime")) { + this.eventTiming = new DateTimeType(); + return this.eventTiming; + } + else if (name.equals("eventData")) { + this.eventData = new DataRequirement(); + return this.eventData; + } + else + return super.addChild(name); + } + + public String fhirType() { + return "TriggerDefinition"; + + } + + public TriggerDefinition copy() { + TriggerDefinition dst = new TriggerDefinition(); + copyValues(dst); + dst.type = type == null ? null : type.copy(); + dst.eventName = eventName == null ? null : eventName.copy(); + dst.eventTiming = eventTiming == null ? null : eventTiming.copy(); + dst.eventData = eventData == null ? null : eventData.copy(); + return dst; + } + + protected TriggerDefinition typedCopy() { + return copy(); + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof TriggerDefinition)) + return false; + TriggerDefinition o = (TriggerDefinition) other; + return compareDeep(type, o.type, true) && compareDeep(eventName, o.eventName, true) && compareDeep(eventTiming, o.eventTiming, true) + && compareDeep(eventData, o.eventData, true); + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof TriggerDefinition)) + return false; + TriggerDefinition o = (TriggerDefinition) other; + return compareValues(type, o.type, true) && compareValues(eventName, o.eventName, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, eventName, eventTiming + , eventData); + } + + +} + diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ValueSet.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ValueSet.java index 217c344d3d6..cb6d4b2b3eb 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ValueSet.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/ValueSet.java @@ -29,21 +29,19 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; import org.hl7.fhir.utilities.Utilities; - +import org.hl7.fhir.dstu3.model.Enumerations.*; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; -import org.hl7.fhir.dstu3.model.Enumerations.*; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * A value set specifies a set of codes drawn from one or more code systems. */ @@ -376,8 +374,7 @@ public class ValueSet extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); } public String fhirType() { @@ -385,994 +382,6 @@ public class ValueSet extends DomainResource { } - } - - @Block() - public static class ValueSetCodeSystemComponent extends BackboneElement implements IBaseBackboneElement { - /** - * An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system. - */ - @Child(name = "system", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=true) - @Description(shortDefinition="URI to identify the code system (e.g. in Coding.system)", formalDefinition="An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system." ) - protected UriType system; - - /** - * The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked. - */ - @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="Version (for use in Coding.version)", formalDefinition="The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked." ) - protected StringType version; - - /** - * If code comparison is case sensitive when codes within this system are compared to each other. - */ - @Child(name = "caseSensitive", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="If code comparison is case sensitive", formalDefinition="If code comparison is case sensitive when codes within this system are compared to each other." ) - protected BooleanType caseSensitive; - - /** - * Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are. - */ - @Child(name = "concept", type = {}, order=4, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Concepts in the code system", formalDefinition="Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are." ) - protected List concept; - - private static final long serialVersionUID = -1109401192L; - - /** - * Constructor - */ - public ValueSetCodeSystemComponent() { - super(); - } - - /** - * Constructor - */ - public ValueSetCodeSystemComponent(UriType system) { - super(); - this.system = system; - } - - /** - * @return {@link #system} (An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value - */ - public UriType getSystemElement() { - if (this.system == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ValueSetCodeSystemComponent.system"); - else if (Configuration.doAutoCreate()) - this.system = new UriType(); // bb - return this.system; - } - - public boolean hasSystemElement() { - return this.system != null && !this.system.isEmpty(); - } - - public boolean hasSystem() { - return this.system != null && !this.system.isEmpty(); - } - - /** - * @param value {@link #system} (An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value - */ - public ValueSetCodeSystemComponent setSystemElement(UriType value) { - this.system = value; - return this; - } - - /** - * @return An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system. - */ - public String getSystem() { - return this.system == null ? null : this.system.getValue(); - } - - /** - * @param value An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system. - */ - public ValueSetCodeSystemComponent setSystem(String value) { - if (this.system == null) - this.system = new UriType(); - this.system.setValue(value); - return this; - } - - /** - * @return {@link #version} (The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value - */ - public StringType getVersionElement() { - if (this.version == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ValueSetCodeSystemComponent.version"); - else if (Configuration.doAutoCreate()) - this.version = new StringType(); // bb - return this.version; - } - - public boolean hasVersionElement() { - return this.version != null && !this.version.isEmpty(); - } - - public boolean hasVersion() { - return this.version != null && !this.version.isEmpty(); - } - - /** - * @param value {@link #version} (The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value - */ - public ValueSetCodeSystemComponent setVersionElement(StringType value) { - this.version = value; - return this; - } - - /** - * @return The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked. - */ - public String getVersion() { - return this.version == null ? null : this.version.getValue(); - } - - /** - * @param value The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked. - */ - public ValueSetCodeSystemComponent setVersion(String value) { - if (Utilities.noString(value)) - this.version = null; - else { - if (this.version == null) - this.version = new StringType(); - this.version.setValue(value); - } - return this; - } - - /** - * @return {@link #caseSensitive} (If code comparison is case sensitive when codes within this system are compared to each other.). This is the underlying object with id, value and extensions. The accessor "getCaseSensitive" gives direct access to the value - */ - public BooleanType getCaseSensitiveElement() { - if (this.caseSensitive == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ValueSetCodeSystemComponent.caseSensitive"); - else if (Configuration.doAutoCreate()) - this.caseSensitive = new BooleanType(); // bb - return this.caseSensitive; - } - - public boolean hasCaseSensitiveElement() { - return this.caseSensitive != null && !this.caseSensitive.isEmpty(); - } - - public boolean hasCaseSensitive() { - return this.caseSensitive != null && !this.caseSensitive.isEmpty(); - } - - /** - * @param value {@link #caseSensitive} (If code comparison is case sensitive when codes within this system are compared to each other.). This is the underlying object with id, value and extensions. The accessor "getCaseSensitive" gives direct access to the value - */ - public ValueSetCodeSystemComponent setCaseSensitiveElement(BooleanType value) { - this.caseSensitive = value; - return this; - } - - /** - * @return If code comparison is case sensitive when codes within this system are compared to each other. - */ - public boolean getCaseSensitive() { - return this.caseSensitive == null || this.caseSensitive.isEmpty() ? false : this.caseSensitive.getValue(); - } - - /** - * @param value If code comparison is case sensitive when codes within this system are compared to each other. - */ - public ValueSetCodeSystemComponent setCaseSensitive(boolean value) { - if (this.caseSensitive == null) - this.caseSensitive = new BooleanType(); - this.caseSensitive.setValue(value); - return this; - } - - /** - * @return {@link #concept} (Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.) - */ - public List getConcept() { - if (this.concept == null) - this.concept = new ArrayList(); - return this.concept; - } - - public boolean hasConcept() { - if (this.concept == null) - return false; - for (ConceptDefinitionComponent item : this.concept) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #concept} (Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.) - */ - // syntactic sugar - public ConceptDefinitionComponent addConcept() { //3 - ConceptDefinitionComponent t = new ConceptDefinitionComponent(); - if (this.concept == null) - this.concept = new ArrayList(); - this.concept.add(t); - return t; - } - - // syntactic sugar - public ValueSetCodeSystemComponent addConcept(ConceptDefinitionComponent t) { //3 - if (t == null) - return this; - if (this.concept == null) - this.concept = new ArrayList(); - this.concept.add(t); - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("system", "uri", "An absolute URI that is used to reference this code system, including in [Coding]{datatypes.html#Coding}.system.", 0, java.lang.Integer.MAX_VALUE, system)); - childrenList.add(new Property("version", "string", "The version of this code system that defines the codes. Note that the version is optional because a well maintained code system does not suffer from versioning, and therefore the version does not need to be maintained. However many code systems are not well maintained, and the version needs to be defined and tracked.", 0, java.lang.Integer.MAX_VALUE, version)); - childrenList.add(new Property("caseSensitive", "boolean", "If code comparison is case sensitive when codes within this system are compared to each other.", 0, java.lang.Integer.MAX_VALUE, caseSensitive)); - childrenList.add(new Property("concept", "", "Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are.", 0, java.lang.Integer.MAX_VALUE, concept)); - } - - @Override - public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("system")) - this.system = castToUri(value); // UriType - else if (name.equals("version")) - this.version = castToString(value); // StringType - else if (name.equals("caseSensitive")) - this.caseSensitive = castToBoolean(value); // BooleanType - else if (name.equals("concept")) - this.getConcept().add((ConceptDefinitionComponent) value); - else - super.setProperty(name, value); - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("system")) { - throw new FHIRException("Cannot call addChild on a primitive type ValueSet.system"); - } - else if (name.equals("version")) { - throw new FHIRException("Cannot call addChild on a primitive type ValueSet.version"); - } - else if (name.equals("caseSensitive")) { - throw new FHIRException("Cannot call addChild on a primitive type ValueSet.caseSensitive"); - } - else if (name.equals("concept")) { - return addConcept(); - } - else - return super.addChild(name); - } - - public ValueSetCodeSystemComponent copy() { - ValueSetCodeSystemComponent dst = new ValueSetCodeSystemComponent(); - copyValues(dst); - dst.system = system == null ? null : system.copy(); - dst.version = version == null ? null : version.copy(); - dst.caseSensitive = caseSensitive == null ? null : caseSensitive.copy(); - if (concept != null) { - dst.concept = new ArrayList(); - for (ConceptDefinitionComponent i : concept) - dst.concept.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ValueSetCodeSystemComponent)) - return false; - ValueSetCodeSystemComponent o = (ValueSetCodeSystemComponent) other; - return compareDeep(system, o.system, true) && compareDeep(version, o.version, true) && compareDeep(caseSensitive, o.caseSensitive, true) - && compareDeep(concept, o.concept, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ValueSetCodeSystemComponent)) - return false; - ValueSetCodeSystemComponent o = (ValueSetCodeSystemComponent) other; - return compareValues(system, o.system, true) && compareValues(version, o.version, true) && compareValues(caseSensitive, o.caseSensitive, true) - ; - } - - public boolean isEmpty() { - return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty()) - && (caseSensitive == null || caseSensitive.isEmpty()) && (concept == null || concept.isEmpty()) - ; - } - - public String fhirType() { - return "ValueSet.codeSystem"; - - } - - } - - @Block() - public static class ConceptDefinitionComponent extends BackboneElement implements IBaseBackboneElement { - /** - * A code - a text symbol - that uniquely identifies the concept within the code system. - */ - @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="Code that identifies concept", formalDefinition="A code - a text symbol - that uniquely identifies the concept within the code system." ) - protected CodeType code; - - /** - * If this code is not for use as a real concept. - */ - @Child(name = "abstract", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="If this code is not for use as a real concept", formalDefinition="If this code is not for use as a real concept." ) - protected BooleanType abstract_; - - /** - * A human readable string that is the recommended default way to present this concept to a user. - */ - @Child(name = "display", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Text to display to the user", formalDefinition="A human readable string that is the recommended default way to present this concept to a user." ) - protected StringType display; - - /** - * The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept. - */ - @Child(name = "definition", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Formal definition", formalDefinition="The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept." ) - protected StringType definition; - - /** - * Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc. - */ - @Child(name = "designation", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Additional representations for the concept", formalDefinition="Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc." ) - protected List designation; - - /** - * Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts. - */ - @Child(name = "concept", type = {ConceptDefinitionComponent.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) - @Description(shortDefinition="Child Concepts (is-a/contains/categorizes)", formalDefinition="Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts." ) - protected List concept; - - private static final long serialVersionUID = -318560292L; - - /** - * Constructor - */ - public ConceptDefinitionComponent() { - super(); - } - - /** - * Constructor - */ - public ConceptDefinitionComponent(CodeType code) { - super(); - this.code = code; - } - - /** - * @return {@link #code} (A code - a text symbol - that uniquely identifies the concept within the code system.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value - */ - public CodeType getCodeElement() { - if (this.code == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ConceptDefinitionComponent.code"); - else if (Configuration.doAutoCreate()) - this.code = new CodeType(); // bb - return this.code; - } - - public boolean hasCodeElement() { - return this.code != null && !this.code.isEmpty(); - } - - public boolean hasCode() { - return this.code != null && !this.code.isEmpty(); - } - - /** - * @param value {@link #code} (A code - a text symbol - that uniquely identifies the concept within the code system.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value - */ - public ConceptDefinitionComponent setCodeElement(CodeType value) { - this.code = value; - return this; - } - - /** - * @return A code - a text symbol - that uniquely identifies the concept within the code system. - */ - public String getCode() { - return this.code == null ? null : this.code.getValue(); - } - - /** - * @param value A code - a text symbol - that uniquely identifies the concept within the code system. - */ - public ConceptDefinitionComponent setCode(String value) { - if (this.code == null) - this.code = new CodeType(); - this.code.setValue(value); - return this; - } - - /** - * @return {@link #abstract_} (If this code is not for use as a real concept.). This is the underlying object with id, value and extensions. The accessor "getAbstract" gives direct access to the value - */ - public BooleanType getAbstractElement() { - if (this.abstract_ == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ConceptDefinitionComponent.abstract_"); - else if (Configuration.doAutoCreate()) - this.abstract_ = new BooleanType(); // bb - return this.abstract_; - } - - public boolean hasAbstractElement() { - return this.abstract_ != null && !this.abstract_.isEmpty(); - } - - public boolean hasAbstract() { - return this.abstract_ != null && !this.abstract_.isEmpty(); - } - - /** - * @param value {@link #abstract_} (If this code is not for use as a real concept.). This is the underlying object with id, value and extensions. The accessor "getAbstract" gives direct access to the value - */ - public ConceptDefinitionComponent setAbstractElement(BooleanType value) { - this.abstract_ = value; - return this; - } - - /** - * @return If this code is not for use as a real concept. - */ - public boolean getAbstract() { - return this.abstract_ == null || this.abstract_.isEmpty() ? false : this.abstract_.getValue(); - } - - /** - * @param value If this code is not for use as a real concept. - */ - public ConceptDefinitionComponent setAbstract(boolean value) { - if (this.abstract_ == null) - this.abstract_ = new BooleanType(); - this.abstract_.setValue(value); - return this; - } - - /** - * @return {@link #display} (A human readable string that is the recommended default way to present this concept to a user.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value - */ - public StringType getDisplayElement() { - if (this.display == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ConceptDefinitionComponent.display"); - else if (Configuration.doAutoCreate()) - this.display = new StringType(); // bb - return this.display; - } - - public boolean hasDisplayElement() { - return this.display != null && !this.display.isEmpty(); - } - - public boolean hasDisplay() { - return this.display != null && !this.display.isEmpty(); - } - - /** - * @param value {@link #display} (A human readable string that is the recommended default way to present this concept to a user.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value - */ - public ConceptDefinitionComponent setDisplayElement(StringType value) { - this.display = value; - return this; - } - - /** - * @return A human readable string that is the recommended default way to present this concept to a user. - */ - public String getDisplay() { - return this.display == null ? null : this.display.getValue(); - } - - /** - * @param value A human readable string that is the recommended default way to present this concept to a user. - */ - public ConceptDefinitionComponent setDisplay(String value) { - if (Utilities.noString(value)) - this.display = null; - else { - if (this.display == null) - this.display = new StringType(); - this.display.setValue(value); - } - return this; - } - - /** - * @return {@link #definition} (The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value - */ - public StringType getDefinitionElement() { - if (this.definition == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ConceptDefinitionComponent.definition"); - else if (Configuration.doAutoCreate()) - this.definition = new StringType(); // bb - return this.definition; - } - - public boolean hasDefinitionElement() { - return this.definition != null && !this.definition.isEmpty(); - } - - public boolean hasDefinition() { - return this.definition != null && !this.definition.isEmpty(); - } - - /** - * @param value {@link #definition} (The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value - */ - public ConceptDefinitionComponent setDefinitionElement(StringType value) { - this.definition = value; - return this; - } - - /** - * @return The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept. - */ - public String getDefinition() { - return this.definition == null ? null : this.definition.getValue(); - } - - /** - * @param value The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept. - */ - public ConceptDefinitionComponent setDefinition(String value) { - if (Utilities.noString(value)) - this.definition = null; - else { - if (this.definition == null) - this.definition = new StringType(); - this.definition.setValue(value); - } - return this; - } - - /** - * @return {@link #designation} (Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.) - */ - public List getDesignation() { - if (this.designation == null) - this.designation = new ArrayList(); - return this.designation; - } - - public boolean hasDesignation() { - if (this.designation == null) - return false; - for (ConceptDefinitionDesignationComponent item : this.designation) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #designation} (Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.) - */ - // syntactic sugar - public ConceptDefinitionDesignationComponent addDesignation() { //3 - ConceptDefinitionDesignationComponent t = new ConceptDefinitionDesignationComponent(); - if (this.designation == null) - this.designation = new ArrayList(); - this.designation.add(t); - return t; - } - - // syntactic sugar - public ConceptDefinitionComponent addDesignation(ConceptDefinitionDesignationComponent t) { //3 - if (t == null) - return this; - if (this.designation == null) - this.designation = new ArrayList(); - this.designation.add(t); - return this; - } - - /** - * @return {@link #concept} (Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts.) - */ - public List getConcept() { - if (this.concept == null) - this.concept = new ArrayList(); - return this.concept; - } - - public boolean hasConcept() { - if (this.concept == null) - return false; - for (ConceptDefinitionComponent item : this.concept) - if (!item.isEmpty()) - return true; - return false; - } - - /** - * @return {@link #concept} (Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts.) - */ - // syntactic sugar - public ConceptDefinitionComponent addConcept() { //3 - ConceptDefinitionComponent t = new ConceptDefinitionComponent(); - if (this.concept == null) - this.concept = new ArrayList(); - this.concept.add(t); - return t; - } - - // syntactic sugar - public ConceptDefinitionComponent addConcept(ConceptDefinitionComponent t) { //3 - if (t == null) - return this; - if (this.concept == null) - this.concept = new ArrayList(); - this.concept.add(t); - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("code", "code", "A code - a text symbol - that uniquely identifies the concept within the code system.", 0, java.lang.Integer.MAX_VALUE, code)); - childrenList.add(new Property("abstract", "boolean", "If this code is not for use as a real concept.", 0, java.lang.Integer.MAX_VALUE, abstract_)); - childrenList.add(new Property("display", "string", "A human readable string that is the recommended default way to present this concept to a user.", 0, java.lang.Integer.MAX_VALUE, display)); - childrenList.add(new Property("definition", "string", "The formal definition of the concept. The value set resource does not make formal definitions required, because of the prevalence of legacy systems. However, they are highly recommended, as without them there is no formal meaning associated with the concept.", 0, java.lang.Integer.MAX_VALUE, definition)); - childrenList.add(new Property("designation", "", "Additional representations for the concept - other languages, aliases, specialized purposes, used for particular purposes, etc.", 0, java.lang.Integer.MAX_VALUE, designation)); - childrenList.add(new Property("concept", "@ValueSet.codeSystem.concept", "Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts.", 0, java.lang.Integer.MAX_VALUE, concept)); - } - - @Override - public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("code")) - this.code = castToCode(value); // CodeType - else if (name.equals("abstract")) - this.abstract_ = castToBoolean(value); // BooleanType - else if (name.equals("display")) - this.display = castToString(value); // StringType - else if (name.equals("definition")) - this.definition = castToString(value); // StringType - else if (name.equals("designation")) - this.getDesignation().add((ConceptDefinitionDesignationComponent) value); - else if (name.equals("concept")) - this.getConcept().add((ConceptDefinitionComponent) value); - else - super.setProperty(name, value); - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("code")) { - throw new FHIRException("Cannot call addChild on a primitive type ValueSet.code"); - } - else if (name.equals("abstract")) { - throw new FHIRException("Cannot call addChild on a primitive type ValueSet.abstract"); - } - else if (name.equals("display")) { - throw new FHIRException("Cannot call addChild on a primitive type ValueSet.display"); - } - else if (name.equals("definition")) { - throw new FHIRException("Cannot call addChild on a primitive type ValueSet.definition"); - } - else if (name.equals("designation")) { - return addDesignation(); - } - else if (name.equals("concept")) { - return addConcept(); - } - else - return super.addChild(name); - } - - public ConceptDefinitionComponent copy() { - ConceptDefinitionComponent dst = new ConceptDefinitionComponent(); - copyValues(dst); - dst.code = code == null ? null : code.copy(); - dst.abstract_ = abstract_ == null ? null : abstract_.copy(); - dst.display = display == null ? null : display.copy(); - dst.definition = definition == null ? null : definition.copy(); - if (designation != null) { - dst.designation = new ArrayList(); - for (ConceptDefinitionDesignationComponent i : designation) - dst.designation.add(i.copy()); - }; - if (concept != null) { - dst.concept = new ArrayList(); - for (ConceptDefinitionComponent i : concept) - dst.concept.add(i.copy()); - }; - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ConceptDefinitionComponent)) - return false; - ConceptDefinitionComponent o = (ConceptDefinitionComponent) other; - return compareDeep(code, o.code, true) && compareDeep(abstract_, o.abstract_, true) && compareDeep(display, o.display, true) - && compareDeep(definition, o.definition, true) && compareDeep(designation, o.designation, true) - && compareDeep(concept, o.concept, true); - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ConceptDefinitionComponent)) - return false; - ConceptDefinitionComponent o = (ConceptDefinitionComponent) other; - return compareValues(code, o.code, true) && compareValues(abstract_, o.abstract_, true) && compareValues(display, o.display, true) - && compareValues(definition, o.definition, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (abstract_ == null || abstract_.isEmpty()) - && (display == null || display.isEmpty()) && (definition == null || definition.isEmpty()) - && (designation == null || designation.isEmpty()) && (concept == null || concept.isEmpty()) - ; - } - - public String fhirType() { - return "ValueSet.codeSystem.concept"; - - } - - } - - @Block() - public static class ConceptDefinitionDesignationComponent extends BackboneElement implements IBaseBackboneElement { - /** - * The language this designation is defined for. - */ - @Child(name = "language", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Human language of the designation", formalDefinition="The language this designation is defined for." ) - protected CodeType language; - - /** - * A code that details how this designation would be used. - */ - @Child(name = "use", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=false) - @Description(shortDefinition="Details how this designation would be used", formalDefinition="A code that details how this designation would be used." ) - protected Coding use; - - /** - * The text value for this designation. - */ - @Child(name = "value", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=false) - @Description(shortDefinition="The text value for this designation", formalDefinition="The text value for this designation." ) - protected StringType value; - - private static final long serialVersionUID = 1515662414L; - - /** - * Constructor - */ - public ConceptDefinitionDesignationComponent() { - super(); - } - - /** - * Constructor - */ - public ConceptDefinitionDesignationComponent(StringType value) { - super(); - this.value = value; - } - - /** - * @return {@link #language} (The language this designation is defined for.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value - */ - public CodeType getLanguageElement() { - if (this.language == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ConceptDefinitionDesignationComponent.language"); - else if (Configuration.doAutoCreate()) - this.language = new CodeType(); // bb - return this.language; - } - - public boolean hasLanguageElement() { - return this.language != null && !this.language.isEmpty(); - } - - public boolean hasLanguage() { - return this.language != null && !this.language.isEmpty(); - } - - /** - * @param value {@link #language} (The language this designation is defined for.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value - */ - public ConceptDefinitionDesignationComponent setLanguageElement(CodeType value) { - this.language = value; - return this; - } - - /** - * @return The language this designation is defined for. - */ - public String getLanguage() { - return this.language == null ? null : this.language.getValue(); - } - - /** - * @param value The language this designation is defined for. - */ - public ConceptDefinitionDesignationComponent setLanguage(String value) { - if (Utilities.noString(value)) - this.language = null; - else { - if (this.language == null) - this.language = new CodeType(); - this.language.setValue(value); - } - return this; - } - - /** - * @return {@link #use} (A code that details how this designation would be used.) - */ - public Coding getUse() { - if (this.use == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ConceptDefinitionDesignationComponent.use"); - else if (Configuration.doAutoCreate()) - this.use = new Coding(); // cc - return this.use; - } - - public boolean hasUse() { - return this.use != null && !this.use.isEmpty(); - } - - /** - * @param value {@link #use} (A code that details how this designation would be used.) - */ - public ConceptDefinitionDesignationComponent setUse(Coding value) { - this.use = value; - return this; - } - - /** - * @return {@link #value} (The text value for this designation.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value - */ - public StringType getValueElement() { - if (this.value == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ConceptDefinitionDesignationComponent.value"); - else if (Configuration.doAutoCreate()) - this.value = new StringType(); // bb - return this.value; - } - - public boolean hasValueElement() { - return this.value != null && !this.value.isEmpty(); - } - - public boolean hasValue() { - return this.value != null && !this.value.isEmpty(); - } - - /** - * @param value {@link #value} (The text value for this designation.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value - */ - public ConceptDefinitionDesignationComponent setValueElement(StringType value) { - this.value = value; - return this; - } - - /** - * @return The text value for this designation. - */ - public String getValue() { - return this.value == null ? null : this.value.getValue(); - } - - /** - * @param value The text value for this designation. - */ - public ConceptDefinitionDesignationComponent setValue(String value) { - if (this.value == null) - this.value = new StringType(); - this.value.setValue(value); - return this; - } - - protected void listChildren(List childrenList) { - super.listChildren(childrenList); - childrenList.add(new Property("language", "code", "The language this designation is defined for.", 0, java.lang.Integer.MAX_VALUE, language)); - childrenList.add(new Property("use", "Coding", "A code that details how this designation would be used.", 0, java.lang.Integer.MAX_VALUE, use)); - childrenList.add(new Property("value", "string", "The text value for this designation.", 0, java.lang.Integer.MAX_VALUE, value)); - } - - @Override - public void setProperty(String name, Base value) throws FHIRException { - if (name.equals("language")) - this.language = castToCode(value); // CodeType - else if (name.equals("use")) - this.use = castToCoding(value); // Coding - else if (name.equals("value")) - this.value = castToString(value); // StringType - else - super.setProperty(name, value); - } - - @Override - public Base addChild(String name) throws FHIRException { - if (name.equals("language")) { - throw new FHIRException("Cannot call addChild on a primitive type ValueSet.language"); - } - else if (name.equals("use")) { - this.use = new Coding(); - return this.use; - } - else if (name.equals("value")) { - throw new FHIRException("Cannot call addChild on a primitive type ValueSet.value"); - } - else - return super.addChild(name); - } - - public ConceptDefinitionDesignationComponent copy() { - ConceptDefinitionDesignationComponent dst = new ConceptDefinitionDesignationComponent(); - copyValues(dst); - dst.language = language == null ? null : language.copy(); - dst.use = use == null ? null : use.copy(); - dst.value = value == null ? null : value.copy(); - return dst; - } - - @Override - public boolean equalsDeep(Base other) { - if (!super.equalsDeep(other)) - return false; - if (!(other instanceof ConceptDefinitionDesignationComponent)) - return false; - ConceptDefinitionDesignationComponent o = (ConceptDefinitionDesignationComponent) other; - return compareDeep(language, o.language, true) && compareDeep(use, o.use, true) && compareDeep(value, o.value, true) - ; - } - - @Override - public boolean equalsShallow(Base other) { - if (!super.equalsShallow(other)) - return false; - if (!(other instanceof ConceptDefinitionDesignationComponent)) - return false; - ConceptDefinitionDesignationComponent o = (ConceptDefinitionDesignationComponent) other; - return compareValues(language, o.language, true) && compareValues(value, o.value, true); - } - - public boolean isEmpty() { - return super.isEmpty() && (language == null || language.isEmpty()) && (use == null || use.isEmpty()) - && (value == null || value.isEmpty()); - } - - public String fhirType() { - return "ValueSet.codeSystem.concept.designation"; - - } - } @Block() @@ -1618,8 +627,7 @@ public class ValueSet extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (import_ == null || import_.isEmpty()) && (include == null || include.isEmpty()) - && (exclude == null || exclude.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( import_, include, exclude); } public String fhirType() { @@ -1930,8 +938,8 @@ public class ValueSet extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty()) - && (concept == null || concept.isEmpty()) && (filter == null || filter.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( system, version, concept, filter + ); } public String fhirType() { @@ -1960,11 +968,11 @@ public class ValueSet extends DomainResource { /** * Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc. */ - @Child(name = "designation", type = {ConceptDefinitionDesignationComponent.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) + @Child(name = "designation", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) @Description(shortDefinition="Additional representations for this valueset", formalDefinition="Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc." ) - protected List designation; + protected List designation; - private static final long serialVersionUID = -1513912691L; + private static final long serialVersionUID = 260579971L; /** * Constructor @@ -2078,16 +1086,16 @@ public class ValueSet extends DomainResource { /** * @return {@link #designation} (Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.) */ - public List getDesignation() { + public List getDesignation() { if (this.designation == null) - this.designation = new ArrayList(); + this.designation = new ArrayList(); return this.designation; } public boolean hasDesignation() { if (this.designation == null) return false; - for (ConceptDefinitionDesignationComponent item : this.designation) + for (ConceptReferenceDesignationComponent item : this.designation) if (!item.isEmpty()) return true; return false; @@ -2097,20 +1105,20 @@ public class ValueSet extends DomainResource { * @return {@link #designation} (Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.) */ // syntactic sugar - public ConceptDefinitionDesignationComponent addDesignation() { //3 - ConceptDefinitionDesignationComponent t = new ConceptDefinitionDesignationComponent(); + public ConceptReferenceDesignationComponent addDesignation() { //3 + ConceptReferenceDesignationComponent t = new ConceptReferenceDesignationComponent(); if (this.designation == null) - this.designation = new ArrayList(); + this.designation = new ArrayList(); this.designation.add(t); return t; } // syntactic sugar - public ConceptReferenceComponent addDesignation(ConceptDefinitionDesignationComponent t) { //3 + public ConceptReferenceComponent addDesignation(ConceptReferenceDesignationComponent t) { //3 if (t == null) return this; if (this.designation == null) - this.designation = new ArrayList(); + this.designation = new ArrayList(); this.designation.add(t); return this; } @@ -2119,7 +1127,7 @@ public class ValueSet extends DomainResource { super.listChildren(childrenList); childrenList.add(new Property("code", "code", "Specifies a code for the concept to be included or excluded.", 0, java.lang.Integer.MAX_VALUE, code)); childrenList.add(new Property("display", "string", "The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.", 0, java.lang.Integer.MAX_VALUE, display)); - childrenList.add(new Property("designation", "@ValueSet.codeSystem.concept.designation", "Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.", 0, java.lang.Integer.MAX_VALUE, designation)); + childrenList.add(new Property("designation", "", "Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.", 0, java.lang.Integer.MAX_VALUE, designation)); } @Override @@ -2129,7 +1137,7 @@ public class ValueSet extends DomainResource { else if (name.equals("display")) this.display = castToString(value); // StringType else if (name.equals("designation")) - this.getDesignation().add((ConceptDefinitionDesignationComponent) value); + this.getDesignation().add((ConceptReferenceDesignationComponent) value); else super.setProperty(name, value); } @@ -2155,8 +1163,8 @@ public class ValueSet extends DomainResource { dst.code = code == null ? null : code.copy(); dst.display = display == null ? null : display.copy(); if (designation != null) { - dst.designation = new ArrayList(); - for (ConceptDefinitionDesignationComponent i : designation) + dst.designation = new ArrayList(); + for (ConceptReferenceDesignationComponent i : designation) dst.designation.add(i.copy()); }; return dst; @@ -2184,8 +1192,7 @@ public class ValueSet extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (code == null || code.isEmpty()) && (display == null || display.isEmpty()) - && (designation == null || designation.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, display, designation); } public String fhirType() { @@ -2193,6 +1200,240 @@ public class ValueSet extends DomainResource { } + } + + @Block() + public static class ConceptReferenceDesignationComponent extends BackboneElement implements IBaseBackboneElement { + /** + * The language this designation is defined for. + */ + @Child(name = "language", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Human language of the designation", formalDefinition="The language this designation is defined for." ) + protected CodeType language; + + /** + * A code that details how this designation would be used. + */ + @Child(name = "use", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=false) + @Description(shortDefinition="Details how this designation would be used", formalDefinition="A code that details how this designation would be used." ) + protected Coding use; + + /** + * The text value for this designation. + */ + @Child(name = "value", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=false) + @Description(shortDefinition="The text value for this designation", formalDefinition="The text value for this designation." ) + protected StringType value; + + private static final long serialVersionUID = 1515662414L; + + /** + * Constructor + */ + public ConceptReferenceDesignationComponent() { + super(); + } + + /** + * Constructor + */ + public ConceptReferenceDesignationComponent(StringType value) { + super(); + this.value = value; + } + + /** + * @return {@link #language} (The language this designation is defined for.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value + */ + public CodeType getLanguageElement() { + if (this.language == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptReferenceDesignationComponent.language"); + else if (Configuration.doAutoCreate()) + this.language = new CodeType(); // bb + return this.language; + } + + public boolean hasLanguageElement() { + return this.language != null && !this.language.isEmpty(); + } + + public boolean hasLanguage() { + return this.language != null && !this.language.isEmpty(); + } + + /** + * @param value {@link #language} (The language this designation is defined for.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value + */ + public ConceptReferenceDesignationComponent setLanguageElement(CodeType value) { + this.language = value; + return this; + } + + /** + * @return The language this designation is defined for. + */ + public String getLanguage() { + return this.language == null ? null : this.language.getValue(); + } + + /** + * @param value The language this designation is defined for. + */ + public ConceptReferenceDesignationComponent setLanguage(String value) { + if (Utilities.noString(value)) + this.language = null; + else { + if (this.language == null) + this.language = new CodeType(); + this.language.setValue(value); + } + return this; + } + + /** + * @return {@link #use} (A code that details how this designation would be used.) + */ + public Coding getUse() { + if (this.use == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptReferenceDesignationComponent.use"); + else if (Configuration.doAutoCreate()) + this.use = new Coding(); // cc + return this.use; + } + + public boolean hasUse() { + return this.use != null && !this.use.isEmpty(); + } + + /** + * @param value {@link #use} (A code that details how this designation would be used.) + */ + public ConceptReferenceDesignationComponent setUse(Coding value) { + this.use = value; + return this; + } + + /** + * @return {@link #value} (The text value for this designation.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public StringType getValueElement() { + if (this.value == null) + if (Configuration.errorOnAutoCreate()) + throw new Error("Attempt to auto-create ConceptReferenceDesignationComponent.value"); + else if (Configuration.doAutoCreate()) + this.value = new StringType(); // bb + return this.value; + } + + public boolean hasValueElement() { + return this.value != null && !this.value.isEmpty(); + } + + public boolean hasValue() { + return this.value != null && !this.value.isEmpty(); + } + + /** + * @param value {@link #value} (The text value for this designation.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value + */ + public ConceptReferenceDesignationComponent setValueElement(StringType value) { + this.value = value; + return this; + } + + /** + * @return The text value for this designation. + */ + public String getValue() { + return this.value == null ? null : this.value.getValue(); + } + + /** + * @param value The text value for this designation. + */ + public ConceptReferenceDesignationComponent setValue(String value) { + if (this.value == null) + this.value = new StringType(); + this.value.setValue(value); + return this; + } + + protected void listChildren(List childrenList) { + super.listChildren(childrenList); + childrenList.add(new Property("language", "code", "The language this designation is defined for.", 0, java.lang.Integer.MAX_VALUE, language)); + childrenList.add(new Property("use", "Coding", "A code that details how this designation would be used.", 0, java.lang.Integer.MAX_VALUE, use)); + childrenList.add(new Property("value", "string", "The text value for this designation.", 0, java.lang.Integer.MAX_VALUE, value)); + } + + @Override + public void setProperty(String name, Base value) throws FHIRException { + if (name.equals("language")) + this.language = castToCode(value); // CodeType + else if (name.equals("use")) + this.use = castToCoding(value); // Coding + else if (name.equals("value")) + this.value = castToString(value); // StringType + else + super.setProperty(name, value); + } + + @Override + public Base addChild(String name) throws FHIRException { + if (name.equals("language")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.language"); + } + else if (name.equals("use")) { + this.use = new Coding(); + return this.use; + } + else if (name.equals("value")) { + throw new FHIRException("Cannot call addChild on a primitive type ValueSet.value"); + } + else + return super.addChild(name); + } + + public ConceptReferenceDesignationComponent copy() { + ConceptReferenceDesignationComponent dst = new ConceptReferenceDesignationComponent(); + copyValues(dst); + dst.language = language == null ? null : language.copy(); + dst.use = use == null ? null : use.copy(); + dst.value = value == null ? null : value.copy(); + return dst; + } + + @Override + public boolean equalsDeep(Base other) { + if (!super.equalsDeep(other)) + return false; + if (!(other instanceof ConceptReferenceDesignationComponent)) + return false; + ConceptReferenceDesignationComponent o = (ConceptReferenceDesignationComponent) other; + return compareDeep(language, o.language, true) && compareDeep(use, o.use, true) && compareDeep(value, o.value, true) + ; + } + + @Override + public boolean equalsShallow(Base other) { + if (!super.equalsShallow(other)) + return false; + if (!(other instanceof ConceptReferenceDesignationComponent)) + return false; + ConceptReferenceDesignationComponent o = (ConceptReferenceDesignationComponent) other; + return compareValues(language, o.language, true) && compareValues(value, o.value, true); + } + + public boolean isEmpty() { + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( language, use, value); + } + + public String fhirType() { + return "ValueSet.compose.include.concept.designation"; + + } + } @Block() @@ -2438,8 +1679,7 @@ public class ValueSet extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (property == null || property.isEmpty()) && (op == null || op.isEmpty()) - && (value == null || value.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( property, op, value); } public String fhirType() { @@ -2867,9 +2107,8 @@ public class ValueSet extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (timestamp == null || timestamp.isEmpty()) - && (total == null || total.isEmpty()) && (offset == null || offset.isEmpty()) && (parameter == null || parameter.isEmpty()) - && (contains == null || contains.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, timestamp, total + , offset, parameter, contains); } public String fhirType() { @@ -3132,8 +2371,7 @@ public class ValueSet extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (name == null || name.isEmpty()) && (value == null || value.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, value); } public String fhirType() { @@ -3569,9 +2807,8 @@ public class ValueSet extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (system == null || system.isEmpty()) && (abstract_ == null || abstract_.isEmpty()) - && (version == null || version.isEmpty()) && (code == null || code.isEmpty()) && (display == null || display.isEmpty()) - && (contains == null || contains.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( system, abstract_, version, code + , display, contains); } public String fhirType() { @@ -3693,28 +2930,21 @@ public class ValueSet extends DomainResource { @Description(shortDefinition="Whether this is intended to be used with an extensible binding", formalDefinition="Whether this is intended to be used with an extensible binding or not." ) protected BooleanType extensible; - /** - * A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly. - */ - @Child(name = "codeSystem", type = {}, order=16, min=0, max=1, modifier=false, summary=true) - @Description(shortDefinition="An inline code system, which is part of this value set", formalDefinition="A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly." ) - protected ValueSetCodeSystemComponent codeSystem; - /** * A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set. */ - @Child(name = "compose", type = {}, order=17, min=0, max=1, modifier=false, summary=false) + @Child(name = "compose", type = {}, order=16, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="When value set includes codes from elsewhere", formalDefinition="A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set." ) protected ValueSetComposeComponent compose; /** * A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed. */ - @Child(name = "expansion", type = {}, order=18, min=0, max=1, modifier=false, summary=false) + @Child(name = "expansion", type = {}, order=17, min=0, max=1, modifier=false, summary=false) @Description(shortDefinition="Used when the value set is \"expanded\"", formalDefinition="A value set can also be \"expanded\", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed." ) protected ValueSetExpansionComponent expansion; - private static final long serialVersionUID = -467533312L; + private static final long serialVersionUID = 1847545818L; /** * Constructor @@ -4456,30 +3686,6 @@ public class ValueSet extends DomainResource { return this; } - /** - * @return {@link #codeSystem} (A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly.) - */ - public ValueSetCodeSystemComponent getCodeSystem() { - if (this.codeSystem == null) - if (Configuration.errorOnAutoCreate()) - throw new Error("Attempt to auto-create ValueSet.codeSystem"); - else if (Configuration.doAutoCreate()) - this.codeSystem = new ValueSetCodeSystemComponent(); // cc - return this.codeSystem; - } - - public boolean hasCodeSystem() { - return this.codeSystem != null && !this.codeSystem.isEmpty(); - } - - /** - * @param value {@link #codeSystem} (A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly.) - */ - public ValueSet setCodeSystem(ValueSetCodeSystemComponent value) { - this.codeSystem = value; - return this; - } - /** * @return {@link #compose} (A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set.) */ @@ -4546,7 +3752,6 @@ public class ValueSet extends DomainResource { childrenList.add(new Property("requirements", "string", "Explains why this value set is needed and why it has been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); childrenList.add(new Property("copyright", "string", "A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.", 0, java.lang.Integer.MAX_VALUE, copyright)); childrenList.add(new Property("extensible", "boolean", "Whether this is intended to be used with an extensible binding or not.", 0, java.lang.Integer.MAX_VALUE, extensible)); - childrenList.add(new Property("codeSystem", "", "A definition of a code system, inlined into the value set (as a packaging convenience). Note that the inline code system may be used from other value sets by referring to its (codeSystem.system) directly.", 0, java.lang.Integer.MAX_VALUE, codeSystem)); childrenList.add(new Property("compose", "", "A set of criteria that provide the content logical definition of the value set by including or excluding codes from outside this value set.", 0, java.lang.Integer.MAX_VALUE, compose)); childrenList.add(new Property("expansion", "", "A value set can also be \"expanded\", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", 0, java.lang.Integer.MAX_VALUE, expansion)); } @@ -4585,8 +3790,6 @@ public class ValueSet extends DomainResource { this.copyright = castToString(value); // StringType else if (name.equals("extensible")) this.extensible = castToBoolean(value); // BooleanType - else if (name.equals("codeSystem")) - this.codeSystem = (ValueSetCodeSystemComponent) value; // ValueSetCodeSystemComponent else if (name.equals("compose")) this.compose = (ValueSetComposeComponent) value; // ValueSetComposeComponent else if (name.equals("expansion")) @@ -4646,10 +3849,6 @@ public class ValueSet extends DomainResource { else if (name.equals("extensible")) { throw new FHIRException("Cannot call addChild on a primitive type ValueSet.extensible"); } - else if (name.equals("codeSystem")) { - this.codeSystem = new ValueSetCodeSystemComponent(); - return this.codeSystem; - } else if (name.equals("compose")) { this.compose = new ValueSetComposeComponent(); return this.compose; @@ -4694,7 +3893,6 @@ public class ValueSet extends DomainResource { dst.requirements = requirements == null ? null : requirements.copy(); dst.copyright = copyright == null ? null : copyright.copy(); dst.extensible = extensible == null ? null : extensible.copy(); - dst.codeSystem = codeSystem == null ? null : codeSystem.copy(); dst.compose = compose == null ? null : compose.copy(); dst.expansion = expansion == null ? null : expansion.copy(); return dst; @@ -4716,8 +3914,8 @@ public class ValueSet extends DomainResource { && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) && compareDeep(lockedDate, o.lockedDate, true) && compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true) && compareDeep(immutable, o.immutable, true) && compareDeep(requirements, o.requirements, true) - && compareDeep(copyright, o.copyright, true) && compareDeep(extensible, o.extensible, true) && compareDeep(codeSystem, o.codeSystem, true) - && compareDeep(compose, o.compose, true) && compareDeep(expansion, o.expansion, true); + && compareDeep(copyright, o.copyright, true) && compareDeep(extensible, o.extensible, true) && compareDeep(compose, o.compose, true) + && compareDeep(expansion, o.expansion, true); } @Override @@ -4735,15 +3933,9 @@ public class ValueSet extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty()) - && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) - && (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty()) - && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (lockedDate == null || lockedDate.isEmpty()) - && (description == null || description.isEmpty()) && (useContext == null || useContext.isEmpty()) - && (immutable == null || immutable.isEmpty()) && (requirements == null || requirements.isEmpty()) - && (copyright == null || copyright.isEmpty()) && (extensible == null || extensible.isEmpty()) - && (codeSystem == null || codeSystem.isEmpty()) && (compose == null || compose.isEmpty()) - && (expansion == null || expansion.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, identifier, version, name + , status, experimental, publisher, contact, date, lockedDate, description, useContext + , immutable, requirements, copyright, extensible, compose, expansion); } @Override @@ -4771,126 +3963,6 @@ public class ValueSet extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); - /** - * Search parameter: identifier - *

- * Description: The identifier for the value set
- * Type: token
- * Path: ValueSet.identifier
- *

- */ - @SearchParamDefinition(name="identifier", path="ValueSet.identifier", description="The identifier for the value set", type="token" ) - public static final String SP_IDENTIFIER = "identifier"; - /** - * Fluent Client search parameter constant for identifier - *

- * Description: The identifier for the value set
- * Type: token
- * Path: ValueSet.identifier
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); - - /** - * Search parameter: code - *

- * Description: A code defined in the value set
- * Type: token
- * Path: ValueSet.codeSystem.concept.code
- *

- */ - @SearchParamDefinition(name="code", path="ValueSet.codeSystem.concept.code", description="A code defined in the value set", type="token" ) - public static final String SP_CODE = "code"; - /** - * Fluent Client search parameter constant for code - *

- * Description: A code defined in the value set
- * Type: token
- * Path: ValueSet.codeSystem.concept.code
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); - - /** - * Search parameter: description - *

- * Description: Text search in the description of the value set
- * Type: string
- * Path: ValueSet.description
- *

- */ - @SearchParamDefinition(name="description", path="ValueSet.description", description="Text search in the description of the value set", type="string" ) - public static final String SP_DESCRIPTION = "description"; - /** - * Fluent Client search parameter constant for description - *

- * Description: Text search in the description of the value set
- * Type: string
- * Path: ValueSet.description
- *

- */ - public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); - - /** - * Search parameter: version - *

- * Description: The version identifier of the value set
- * Type: token
- * Path: ValueSet.version
- *

- */ - @SearchParamDefinition(name="version", path="ValueSet.version", description="The version identifier of the value set", type="token" ) - public static final String SP_VERSION = "version"; - /** - * Fluent Client search parameter constant for version - *

- * Description: The version identifier of the value set
- * Type: token
- * Path: ValueSet.version
- *

- */ - public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); - - /** - * Search parameter: url - *

- * Description: The logical URL for the value set
- * Type: uri
- * Path: ValueSet.url
- *

- */ - @SearchParamDefinition(name="url", path="ValueSet.url", description="The logical URL for the value set", type="uri" ) - public static final String SP_URL = "url"; - /** - * Fluent Client search parameter constant for url - *

- * Description: The logical URL for the value set
- * Type: uri
- * Path: ValueSet.url
- *

- */ - public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); - - /** - * Search parameter: expansion - *

- * Description: Uniquely identifies this expansion
- * Type: uri
- * Path: ValueSet.expansion.identifier
- *

- */ - @SearchParamDefinition(name="expansion", path="ValueSet.expansion.identifier", description="Uniquely identifies this expansion", type="uri" ) - public static final String SP_EXPANSION = "expansion"; - /** - * Fluent Client search parameter constant for expansion - *

- * Description: Uniquely identifies this expansion
- * Type: uri
- * Path: ValueSet.expansion.identifier
- *

- */ - public static final ca.uhn.fhir.rest.gclient.UriClientParam EXPANSION = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_EXPANSION); - /** * Search parameter: reference *

@@ -4912,24 +3984,24 @@ public class ValueSet extends DomainResource { public static final ca.uhn.fhir.rest.gclient.UriClientParam REFERENCE = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_REFERENCE); /** - * Search parameter: system + * Search parameter: identifier *

- * Description: The system for any codes defined by this value set
- * Type: uri
- * Path: ValueSet.codeSystem.system
+ * Description: The identifier for the value set
+ * Type: token
+ * Path: ValueSet.identifier
*

*/ - @SearchParamDefinition(name="system", path="ValueSet.codeSystem.system", description="The system for any codes defined by this value set", type="uri" ) - public static final String SP_SYSTEM = "system"; + @SearchParamDefinition(name="identifier", path="ValueSet.identifier", description="The identifier for the value set", type="token" ) + public static final String SP_IDENTIFIER = "identifier"; /** - * Fluent Client search parameter constant for system + * Fluent Client search parameter constant for identifier *

- * Description: The system for any codes defined by this value set
- * Type: uri
- * Path: ValueSet.codeSystem.system
+ * Description: The identifier for the value set
+ * Type: token
+ * Path: ValueSet.identifier
*

*/ - public static final ca.uhn.fhir.rest.gclient.UriClientParam SYSTEM = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_SYSTEM); + public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); /** * Search parameter: name @@ -4991,6 +4063,66 @@ public class ValueSet extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); + /** + * Search parameter: description + *

+ * Description: Text search in the description of the value set
+ * Type: string
+ * Path: ValueSet.description
+ *

+ */ + @SearchParamDefinition(name="description", path="ValueSet.description", description="Text search in the description of the value set", type="string" ) + public static final String SP_DESCRIPTION = "description"; + /** + * Fluent Client search parameter constant for description + *

+ * Description: Text search in the description of the value set
+ * Type: string
+ * Path: ValueSet.description
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); + + /** + * Search parameter: version + *

+ * Description: The version identifier of the value set
+ * Type: token
+ * Path: ValueSet.version
+ *

+ */ + @SearchParamDefinition(name="version", path="ValueSet.version", description="The version identifier of the value set", type="token" ) + public static final String SP_VERSION = "version"; + /** + * Fluent Client search parameter constant for version + *

+ * Description: The version identifier of the value set
+ * Type: token
+ * Path: ValueSet.version
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); + + /** + * Search parameter: url + *

+ * Description: The logical URL for the value set
+ * Type: uri
+ * Path: ValueSet.url
+ *

+ */ + @SearchParamDefinition(name="url", path="ValueSet.url", description="The logical URL for the value set", type="uri" ) + public static final String SP_URL = "url"; + /** + * Fluent Client search parameter constant for url + *

+ * Description: The logical URL for the value set
+ * Type: uri
+ * Path: ValueSet.url
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); + /** * Search parameter: status *

@@ -5011,6 +4143,26 @@ public class ValueSet extends DomainResource { */ public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); + /** + * Search parameter: expansion + *

+ * Description: Uniquely identifies this expansion
+ * Type: uri
+ * Path: ValueSet.expansion.identifier
+ *

+ */ + @SearchParamDefinition(name="expansion", path="ValueSet.expansion.identifier", description="Uniquely identifies this expansion", type="uri" ) + public static final String SP_EXPANSION = "expansion"; + /** + * Fluent Client search parameter constant for expansion + *

+ * Description: Uniquely identifies this expansion
+ * Type: uri
+ * Path: ValueSet.expansion.identifier
+ *

+ */ + public static final ca.uhn.fhir.rest.gclient.UriClientParam EXPANSION = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_EXPANSION); + } diff --git a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/VisionPrescription.java b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/VisionPrescription.java index 6660f7c6657..6a3c0775152 100644 --- a/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/VisionPrescription.java +++ b/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/VisionPrescription.java @@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model; */ -// Generated on Sat, Jan 30, 2016 09:18-0500 for FHIR v1.3.0 +// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 import java.util.*; @@ -40,9 +40,8 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Block; - -import org.hl7.fhir.dstu3.exceptions.FHIRException; import org.hl7.fhir.instance.model.api.*; +import org.hl7.fhir.dstu3.exceptions.FHIRException; /** * An authorization for the supply of glasses and/or contact lenses to a patient. */ @@ -1345,12 +1344,9 @@ public class VisionPrescription extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (product == null || product.isEmpty()) && (eye == null || eye.isEmpty()) - && (sphere == null || sphere.isEmpty()) && (cylinder == null || cylinder.isEmpty()) && (axis == null || axis.isEmpty()) - && (prism == null || prism.isEmpty()) && (base == null || base.isEmpty()) && (add == null || add.isEmpty()) - && (power == null || power.isEmpty()) && (backCurve == null || backCurve.isEmpty()) && (diameter == null || diameter.isEmpty()) - && (duration == null || duration.isEmpty()) && (color == null || color.isEmpty()) && (brand == null || brand.isEmpty()) - && (notes == null || notes.isEmpty()); + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( product, eye, sphere, cylinder + , axis, prism, base, add, power, backCurve, diameter, duration, color, brand, notes + ); } public String fhirType() { @@ -1858,10 +1854,8 @@ public class VisionPrescription extends DomainResource { } public boolean isEmpty() { - return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (dateWritten == null || dateWritten.isEmpty()) - && (patient == null || patient.isEmpty()) && (prescriber == null || prescriber.isEmpty()) - && (encounter == null || encounter.isEmpty()) && (reason == null || reason.isEmpty()) && (dispense == null || dispense.isEmpty()) - ; + return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identifier, dateWritten, patient + , prescriber, encounter, reason, dispense); } @Override @@ -1877,7 +1871,7 @@ public class VisionPrescription extends DomainResource { * Path: VisionPrescription.prescriber
*

*/ - @SearchParamDefinition(name="prescriber", path="VisionPrescription.prescriber", description="Who authorizes the vision product", type="reference" ) + @SearchParamDefinition(name="prescriber", path="VisionPrescription.prescriber", description="Who authorizes the vision product", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") } ) public static final String SP_PRESCRIBER = "prescriber"; /** * Fluent Client search parameter constant for prescriber @@ -1923,7 +1917,7 @@ public class VisionPrescription extends DomainResource { * Path: VisionPrescription.patient
*

*/ - @SearchParamDefinition(name="patient", path="VisionPrescription.patient", description="The identity of a patient to list dispenses for", type="reference" ) + @SearchParamDefinition(name="patient", path="VisionPrescription.patient", description="The identity of a patient to list dispenses for", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) public static final String SP_PATIENT = "patient"; /** * Fluent Client search parameter constant for patient @@ -1969,7 +1963,7 @@ public class VisionPrescription extends DomainResource { * Path: VisionPrescription.encounter
*

*/ - @SearchParamDefinition(name="encounter", path="VisionPrescription.encounter", description="Return prescriptions with this encounter identifier", type="reference" ) + @SearchParamDefinition(name="encounter", path="VisionPrescription.encounter", description="Return prescriptions with this encounter identifier", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } ) public static final String SP_ENCOUNTER = "encounter"; /** * Fluent Client search parameter constant for encounter